2 (a) Design a class named Rectangle with two private data members: length and width. Define 10 constructors and a destr
Posted: Sat May 14, 2022 2:39 pm
Do any one please.
2 (a) Design a class named Rectangle with two private data members: length and width. Define 10 constructors and a destructor for the class and write member functions to find the perimeter and area of a rectangle. Then define a class named Cuboid (representing a box) that inherits from the class Rectangle with an extra data member: height. Then write constructors and a destructor for the Cuboid class, and write member functions to find the surface and volume of the Cuboid objects OR (b) Assume we have the following classes in a polymorphic relationship. 10 Employee The Employee class is an abstract class. An employee has a first name, an initial, and a last name. A salary employee receives a fixed salary per month. An hourly employee receives wages based on the number of hours worked per month and a fixed rate/hour. Write the implementation details for all three classes. Salary Employee HourlyEmployee
2 (a) Design a class named Rectangle with two private data members: length and width. Define 10 constructors and a destructor for the class and write member functions to find the perimeter and area of a rectangle. Then define a class named Cuboid (representing a box) that inherits from the class Rectangle with an extra data member: height. Then write constructors and a destructor for the Cuboid class, and write member functions to find the surface and volume of the Cuboid objects OR (b) Assume we have the following classes in a polymorphic relationship. 10 Employee The Employee class is an abstract class. An employee has a first name, an initial, and a last name. A salary employee receives a fixed salary per month. An hourly employee receives wages based on the number of hours worked per month and a fixed rate/hour. Write the implementation details for all three classes. Salary Employee HourlyEmployee