Create a class named "Rectangle" having length and width as attribute. There should be behaviors to set the values of length and width (individually and collectively), and get their values...


Create a class named

Extracted text: Create a class named "Rectangle" having length and width as attribute. There should be behaviors to set the values of length and width (individually and collectively), and get their values individually. There should also be behavior to display the perimeters and area of the rectangle. Create another class named as Main which has two objects of Rectangle (r1, r2) having length (3.2, 20) and width (4.5, 36) respectively. Also display the length, width, perimeter and area of both rectangles.

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here