Question
Create Class AirConditioner Create Variables int temperature string power (on/off) Create respective getter and setter methods Create Display Function that shows power state and temperature
Create Class AirConditioner Create Variables int temperature string power (on/off) Create respective getter and setter methods Create Display Function that shows power state and temperature Create class Remote and Inherit AirConditioner Create SwitchOn function that sets power to"ON" Create SwitchOFF function that sets power to"OFF" Create IncreaseTemperature function that increments temperature Note: temperature should not increase beyond 30C Create decreaseTemperature function that decrements temperature Note: temperature should not decrease beyond 16C Only Update Temperature if power is set to On otherwise temperature is set to default 16C and must not get updated. Use your Display Function in AirConditioner to switch on AirConditioner and increment temperature to max possible temperature and show power state and temperature on each increment. Also, switch power to Off and show that temperature cannot be updated USING INHERITANCE IN C++
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