Question: IN JAVA Design a class named Rectangle to represent a rectangle. The class must have the following: double data fields named width, and height. The
Design a class named Rectangle to represent a rectangle. The class must have the following: double data fields named width, and height. The default values are 1 for both width and height. A no-argument constructor that creates a default bag. A constructor that creates a rectangle with the specified width and height A getParameter() method to return the perimeter. AgetArear() method to return the area of the Rectangle. . . Create two Rectangle objects. One with width 4.0 and height 10.0. The other object has width 6.3 and height 10.5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
