Report Assignment java
Report Assignment java
Assignment Overview:
The goal of this assignment is to build a management program for a vehicle showroom. The program
should have the following basic functions:
-Delete vehicles by ID
-Display the list of all vehicles, both unsorted and sorted by price in descending order
The showroom contains two types of vehicles - cars and motorbikes. Cars have properties like ID, name,
color, price, brand, type, and year of manufacture. Motorbikes have properties like ID, name, color, price,
brand, speed, and whether a license is required. Motorbikes also have a special "makeSound" function
that prints "Tin tin tin".
The assignment specifies the requirements, constraints, and expected behavior for each of the required
functions. It also mentions that the lecturer will only explain the requirements once, during the first slot
of the assignment.
Report Findings:
The assignment requires building the appropriate data structures and utilizing OOP principles like
classes, abstract classes, and interfaces.
It specifies that only one collection should be used to store all the vehicles.
+ File I/O:
The program must load all vehicle data from a file named "vehicles.txt" during initialization.
Updated vehicle data must be stored back to the same file upon program exit.
CRUD Operations:
The program must implement the basic Create, Read, Update, and Delete (CRUD) operations for
managing vehicles.
Add new vehicles, update existing vehicles, delete vehicles by ID, and search for vehicles by name or ID.
For motorbikes, the "makeSound" function must be called when displaying the sorted list.
+ Error Handling:
The program must handle all errors and not allow interruptions to the program flow.
+ User Interface:
The program should display a menu and allow the user to select options.
After each task, the program should return to the main menu and wait for the user's next selection.
The assignment specifies a target of 50 lines of code (LOC) for most of the required functions.
Conclusion:
This assignment focuses on building a comprehensive vehicle management system using object-oriented
programming principles. It requires the implementation of various CRUD operations, file I/O, sorting, and
error handling. The assignment also emphasizes code quality, modularity, and adherence to the specified
requirements and constraints.