Question: 8 . 8 Project 8 . 1 Complete Project 8 . 1 . This program is broken down into phases for your convenience only. Please
Project
Complete Project
This program is broken down into phases for your convenience only. Please turn in only your final product.
Important Notes:
Do not use classes, arrays, vector, structs, global variable, valuereturning function and any advance features that have not been covered in this course.
Function declarationprototype is required.
Function documentation is required. Refer to Programming with Style, Initial File Comments and Inline Comments, Documentation Sample and Style Conventions for details.
Make sure your file name is main.cpp
If you don't follow the important notes above, it may result in a grade of
Phase : Write a program that draws a rocket on the screen. Here's what the rocket should look like:
X X X X X XXXXX X X X X X X X X XXXXX XXXXX X X X X X X X X XXXXX X X X X X
Your main function in phase must look like this:
int main drawCone; drawBox; drawBox; drawCone;
You may use three cout statements no loops are necessary in your drawCone function.
For your drawBox function, you must use the drawHorizontalLine drawVerticalLines and drawOneRow functions exactly as they appear in lesson For phase you'll be using the versions from lesson
Phase : In this phase you will allow the user to specify three things:
the width of each stage
the height of each stage
how many stages in the rocket
A "stage" in your rocket is one rectangle. The example rocket above has a stageheight of a stagewidth of and the number of stages is
Your main method in phase must look like this:
int main statements to prompt for and read the stageheight, stagewidth, and number of stages. drawRocket;
In order to make this work with the zyBooks unit tester, we'll need to agree on an order for the arguments. Here's the rule: the width of the rocket, if it is an argument, must always be first. The number of stages in the rocket, if it is an argument, must always be last.
You must use the drawHorizontalLine drawVerticalLines drawOneRow drawBox functions exactly as they appear in lesson
Notice that if you run the program and choose a different width for your stages, the cone won't fit correctly anymore. I won't make you fix this in other words, you can keep your three line drawCone function from phase but you can fix it for 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 plus 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 extra credit points.
Note on zyBooks and the extra credit: You only need to read this if your extra credit rocket seems correct outside of zyBooks but is marked incorrect by zyBooks. zyBooks is set up to mark the output as incorrect if there are spaces to the right of the final X on any line. If your solution works correctly, but prints spaces to the right of the final X on a line, you'll need to email me so I can adjust your score manually.
Phase : 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:
int main getDimensions; drawRocket;
You must still use the drawBox drawHorizontalLine drawVerticalLines and drawOneRow functions exactly as they appear in lesson They should remain unchanged from phase Note: since you'll be using these four functions directly from the lesson, you are not required to document them.
As described in the Style Conventions and Documentation Sample, please make sure to place a detailed comment above each of your function definitions, use good decomposition, and separate your functions with at least blank lines. I suggest that now would be a good time to reread the Style Conventions section of the Syllabus. Note that you are not required to provide documentation for functions that you copied from the lesson.
qxzqy
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
