Question: -1. Design a class name Square that defines a square geometric shape. The class must have a data member named side that defines the length

-1. Design a class name Square that defines a square geometric shape. The class must have a data member named side that defines the length of each side. Then define two member functions, getPeri and getArea, to find the perimeter and area of the square shape. Now define a Cube that defines a cubic shape and inherits from the Square class. The class Cube needs no new data members, but it needs the member functions getArea and getVolume. Provide the appropriate constructors and destructors for both classes. 6-2. Design a clamo a a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
