Question: Create a .java file named Quadrilateral.java. This program should ask the user to enter a length and a width (these do not have to be
Create a .java file named Quadrilateral.java.
This program should ask the user to enter a length and a width (these do not have to be integers).
If the length is equal to the width, the program should output Its a square!.
If the length is not equal to the width, the program should output Its a rectangle!.
The program should then increase the width by one and determine whether the dimensions still produce a rectangle or square.
This program should work for any length or width entered
Sample Output:
Enter the length: 16.2
Enter the width: 15.2
Its a rectangle!
The width is now 16.2.
Its a square
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
