Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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 timeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started