Question: please I need as soon as you can please EPP (10am) Fall 2018 Write a class that reads in a text file with the inventory

please I need as soon as you can please

EPP (10am) Fall 2018 Write a class that reads in a text file with the inventory of a used car store. Each line in the text file contains three pieces of information separated by whitespaces. These are the model name of a car, its license plate number, and its mileage. An example is given below (file data.txt): camry 2ABC334 102324 Corolla 7ABC234 12989 CRV Corolla 7LMN234 23745 Camry 2DEF334 142090 CRV Corolla 7ABC809 60026 Corolla 7EFG234 45056 Focus 5KNA305 105201 Camry 2DAF304 112805 7ABC564 24787 DEE564 42321 implerment a class car Inventory that reads in such a text file. The class should have the following public member functions: tilename): the constructor which takes in the filename . CarInventory (string of the data and reads in the data to its member variables int numberOfCars O : returns the number of cars in the store, ie, the number of lines in the file? (e.g., 10 for the data file shown above) string getModel(string license) : returns the model name as a stri input license plate number (e.g.. given 7LMN234, return Corolla) string getclosestMileage (int mileage) : returns the license plate number of the car which has the closest mileage below or equal to the input mileage. (e.g.. given 60000, return 7EFG234 since its mileage 45056 is closest to 60000). If there is no such car, retum the empty string. . pinted there mee her functions wil be caled tom the provided main program and the answers do not change the contents of this file) file part2.cpp You are free to add other (public/private) member variables and functions as needed Implement all your code in one header file called CarInventory.h . Class and filenames are case-sensitive. The class and filenames should be carInventory (not Carinventory, carinventory,...) Simplifying assumptions: The maximum number of cars in the database is 1,000,000 Model names and licence plate numbers are a single word without spaces Mileage is an integer You do not need to do any error-checking when reading the data file e Resources You are given files containing templates for a Stack, Queue, and Vector class. For each of the data structures, you are also provided with a test program. You may use none, any, or all of them if it will help you. You are also free to edit any of these files. All these files are poste in the "EPP Part 2 Files" section. You can also use the STL versions of any data structures File upload: Upload CarInventory.h, along with any data structure files that you used
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
