This assignment consists of implementing an application using the

Assignment 2

Overview

 

This assignment consists of implementing an application using the techniques learned in the first half of the course. Examples on how to use file operations, random number generation, the standard template library.

 

Your program must compile and you must provide all of the source code files so that I can also compile and run your program (e.g. provide me with all files ending in .h and .cpp that are necessary to compile your program). You may use any resources, books, or notes. Apart from your textbook and provided examples, you must mention all resources that you use as comments next to the applicable lines of code or the appropriate functions within your source code or within the main comment at the top of your source code file.

 

Implementation

 

The program will consist of implementing a vehicle tracking system for a rental car company. The implementation will include several attributes related to each vehicle in the rental car company’s inventory, and the data will be managed in a global linked list in memory. The program must use the “list” API in the C++ standard template library. All of the attributes associated with each vehicle will be stored as a single object within a global linked list data structure. The program must implement at least one class that will hold the following variables:

 

recordId —

An integer that consists of a number starting at 100 for the first vehicle in the linked list and automatically incremented by 1 for each subsequent vehicle entered into the linked list. The user will not enter this number.

VIN —

A string to represent a fictitious vehicle identification number (VIN) associated with the given vehicle. The fictitious VIN will consist of a randomly generated set of 17 characters and numbers. The fictitious VIN must be in the format:

CCCC###CC##CCC##C

where C is a randomly generated character and # is a randomly generated number. Again, the user will not enter the fictitious VIN.

year —

An integer consisting of the four digit year that the vehicle was made. The program must re-prompt the user to re-enter the year if it is not a valid four digit year from 1906 – 2016.

make —

A string to indicate the make of the vehicle. For example, Ford, Toyota, etc.

model —

A string to indicate the model of the vehicle. For example, F150, Prius, etc.

color —

A string to indicate the color of the vehicle.

mileage —

An integer to hold the current odometer mileage for the vehicle.

forSale —

A Boolean flag to indicate that the vehicle can be put up for sale. This flag will automatically be set by the program if the entered mileage is over 100,000 miles. The user will not enter the data for this field.

 

Provide the appropriate accessor methods to set and get the data for each of these class variables. For example setYear(int year) and getYear(). The main program must provide the following functionality:

 

When the program is first started, it must read a data file called rentalCars.dat. The program should not prompt the user for the name of the data file. If the file exists, the program will load the data for each vehicle entry into the global linked list data structure. If the file does not exist, the program will start with an empty linked list.

 

Provide a simple text-based user interface similar to the Book Inventory example that manages the all of the vehicle entries in the global linked list. Each vehicle entry must be placed in this global linked list as an object that holds all of the information

associated with a given vehicle. The program interface will allow the user to do the following:

 

Display Inventory – displays all of the vehicles in the global linked list. This feature will display all of the fields associated with the each vehicle entry. In addition it must also print the total number of vehicles that are in the linked list.

 

Enter Vehicle – allows the user to enter all of the fields associated with a given vehicle, except for the recordId, VIN, and forSale fields. These fields will be automatically generated by the program as previously mentioned. After the data fields are entered, the program will place the vehicle entry in the global linked list data structure that is kept in memory.

 

Delete Vehicle – allows the user to delete a vehicle from the linked list using the recordId as the key. The program will display a message if the entry is not found in the linked list.

 

Search by Make – allows the user to find and print all of the vehicles for given vehicle make. The program will prompt the user to enter the vehicle make and will display a message if there are no vehicles in the global linked list for a given vehicle make.

 

Modify Vehicle – allows the user to modify all of the fields for a given vehicle entry (except for the recordId, VIN, and forSale) in the linked list. The program must use the VIN as the key to find the entry to modify. For simplicity, the program may re-prompt the user to re-enter all of the fields associated with a vehicle; but it must reuse the recordId, VIN, and forSale values. Display a message if the vehicle is not found in the linked list.

 

Exit system – before the program exits, it must save all of the data in the linked list to the data file. I recommend using a standard text file with one field per line. At this point, if the file does not exist, the program will create it.

 

Hints and Tips

 

First, work on the feature that allows the user to enter a vehicle along with all of its fields. Next, work on the display feature that will show all of the vehicles and their associated data contained within the linked list. Next, make sure your program can read and write one record to and from the data file. Then expand the program to read and write all records to and from the data file. The data file functions for this can be modeled after those in File Operations example and the display and enter functions that you will create. Finally, work on the search, modify, and delete features.

 

 

 

Calculate the price of your order

Choose an academic level, add pages, and the paper type you want.
To reduce the cost of our essay writing services, select the lengthier deadline.
We can't believe we just said that to you.

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Why is Purdue Papers the Most Helpful Essay Writing Service for You?

  1. Custom-written and plagiarism-free papers: Our authors create their work from scratch. Before presenting them to clients, we routinely verify them for signs of plagiarism. Our quality assurance group also double-checks and fixes any grammatical errors, assuring that all of our authors adhere to the same standards of writing.
  2. The significance of timely delivery cannot be overstated, and we consistently strive to meet or exceed our clients' deadlines. Regardless of the short time frame, you can count on our writers to get the job done. We always have a team of writers ready to go, even if the deadline is only six hours away.
  3. Customer Satisfaction: Our customer service representatives are the best in the business and have a wealth of knowledge in dealing with clients. All our customer service representatives are trained to listen and reply promptly until you are satisfied with their service. To ensure you're happy, our expert writers will strictly follow the criteria to generate a special report. Our customer service may be contacted by chat, email, or phone. In addition, we provide round-the-clock assistance to all of our clients.
  4. Confidentiality: Our systems are safe, and your information is always protected. We're constantly looking for new facts when it comes to finishing your work. We use a safe and secure payment channel. Since our ordering process is completely anonymous, you don't have to provide any credit card information to place a purchase with us.
  5. Highly Trained Authors: Our writers have received extensive training and are committed to delivering only the best papers. They are fluent in APA, MLA, HARVARD, IEEE, CHICAGO, and AMA referencing styles. To meet your expectations, our skilled writers always pay close attention to your instructions.
  6. Lowered prices: We have set prices that are already discounted. Our prices are the best and affordable for all our esteemed customers.

Let Professionals Take Care of your Academic Paper