Question: Question 3 ( 1 6 pts ) : Refactoring an existing application During our first class meeting we wrote a program that counted items in

Question 3(16 pts): Refactoring an existing application
During our first class meeting we wrote a program that counted items in "one little Indian" nursery rhyme format. For this problem we are going to refactor (e.g., restructure the source code of an application or piece of software to improve operation without altering the base functionality) the application to enhance its functionality.
a.(5 pts) Add code to your refactored application that counts down instead of up (10 little, 9 little, ...1 little ) in the nursery rhyme.
b.(5 pts) Change the code that displays the number with its equivalent string (ex: 4 should be displayed as "four"). You can perform this operation in a function, or you can implement the array-based method I hinted at in class:
char* xlate[]=\{"zero", "one", ...\};
You can assume a maximum of 20 "things"
c.(6 pts) Execute your refactored program and provide console listings or transcripts showing that the program works correctly. You may use the command line tools, the IDE of your choice or an online $C$ compiler.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!