Question: 1 ) Please follow the Java program examples discussed in class on Circle and Rectangle, write Square.java to correctly define a class on Square. 2
Please follow the Java program examples discussed in class on Circle and Rectangle, write Square.java to correctly define a class on Square.
Write SquareDemo.java to demonstrate the Square class is properly defined and works correctly. SquareDemo.java must do the following:a Create squares with different sizes and store them in an array.b Output the size of squares.
c Increase the sides of the squares by
d Output the size, area, and perimeter of the squares after size changing.
e In all the above steps, please use loop if possible, to save your code. The output of area and perimeter must have two decimal places you may use System.out.printf to help format the output
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
