Upon successful completion of this assignment, you will have demonstrated the abilities to:
- Uses streams to read and write data from/to different types of sources/targets
- Identify classes, objects, members of a class, and relationships among them needed for a specific problem
- Explain the concept and demonstrates the use of Polymorphism, Encapsulation, Abstraction, and Inheritance in java
- Understand and implement a complete program using a collection framework
- Describe to your instructor what you have learned in completing this workshop.
The car showroom, named Minh Trang BMW, has a list of BMW cars. BMW brands are stored in a text file, named brands.txt, and cars are stored in a text file, named cars.txt
The manager of the showroom needs a Java console application in which operations must be supported:
- List all brands
- Add a new brand
- Search a brand based on its ID
- Update a brand
- Save brands to the file, named brands.txt
- List all cars in ascending order of brand names
- List cars based on a part of an input brand name
- Add a car
- Remove a car based on its ID
- Update a car based on its ID
- Save cars to file, named cars.txt
- Constraints on brands:
- Brand ID can not be duplicated.
- The brand name can not be blank.
- The sound manufacturer can not be blank.
- The price must be a positive real number.
- Constraints on cars:
- Car ID can not be duplicated.
- Brand ID must have existed and it must be inputted using a menu.
- Color can not be blank.
- Frame ID can not be blank and must be in the “F00000” format and can not be duplicated.
- Engine ID can not be blank and must be in the “E00000” format and can not be duplicated.