Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this assignment, you are going to generate output that looks like the following: /** //** ///** ////** /////** +=*=*=*=*=*=*+ |../..../..| |.//..//.| |//////| |//////| |.//..//.|

For this assignment, you are going to generate output that looks like the following:

/**\ //**\\ ///**\\\ ////**\\\\ /////**\\\\\ +=*=*=*=*=*=*+ |../\..../\..| |./\/\../\/\.| |/\/\/\/\/\/\| |\/\/\/\/\/\/| |.\/\/..\/\/.| |..\/....\/..| +=*=*=*=*=*=*+ |\/\/\/\/\/\/| |.\/\/..\/\/.| |..\/....\/..| |../\..../\..| |./\/\../\/\.| |/\/\/\/\/\/\| +=*=*=*=*=*=*+ /**\ //**\\ ///**\\\ ////**\\\\ /////**\\\\\

You are to exactly reproduce this output. The various subfigures in the middle of this output have a height of 3. These subfigures have the property that their height determines their width, so there is only one size variable. You are to use a class constant to make it possible to change a single number in one place in the program to have it produce a corresponding figure of a different size.

This assignment is meant to give you practice with the constructs from chapters 1 and 2. This will require you to create nested for loops with print and println statements that use the class constant. You may use constructs from chapter 3, although you are not required to do so and you will receive no extra credit for doing so. You may not use any programming constructs that are not in chapters 1 through 3 of the textbook.

You should continue to use static methods to structure your solution. You should try to avoid significant redundancy and you should structure your program in such a way that the methods match the structure of the output itself. You are required to properly indent your code and will lose points if you make indentation mistakes. You should localize variables whenever possible.

You should once again include a comment at the beginning of your class files with basic information and a description of what the program does. You should also include a comment on each individual method describing what it does. You will have two classes, one that has a main method and another class that has a drawRocket method along with all of your supporting static methods. The class constant for the size of the rocket should go in your helper class. Name these classes DrawRocket.java and RocketHelper.java.

On any given execution your program will produce just one version of this figure, but it should be possible to change the value of the program constant to have your program produce a figure of a different size. For example, with subfigures of height 5, the output should look like this:

/**\ //**\\ ///**\\\ ////**\\\\ /////**\\\\\ //////**\\\\\\ ///////**\\\\\\\ ////////**\\\\\\\\ /////////**\\\\\\\\\ +=*=*=*=*=*=*=*=*=*=*+ |..../\......../\....| |.../\/\....../\/\...| |../\/\/\..../\/\/\..| |./\/\/\/\../\/\/\/\.| |/\/\/\/\/\/\/\/\/\/\| |\/\/\/\/\/\/\/\/\/\/| |.\/\/\/\/..\/\/\/\/.| |..\/\/\/....\/\/\/..| |...\/\/......\/\/...| |....\/........\/....| +=*=*=*=*=*=*=*=*=*=*+ |\/\/\/\/\/\/\/\/\/\/| |.\/\/\/\/..\/\/\/\/.| |..\/\/\/....\/\/\/..| |...\/\/......\/\/...| |....\/........\/....| |..../\......../\....| |.../\/\....../\/\...| |../\/\/\..../\/\/\..| |./\/\/\/\../\/\/\/\.| |/\/\/\/\/\/\/\/\/\/\| +=*=*=*=*=*=*=*=*=*=*+ /**\ //**\\ ///**\\\ ////**\\\\ /////**\\\\\ //////**\\\\\\ ///////**\\\\\\\ ////////**\\\\\\\\ /////////**\\\\\\\\\

Requirements

You must have a helper class RocketHelper with a drawRocket method, a class constant for the size of the rocket and all supporting methods required to draw the rocket itself. The drawRocket method should only have method calls, no loops or print statements and you must eliminate redundant code wherever possible. Your other class, DrawRocket, will have a main method that calls the drawRocket method in your helper class but that is all. Review the grading rubric on Canvas for additional information on how your submission will be scored.

image text in transcribed
image text in transcribed
image text in transcribed
Rocket Problem For this assignment, you are going to generate output that looks like the following: /// //// \\ 1../..../.. 1./\..//. 1/\\\\\\ IVVVVVI ./ ../ . 1..V....V..! IWWWWW . /. \/\/.|. 1.. .... ..1 1../..../..! 1./V\.. \\.1 1/VVVVV // /// //// You are to exactly reproduce this output. The various subfigures in the middle of this output have a height of 3. These subfigures have the property that their height determines their width, so there is only one size variable. You are to use a class constant to make it possible to change a single number in one place in the program to have it produce a corresponding figure of a different size. This assignment is meant to give you practice with the constructs from chapters 1 and 2. This will require you to create nested for loops with print and printin statements that use the class constant. You may use constructs from Chapter 3, although you are not required to do so and you will receive no extra credit for doing so. You may not use any programming constructs that are not in chapters 1 through 3 of the textbook. You should continue to use static methods to structure your solution. You should try to avoid significant redundancy and you should structure your program in such a way that the methods match the structure of the output itself. You are required to properly indent your code and will lose points if you make indentation mistakes. You should localize variables whenever possible. You should once again include a comment at the beginning of your class files with basic information and cription of what the program does. You should also include a comment on each individual method describing what it does. You will have two classes, one that has a main method and another class that has a draw Rocket method along with all of your supporting static methods. The class constant for the size of the rocket should go in your helper class. Name these classes DrawRocket.java and RocketHelper.java. On any given execution your program will produce just one version of this figure, but it should be possible to change the value of the program constant to have your program produce a figure of a different size. For example, with subfigures of height 5. the output should look like this: //** 117/** I.... ........ ....1 1.../V\....../ ... 1../\\\..../V1\.. 1./\/\ \ \.. \/\/V .! I/WWWWWWWW IVVVVVVVVVVI \\/\..\\\\/ | 1..\/\ \ .... .. 1...//......//...1 1.... ........ ....! - - - + IVVVVVVVVVVI , V V .. \/\/| .VVV....VVV..! ... ...... ...1 . \ W .. ..... .... \....../\/\...! ..../V .. ../\/\/\/1.1 | | . /// H/ / Requirements You must have a helper class Rocket Helper with a draw Rocket method, a class constant for the size of the rocket and all supporting methods required to draw the rocket itself. The drawRocket method should only have method calls, no loops or print statements and you must eliminate redundant code wherever possible. Your other class, DrawRocket, will have a main method that calls the drawRocket method in your helper class but that is all. Review the grading rubric on Canvas for additional Information on how your submission will be scored. Rocket Problem For this assignment, you are going to generate output that looks like the following: /// //// \\ 1../..../.. 1./\..//. 1/\\\\\\ IVVVVVI ./ ../ . 1..V....V..! IWWWWW . /. \/\/.|. 1.. .... ..1 1../..../..! 1./V\.. \\.1 1/VVVVV // /// //// You are to exactly reproduce this output. The various subfigures in the middle of this output have a height of 3. These subfigures have the property that their height determines their width, so there is only one size variable. You are to use a class constant to make it possible to change a single number in one place in the program to have it produce a corresponding figure of a different size. This assignment is meant to give you practice with the constructs from chapters 1 and 2. This will require you to create nested for loops with print and printin statements that use the class constant. You may use constructs from Chapter 3, although you are not required to do so and you will receive no extra credit for doing so. You may not use any programming constructs that are not in chapters 1 through 3 of the textbook. You should continue to use static methods to structure your solution. You should try to avoid significant redundancy and you should structure your program in such a way that the methods match the structure of the output itself. You are required to properly indent your code and will lose points if you make indentation mistakes. You should localize variables whenever possible. You should once again include a comment at the beginning of your class files with basic information and cription of what the program does. You should also include a comment on each individual method describing what it does. You will have two classes, one that has a main method and another class that has a draw Rocket method along with all of your supporting static methods. The class constant for the size of the rocket should go in your helper class. Name these classes DrawRocket.java and RocketHelper.java. On any given execution your program will produce just one version of this figure, but it should be possible to change the value of the program constant to have your program produce a figure of a different size. For example, with subfigures of height 5. the output should look like this: //** 117/** I.... ........ ....1 1.../V\....../ ... 1../\\\..../V1\.. 1./\/\ \ \.. \/\/V .! I/WWWWWWWW IVVVVVVVVVVI \\/\..\\\\/ | 1..\/\ \ .... .. 1...//......//...1 1.... ........ ....! - - - + IVVVVVVVVVVI , V V .. \/\/| .VVV....VVV..! ... ...... ...1 . \ W .. ..... .... \....../\/\...! ..../V .. ../\/\/\/1.1 | | . /// H/ / Requirements You must have a helper class Rocket Helper with a draw Rocket method, a class constant for the size of the rocket and all supporting methods required to draw the rocket itself. The drawRocket method should only have method calls, no loops or print statements and you must eliminate redundant code wherever possible. Your other class, DrawRocket, will have a main method that calls the drawRocket method in your helper class but that is all. Review the grading rubric on Canvas for additional Information on how your submission will be scored

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

Describe the procedures to amend the Constitution.

Answered: 1 week ago