Task 2 – Creation of Battery Powered Equipment Class
You are to create a class named ‘BatteryPoweredEquipment’. This class is designed to keep track of the replacement of battery powered equipment such as Edge Trimmers and Brush Cutters.
You will need to create the class as outlined below:
• The ‘BatteryPoweredEquipment’ class should inherit from the ‘Equipment’ class (take advantage of super)
• The class should have a property to store the warranty (measured in years) of individual items and should also have associated functions to get and set the usage.
• At class initialisation you should be able to set the make, model, purchase date and warranty of the item
• The replacementYear function should be overridden to return the replacement year (based on calculations outlined in the requirements section)
Class - BatteryPoweredEquipment
Properties
Students succeed in their courses by connecting and communicating with an expert until they receive help on their questions
Consult our trusted tutors.