Question: 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

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!