Question: How do I make a Java program off of this following output? It requires the use of For Loops only to create the output. Pago

How do I make a Java program off of this following output? It requires the use of For Loops only to create the output.

How do I make a Java program off of this following output?It requires the use of For Loops only to create the output.

Pago ZOOM+ code Use modular design to write a program that draws a figure that looks like the sample output in the file diamontOutput_Lab2.txt. A screenshot of the program output looks like this HEIGHT5 I 1T+11 TIr1I 1TIT 1111 Page Analyze the output figure given to you. It consists of two vertical rectangular boxes, consisting of half diamonds joined together in two different ways: There is also a border to the boxes. Count the vertical lines on the sides to gauge how tall each half diamond needs to be Use a constant called HEIGHT to define the height of the half diamond The sample output in the accompanying text file has HEIGHT 10 HEIGHT 5; Create the calculation tables that are required for your loops. Write a program to draw this figure. Your program must be able to scale the figure up or down by simply changing the value of HEIGHT Draw the figure for HEIGHT 10 and HEIGHT 5 Submit a screen shot of your output and your code files in the Lab 2 submission box. Your program should be designed in a modular way Your program should consist of two files: Main.jova and Helper.java The methods file Helper.java contains the class called Helper which defines the following methods: drawLine() drawTopHalfDiamond() drawBottomHalfDiamond) drawCompleteFigure(): The file Main.java contains the driver class called Main and calls the method drawCompleteFigure() Draw the output figure by running the program twice. Once for HEIGHT 10 and then change the HEIGHT to 5 to draw a second time

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!