Question: Java Task 1: Imagine you are developing a software system for a smart home. Implement a class hierarchy for smart home devices using inheritance. The
Java

Task 1: Imagine you are developing a software system for a smart home. Implement a class hierarchy for smart home devices using inheritance. The base class is SmartDevice, with properties device Id (int) and a method TurnOn(). . TurnOn(): Display a message that the device is Turning on Create subclasses for specific types of devices (SmartBulb and SmartThermostat) that inherit from the SmartDevice class. Each subclass should have its own method to represent a specific functionality (changeColor() for SmartBulb, adjustTemperature() for SmartThermostat). . ChangeColor() : Display a message that Smart bulb is changing color. . adjustTemperature(): Display a message that Smart thermostat is adjusting temperature. write code here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
