Question: plz write code in Java Q2: Write a Program to draw a different shapes using static methods and for loops. Use a constant integer to

plz write code in Java Q2: Write a Program to draw adifferent shapes using static methods and for loops. Use a constant integerplz write code in Java

Q2: Write a Program to draw a different shapes using static methods and for loops. Use a constant integer to specify the number of rows of the shape. Change the value of the constant to scale the shape to a different number of rows. The main method must only have different calls of the following three methods. 1- a method called straightLine() to draw the following line: 2- a second method called UpTriangle() to draw the following shape if you set the number of rows to four: * | | | /* | | 1/*\\ | | 1//* 3-a third method called downTriangle() to draw the following shape if you set the number of rows to four: | \\*/// | \\*// | 1 \*/ 1 | If you set the number of rows to four, the program should draw the following shape: Act Got +- * | | | | 1/* | 11/* | \\\*/// | | \\*// | | | | | ** +-- + | \\\*/// | \*// | | */ | | | | | /* | //*\\ | | 11/* +------- -+

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!