Assignment Task
Task
Background:
A-Plus Writing Help For University Students
Get expert assistance in any academic field. All courses and programs covered.
Get Help Now!‘Green Guard’ is a garden maintenance company that is growing quickly. The company is struggling to keep track of all their equipment and have engaged you to develop a program to assist them with identifying when their equipment needs to be replaced.
‘Green Guard’ has three categories of equipment:
- Standard equipment (i.e. Rakes, Brooms and Shovels).
- Fuel powered equipment (i.e. Lawn Mowers, Chainsaws).
- Battery powered equipment (i.e. Edge Trimmers, Brush Cutters).
The program will need to be able to manage:
- The display of common information about all equipment.
- The display of information relevant to specific equipment categories.
- When a piece of equipment needs to be replaced.
Requirements:
In terms of when equipment needs to be replaced, that depends on the type of equipment:
- Battery Powered Equipment needs to be replaced when the equipment warranty runs out using the following formula:
Replacement Year = Length of Warranty + Purchase Year i.e. for a battery powered item with a warranty of 2 years purchased in 2022
Replacement Year = 2 + 2022
Replacement Year = 2024
- Fuel Powered Equipment needs to be replaced after being used for more than 500 days.
The number of days that a piece of equipment is used in a year is approximated to determine when it should be replaced using the following formula:
Replacement Year = Maximum Days / Days Usage Per Year + Purchase Year i.e. for a fuel powered item that is used approximately 100 days in a year purchased in 2022
Replacement Year = 500 / 100 + 2022
Replacement Year = 2027
- Standard equipment needs to be replaced a maximum of 7 years after it was purchased, but this is also dependent on the durability of the equipment. A durability factor is used to assist in determining the replacement date. The durability factor is a number between 0 and 1. The overall calculation of the replacement year is made using the following formula.
Replacement Year = Maximum Lifespan * Durability Factor + Purchase Year i.e. for a standard item with a durability of 0.6 purchased in 2022
Replacement Year = 5 * 0.6 + 2022
Replacement Year = 2025
Replacement years should always be rounded up.
Tasks:
Task 1 – Creation of NetBeans Project.
You are given a project folder “xxx_Surname_CSE1IOX_Assessment_1” with a project named ‘ReplacementTest’ as a starting point. The class ‘ReplacementTest’ is the main class. The aim of this class is to enable testing to determine if all aspects of the program are working as expected.
You can use it to run testing as you develop your project and also once it is complete.
In the name of the Project Folder:
– you should replace the String ‘xxx’ with your Student ID
– you should replace the String ‘Surname’ with your surname.
Task1 – Creation of Abstract Equipment Class.
You have determined that the program would be best managed using an abstract class as a starting point.
The Equipment abstract class will feature standard properties and methods that are common between all equipment categories.
You will need to create the abstract class ‘Equipment’ in the java file ‘Equipment’ as outlined below:
- There are three class properties (make, model and purchaseYear) – you will need create methods to ‘get’ and ‘set’ each of these.
- You are to create an abstract method called ‘replacementYear’. This is only the shell of amethod that will be overridden in child classes i.e. there is no need to implement this method.
- You are to create a method called ‘showDetails’ that displays the ‘make’, ‘model’, ‘purchaseYear’ and ‘replacementYear’ of equipment as one string.
Task 2 – Creation of Battery Powered Equipment Class.
You are to create a class named ‘BatteryPoweredEquipment’ in the java file ‘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) .
Task 3 – Creation of Fuel Powered Equipment Class.
You are to create a class named ‘FuelPoweredEquipment’ in the java file ‘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).
Task 4– Creation of Standard Equipment Class.
You are to create a class named ‘StandardEquipment’ in the java file ‘StandardEquipment’. This class is designed to keep track of the replacement of standard (non-powered) equipment such as rakes, brooms and shovels.
You will need to create the class as outlined below:
- The ‘StandardEquipment’ class should inherit from the ‘Equipment’ class (take advantage of super)
- The class should have a constant value that sets the maximum time an item can be retained
- The class should have a property to store the durability of individual items and should also have associated functions to get and set the durability
- At class initialisation you should be able to set the make, model, purchase date and durability of the item
- The replacementYear function should be overridden to return the replacement year (based on calculations outlined in the requirements section)
Task 5 – Testing Using Replacement Testing Class. This class should have already been created as part of Task 1.
As part of the ‘main’ method of this class you should:
- Create two instances of each of the three types of Equipment classes using dummy data
- The output should be according to what has been defined in the ‘showDetails’ method in each class. Your output should be starting to look like that as outlined under Figure 1 – Expected Output (the exceptions are covered as part of the next Task)
Task 6 – Exceptions.
You will need to run some checks on the validity of data been entered. It is expected that the program will throw an exception in the following circumstances:
- If the warranty of a Battery Equipment item is 0 or less
- If the durability of a Standard Equipment item is 0 or less OR greater than 1
You must have a catch block that catches these exceptions and displays an appropriate error message. (You can use the getMessage method of the Throwable class to achieve this) You only need to alert the user to there being an error with the entered data. You do not need to manage this in any other way at this point.
Task 7 – Comments.
Ensure you include appropriate comments in your code including:
- Purpose of classes
- Purpose of methods
- Explanatory notes for any potentially confusing items
This CSE1IOX-IT/Computer Science Assignment has been solved by our IT/Computer Science Expert at TV Assignment Help. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing Style. Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turn tin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
Welcome to our Online Essay Writing Agency. Securing higher grades costing your pocket? Order your assignment online at the lowest price now! Our online essay writers are able to provide high-quality assignment help within your deadline. With our homework writing company, you can order essays, term papers, research papers, capstone projects, movie review, presentation, annotated bibliography, reaction paper, research proposal, discussion, or another assignment without having to worry about its originality – we offer 100% original content written completely from scratch
We write papers within your selected deadline. Just share the instructions