Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

implement arraylist data structure In this assignment, you are going to build a program that can help rental car companies to manage their rental fleet using your own method of building an arraylist data structure. Requirement: - done in c++ - build ArrayList class as container. Size: 30 - build Car class to represent a car. - An ArrayList object is to hold objects from Car. ArrayList class should support following functions: - constructor - add (to append the object) - add (add at a specific index) - delete (by index) - search (an object) - traverse (i.e. print the whole list) - size (return the size of the list, not the capacity) Car class should have following fields: - id (int) - make (string) - model (string) - category (string. must be from compact, mid-size, full-size, c-suv, m-suv, f-suv, mini-van, truck) - constructor - accessors and getters. Instructions: - make up 15 cars and store them into the file: cars.data - load these cars' info from the file, initialize 15 Car objects, place them into the Arraylist object - 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 ---- search by id ---- search by make ---- search by category -- 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 - main() should serve mainly as a dispatcher, i.e. it calls other funcitons according user's input. 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What are some areas of gender-role strain for men and women today?

Answered: 1 week ago