Question: A refrigerator has a motor, a temperature sensor, a light, and a door. The motor turns on and off primarily as prescribed by the temperature

A refrigerator has a motor, a temperature sensor, a light, and a door. The motor turns on and off primarily as prescribed by the temperature sensor. However, the motor stops when the door is opened. The motor restarts when the door is closed assuming the temperature is too high. The light is turned on when the door is opened and is turned off when the door is closed. (a) Identify the classes in the preceding description of a refrigerator, (b) identify the methods for each of your classes, and (c) provide implementations for each class in Kotlin. A refrigerator has a motor, a temperature sensor, a light, and a door. The motor turns on and off primarily as prescribed by the temperature sensor. However, the motor stops when the door is opened. The motor restarts when the door is closed assuming the temperature is too high. The light is turned on when the door is opened and is turned off when the door is closed. (a) Identify the classes in the preceding description of a refrigerator, (b) identify the methods for each of your classes, and (c) provide implementations for each class in Kotlin
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
