Question: 1. Write a Java program named Rectangle that has the static methods main, cal Area and ixSquare The main method should: 12 Marks Allow the

 1. Write a Java program named Rectangle that has the static

1. Write a Java program named Rectangle that has the static methods main, cal Area and ixSquare The main method should: 12 Marks Allow the user to enter the length and dreadth of a rectangle. 10.5 Mark! 2. Call the method cal Arce by sending the length and breadth 10.25 Mark! 1. Print the returned result by cal Area method in two decimal places. 10.25 Marki 4. Call the method fxSquare by sending the length and breadth 0.25 Mark! 5. Check the returned result from iSquare method is trae or not. 10:25 Mark] 6. If it is true then print Rectangle is Square" 0.25 Mark! 6. Otherwise print "Rectangle is not Square" 10:25 Mark The salarca method should: 11.5 Marks 1. Receive the length and breadth 10.5 Mark] 2. Calculate the area and return the result I Mark! The iSquare method should: [1.5 Marks] Receive the length and breadth 10.5 Mark! 2. Check the Rectangle is Square or not. 10.5 Mark! 3. If it is square return true 10.25 Mark 4. Otherwise return false 10.25 Mark

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!