Exercise: Simulating a Device Controls Hierarchy
Refine your Kotlin proficiency by developing a simulation of device controls with open and subclassed controls.
We'll cover the following...
Problem statement
Implement the following classes and methods to represent a hierarchy of device controls:
Create an open class called
DeviceControl
with primary constructor propertiesid
andisEnabled
.Implement the
enable
and ...