Answer:
Step-by-step explanation:
You may not use the setw() function in this project! Phase 2: In this phase inside int main() you will allow the user to specify three things and validate input to make sure that the values are not less than 3 or greater than 15. If needed, allow the user to re-input values that meet the program specification.: 1. The height of each stage 2. The width of each stage 3. How many stages in the rocket [A "stage" in your rocket is one box] Your program will look a lot like it did before except that you will add 3 cout/cin statements including a data validation routine before you call the functions. In addition, you will now have some arguments in your function calls, and some other changes to call the appropriate functions (HINT: based on the height of each stage) to generate the correct type of rocket shape. Notice that in addition to generating two possible rocket types (based on stage height) if you run the program and choose a different width for your stages, the cone won't really fit correctly anymore. I won't make you fix this, but you can fix it for 10 points of extra credit if you like. However, I will not help you with the extra credit. In order to get the extra credit, the number of rows of your cone must be equal to the width of the stages divided by 2 (plus 1 for odd widths). If the stage width is an even number, your cone must have two stars in the top row instead of one. If you do this perfectly and use good decomposition in the process you'll get 10 extra credit points. Phase 3: In this phase you won't change what the program produces. We're just going to improve on the organization a bit. Change your program so that the main function looks like this: (note: no function prototypes are shown below) int main() { getDimensions(); drawRocket(); } Please make sure to place a comment near each of your function definitions, use good decomposition, separate your functions with at least 1 inches of whitespace and DO NOT use global variables. I suggest that now would be a good time to reread the program style, formatting, and documentation section in the syllabus and review the Dale text Appendix F reference section on functions. Paste your source code from phase 3 followed by your output from phase 3. A single output is sufficient unless you do the extra credit, in which case you should show examples of both even and odd cone widths.