Question: this program can have varying output results based on the value assigned to a single class constant. This class constant determines the height of the

this program can have varying output results based on the value assigned to a single class constant. This class constant determines the height of the firecracker. The firecracker shown above has a height of 5.
Define 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.
When you submit your code, it doesn't matter what value you set for the constant. I'll change it to see how your code works with different outputs.
On any given execution, your program will produce just one version of this figure.
For example, with a height of 8, the output should look like this:
//\\
//!!\\
//!!!!\\
//!!!!!!\\
//!!!!!!!!\\
//!!!!!!!!!!\\
//!!!!!!!!!!!!\\
+~~~~~~~~~~~~~~~~+
[\/\/\/\/\/\/\/\/]
[-\/\/\/\/\/\/\/-]
[--\/\/\/\/\/\/--]
[---\/\/\/\/\/---]
[----\/\/\/\/----]
[-----\/\/\/-----]
[------\/\/------]
[-------\/-------]
[//////----\\\\\\]
[/////------\\\\\]
[////--------\\\\]
[///----------\\\]
[//------------\\]
[/--------------\]
[\/\/\/\/\/\/\/\/]
[-\/\/\/\/\/\/\/-]
[--\/\/\/\/\/\/--]
[---\/\/\/\/\/---]
[----\/\/\/\/----]
[-----\/\/\/-----]
[------\/\/------]
[-------\/-------]
+~~~~~~~~~~~~~~~~+
//\\
//!!\\
//!!!!\\
//!!!!!!\\
//!!!!!!!!\\
//!!!!!!!!!!\\
//!!!!!!!!!!!!\\
And finally, Submit it as FireCracTwo.java file on Canvas.

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 Databases Questions!