You are expected to answer the question in C#.
Design three classes: Rectangle (base class), Cuboid (derived class), and ColoredCuboid (second-level derived class).
Rectangle Class (Base Class)
• Protected data members:
o width (type: double) and length (type: double).
• Default Constructor: Rectangle() initializes both width and length to 1.0.
• Parameterized Constructor: Rectangle(double width, double length) sets the width
and length based on the input.
• Methods:
o GetArea(): Calculates and returns the area of the rectangle.
Cuboid Class (Derived Class from Rectangle)
• Private data member:
o height (type: double), initialized to 1.0 by default.
• Default Constructor: Cuboid() initializes the height to 1.0.
• Parameterized Constructor: Cuboid(double width, double length, double height) sets the width, length (inherited from Rectangle), and height.
• Methods:
o GetVolume(): Calculates and returns the volume of the cuboid.
o GetSurfaceArea(): Calculates and returns the surface area of the cuboid.
ColoredCuboid Class (Derived Class from Cuboid)
• Private data member:
o color (type: string), default value set to "white".
• Default Constructor: ColoredCuboid() initializes color to "white".
• Parameterized Constructor: ColoredCuboid(double width, double length, double
height, string color) sets the width, length, height (from Cuboid), and color.
• Methods:
o DisplayDetails(): Prints the width, length, height, color, surface area, and
volume of the colored cuboid.
Tasks
1. Create 2 instances of ColoredCuboid:
o The first instance should use the default constructor.
o The second instance should use the parameterized constructor with values for
width, length, height, and color.
2. For each instance, output the following details using the DisplayDetails() method:
o Width, length, height, color, surface area (GetSurfaceArea()), and volume
(GetVolume()).