Question: Need help writing a program for #1 in java! 1. Design a Rectangle class that has the following data fields: width (double) height (double) Define
Need help writing a program for #1 in java!

1. Design a Rectangle class that has the following data fields: width (double) height (double) Define the following methods in the class: 2 constructors: the first constructor will initialize width and height to default values of 1.0; the second constructor will use input arguments to initialize width and height; A method to return width of a Rectangle object; A method to return height of a Rectangle object; A method to return area of a Rectangle object; Test: create 3 Rectangle objects; display width, height of these rectangle objects; calculate the total area of all these 3 rectangle objects
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
