The code contained in the CarOps.zip file is given, which includes an implementation of a subset of classes identified in the exemplary solution of GP3. Complete appropriate code in TODO 1 - TODO 12 within the classes of CarOps.zip, thus
so that the application compiles and supports object creation functionality of the mo- model, print their data and perform calculations related to the component, and to support the ability to implement the functionality to create objects of the field model, print their data and perform calculations related to the component. of a repair. The main class of the application is CarOps.java, which when executed (call to
main method) performs the following functionality:
-
Constructs 3 objects of the RepairWork class and places them in a list of objects of type TaskRepair. The objects created have the following data: o RepairWork1("Oil change", 20 Euro) o Repair Job2('Change cabin filter', EUR 5) o Repair job 3 ('Brake maintenance', 30 euro)
-
Constructs 6 objects of the TypeAllow class and places them in a list of objects of type TypeAlternative. The objects created have the following data: o TypeAttribute1("4lt oil packaging", 30€) o TypeAttribute2("Oil filter", 20€) o Type of Option3("Cabin filter", 30€) o Type4("Front wheel brake pad", 5€) o Option Type5("Rear wheel brake pad", 5€) o Option Type6('Brake fluid', €10)
-
Manufactures 2 objects of the Repair class and connects them to suitable objects that representing the repair work and the use of spare parts carried out on the The items are associated with the repair work and the items that were used to carry out the repairs. It then adds them to a list of objects. The objects that created have the following data: o Repair1: includes execution of the tasks RepairTask1 and WorkRepair2 and use of one (1) piece of each of the spare parts Part Type1, Part Type2 and Part Type3. Η duration of the repair is 1 day. o Repair2: includes the execution of the Repair Work3 and the use of 4 pieces of the Type4, 4 pieces of Type5 and 1 piece of Type5 and 1 piece of Type4. TypeSubstitute6. The duration of the repair is 2 days.
-
Prints on the screen the details of Repair Jobs, Spare Parts Types and Repairs, by traversing the above lists of items using repetition structures. Specifically: o For each Repair Job, it displays its name and cost on the same line, o For each type of Spare Part, it displays on the same line the name and cost per spare part For each spare part, the cost and cost per piece is shown on the same line, o For each Repair, it shows on the same line the duration of the repair in days and the cost of the repair total cost of the repair. It should be noted that the total repair cost is calculated using the getTotalCost() method belonging to the Repair class. Η method calculates the cost as the sum of the cost of the work and the cost of the costs of the spare parts used in the repair. The cost of each spare part usage is obtained as the product of the cost of the specific type of spare part and the quantity used in the repair. As far as the cost of work is concerned, it is calculated as follows by summing up the individual costs of the work performed as part of the repair.
In the text of your paper (docx or pdf) for topic 1 you should include the full code of the classes of the implementation, as derived after filling in the blanks TODO 1 - TODO 12. You will you should also indicate in which environment the development has been done, whether the code is complete and executed correctly, and anything else you consider useful. Submitting your work will also include a zip file with the complete code, as derived from the completion of the TODO 1 - TODO 12 (zip file of the Eclipse or BlueJ project directory). Appendix A of this document lists the code included in the CarOps.zip file.