Question: JAVA JAVA JAVA Using the UML diagram, implement the class called Rectangle. Your 1st constructor should set the length and width to 1. Your 2nd
JAVA
JAVA
JAVA
Using the UML diagram, implement the class called Rectangle. Your 1st constructor should set the length and width to 1. Your 2nd constructor should set the length and width to the parameter passed in. Area = Length * Width; Perimeter = 2 * Length + 2 * Width. Use getters only.
Rectangle -length: int -width: int +Rectangel) +Rectange(int, int) +calculateArea(): int +calculatePerimeter(): int
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
