Task 3 – Creation of Fuel Powered Equipment Class
You are to create a class named ‘FuelPoweredEquipment’. This class is designed to keep track of the replacement of fuel powered equipment such as lawn mowers and chainsaws.
You will need to create the class as outlined below:
• The ‘FuelPoweredEquipment’ class should inherit from the ‘Equipment’ class (take advantage of super)
• The class should have a constant value that sets the maximum number of days an item can be used for.
• The class should have a property to store the usage (measured in days per year that an item is used) 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 usage of the item
• The replacementYear function should be overridden to return the replacement year (based on calculations outlined in the requirements section)
Class - FuelPoweredEquipment
Properties
Students succeed in their courses by connecting and communicating with an expert until they receive help on their questions
Consult our trusted tutors.