Question: . 1- Write an object-oriented program to compute the area of a rectangle, perimeter of a rectangle, volume of a rectangular prism, area of a

 . 1- Write an object-oriented program to compute the area of

. 1- Write an object-oriented program to compute the area of a rectangle, perimeter of a rectangle, volume of a rectangular prism, area of a square, and perimeter of a square. Test your program on the following data. Your program should have three class definition as follows. class area, class perimeter, class volume #Problem 1 Use area as super class; perimeter and volume as sub classes class area: Square are and rectangular area should be under the class area #rect area Perimeter of square and rectangle should be under the class perimeter #square area Volume of rectangular prism should be under the class volume pass Rectangle class perimeter(area): length = 2, width = 3, height = 4 #rect perimeter #square perimeter Square pass length = width = 2 class volume(area): #rectangular prism pass I,w,h = 2,3,4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!