Question: In this assignment, you are going to build a program that can help rental car companies to manage their rental fleet. Requirement: - use std::vector

In this assignment, you are going to build a program that can help rental car companies to manage their rental fleet.

Requirement:

- use std::vector as main data structure.

- build Car class/structure to represent car objects. Provide default constructor and parameterized constructor.

- A vector object is to hold Car objects. Car class should have following fields: - id (int)

- make (string)

- model (string)

Instructions:

- make up 5 cars and save them into a file: cars.data

- load these cars' info from the file, initialize 5 Car objects, place them into the vector

- if new cars are added by user, they should be appended to the cars.data file when exiting the program - design a menu-based user interface that allows following operations:

-- search by id

-- search by make

-- search by model

-- add a new car (new car id cannot be same as existing ones)

-- delete an existing car by id

-- list all cars

-- exit the program

Do not forget to submit cars.data!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!