Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Project 4: Vehicle Inventory. 2 Write a program to read a text file containing information about vehicles and output the information First in the order.

Similar presentations


Presentation on theme: "1 Project 4: Vehicle Inventory. 2 Write a program to read a text file containing information about vehicles and output the information First in the order."— Presentation transcript:

1 1 Project 4: Vehicle Inventory

2 2 Write a program to read a text file containing information about vehicles and output the information First in the order read. Then in increasing order by price.

3 3 Kinds of Vehicles There are three kinds of vehicles: Cars Trucks SUVs Define a class corresponding to each kind of vehicle. Let all classes inherit from base class Vehicle

4 4 Input File The input file has the following information for all vehicles: Vehicle type (Car, Truck, SUV) VIN Manufacturer Model Year Retail Price The input file has one additional piece of information for each vehicle type: CarNumber of doors TruckLoad capacity in pounds SUVPassenger capacity

5 5 Input File The input file is a text file consisting of comma separated values. There will be no more than 100 lines. Example: Car,12345678,Honda,2008,15900,2 Truck,22345678,Ford,2006,11424,1500 Truck,32345678,Dodge,2009,26545,2500 SUV,42345678,Ford,2011,29900,12 SUV,52345678,Mercury,2007,13929,8 SUV,62345678,Cadillac,2006,21500,7 Truck,72345678,Chevy,2007,20900,2000 Car,82345678,Nissan,2009,16929,4 http://www.cse.usf.edu/~turnerr/Object_Oriented_Design/Downloads/ File vehicles.csv

6 6 Specifications Prompt the user for filename. Output a meaningful error message filename is invalid or an error is encountered. Don't just crash or die. Your program should work with any valid input file of up to 100 lines. Your output format should match the sample run shown on the following slide. Columns separated by tabs.

7 7 Sample Run

8 8 Development Environment You may develop your program on any system you like. But you should test the finished program on Circe. The same source files should compile and run on either Windows or Linux.

9 9 Ground Rules You may work with one other person. OK to work alone if you prefer. If you do work as a pair Both members are expected to contribute. Submit a single program. Both members should understand the program in detail. Do not share your code with other students. Before or after submitting the project. OK to discuss the project. Do not copy any other student’s work. Don’t look at anyone else’s program. Don’t let anyone look at your program.

10 10 Ground Rules Except for code posted on the class web site Do not copy code from the Internet or any other source. Write your own code.

11 11 Submission Project is due by 11:59 PM, Sunday night, March 13. Deliverables: Source code only..h and.cpp file for each class plus main.cpp Zip the files for submission. Put your source files into a Windows folder. Use the Windows “Send to Compressed Folder” command. Do not submit any other form of zipped folder (e.g. WinRAR, tar) If you have trouble zipping the files, submit the separate files. If you work with another student, include both names in the Blackboard submission comments. Other student should submit just a Blackboard comment including both names. End of Presentation


Download ppt "1 Project 4: Vehicle Inventory. 2 Write a program to read a text file containing information about vehicles and output the information First in the order."

Similar presentations


Ads by Google