Question: Create a class Light. Initialize variables in Light class: int brightness string color Initialize default constructor with default values 1 and black respectively. Create a

Create a class Light. Initialize variables in Light class: int brightness string color Initialize default constructor with default values 1 and black respectively.

Create a child class AdjustableLight. (Inherit from Light) Initialize parameterized constructor to set Brightness and color to 10 and white Create setBrightness function that sets brightness and setColor function that sets color Create a userInterface function that shows brightness and color of light and lets the user increase or decrease brightness and change its color until user presses (-1) to terminate the program.

USING C++ Inheritance

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!