Question: Write a rectangle class. 1. Make all the attributes private. 2. Write a method to calculate area. 3. Declare an array of rectangles of length
Write a rectangle class. 1. Make all the attributes private. 2. Write a method to calculate area. 3. Declare an array of rectangles of length 5. 4. Input 5 lengths and widths from the console. 5. Print their area
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
