Question: In Java Topics This assignment will give you practice with for loops, static methods, print/println statements and a class constant. Details You are going to

In Java

In Java Topics This assignment will give you practice with for loops,static methods, print/println statements and a class constant. Details You are goingto generate output that looks like the following (height of 5): AMMA| { \########## ########## 1...... 1........! I 88. .881 I 8888 |

Topics This assignment will give you practice with for loops, static methods, print/println statements and a class constant. Details You are going to generate output that looks like the following (height of 5): AMMA | { \########## ########## 1...... 1........! I 88. .881 I 8888 | 1.... 88881 1888888.. 1..8888881 1 888888881 1888888881 IX XI IX X1 IX XI_l _ |_ | |_ |_IX XI 1000000000000000000111111 0000000000000000001 100000000 10000000000111111 0000000000 1000000001 100000000 100000000001|||| 1 oooooooooo 1000000001 1000000000000000000||||||ooooo00000 100000000 1000000000000000000| | | | | | ooooo00000 1000000001 Instructions You are to write a program that can produces an ASCII Art picture. You should use nested loops to reduce repeating code for specific characters on a given line. You should use static methods to structure your solution in order to reduce repeating code for repetitious subfigures You should have a method to represent each of the major top-to-bottom pieces: The tops of the towers The height of the towers The battlement (top of the wall section) o The bottom part of towers and main building You are required to properly indent your code and will lose points if you make indentation mistakes. You should begin by trying to reproduce the figure above exactly. Once you can reproduce this castle, you should introduce a class constant to your code to make your solution more flexible in order to allow castle of different sizes to be produced. Class Constant Unlike previous programs, 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 castle. The castle 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 does not matter what the value of your constant is set at, as I will change the constant to test your code for various output results. You should test your own output between the values of 2 and 10. 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: | AAAAAAAAAAAAAAAA ### ########/ I 88. .881 18888 .88881 I 888888 8888881 188888888 1.. ....88888888 I 8888888888.. 1....88888888881 1888888888888.. 1..888888888888 188888888888888 188888888888888 IX XI IX X! IX XII |_| |_| |_| |_| |_| |_| |_| |_IX XI 100000000000000 10000000000000000||||||||| 0000000000000000 1000000000000001 100000000000000 10000000000000000||||||||| 0000000000000000 1000000000000001 1000000000000000000000000000000||||||||| 0000000000000000 100000000000000 100000000000000 loooooooooooooooo111111111 0000000000000000000000000000001 100000000000000 10000000000000000111111111 0000000000000000100000000000000 100000000000000 10000000000000000111111111 00000000000000001000000000000001 1000000000000001 0000000000000000||||||||| 000000000000000000000000000000 100000000000000 10000000000000000|||||||| loooo000000000000 1000000000000001 Your solution should have at minimum four methods other than the main method. o Use good judgement in deciding how many methods to create. o I will not penalize you for having redundancy between the left and right towers on a single line, but you may receive bonus points for a particularly elegant reduction in redundancy

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!