Classes and objects
Letâs consider a digital wristwatch as an object. We can consider it being composed of a battery, an LCD display, time, and date. Typical operations that can be done on the watch include turning it on or off, it can turn on when the battery has enough power (> 5%). When it is on, a user can check the time, the time is displayed on the screen. They can set the time (hrs and minutes) as well as set the date (day, month, and year). The battery is rechargeable that when the watch is connected to a charger, it increases the capacity of the battery. Use this information to answer the questions that follow. .Create classes for the objects, battery, display, time, and date. Implement their respective attributes and operational behaviours. Create a class digital clock that demonstrates the composition relationship or aggregation relationship with the classes implemented in (a). Implement a constructor that enables the initialisation of the digital clock to have the the time date and battery capacity to 90%