Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create the header and implementation files for the derived class named dimmerSwitch. The constructor should receive voltage, max amps, and stepping value (to set the
- Create the header and implementation files for the derived class named dimmerSwitch.
- The constructor should receive voltage, max amps, and stepping value (to set the number of units stepUp and stepDown go).
- It adds the ability to set and get a intensity value from 0 to 100% (unsigned) on and checked if the switch is dimmed.
- The switch should default to off, however, it should default to 100% intensity the first time it is toggled or turned on.
- Whenever the switch is toggled on or off, it should return to the the previous intensity.
- StepUp/StepDown should change the intensity in step increments or decrements. Be careful, you will need to ensure intensity is never over 100%.
- isDim should return true when the switch is ON and it is not 100% intensity.
- getCurrentLoad acts the same as electricSwitch, except for when it is dimmed, it will be a ratio
In C++ language with explaination. Thank you.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started