PROJECT – Used Car
Dealership Database System
Design Due Date: May 21, 2003 (in
class)
Implementation Due Date: June 4, 2003
(in class)
The local used car superstore has requested help in designing a new database
system to help run their business better. Somehow, you "were
volunteered" for the project. You are told that the new system must be developed
using an object-oriented design and must be written in C++. To speed up
development and minimize errors, you are to reuse your debugged
List class. (Note: Your List Lab that you use MUST be running with 100%
accuracy for its reuse in the project)
You need to deliver the project in two phases:
- Design: A sample design report is here. Your report will
have a complete high level and low level design of the class, its
functions and data members. Design report is due on May 21, 2003
(in class).
- The program implementation.
Program implementation is due on June 4, 2003 (in class).
Data Specifications
The system tracks cars, clients and sales.
For each car, the system must keep the following information:
- manufacturer (string)
- model name (string)
- how much the car actually
cost the company (decimal number)
- color (string)
- year the car was built
(integer)
- number of miles on the
odometer – that is the miles driven (integer)
- whether the car is front
wheel drive (FWD), rear wheel drive (RWD), or all wheel drive (AWD)
(string)
- a car identity number (a
positive integer that is unique for every car that has ever been in the
system). This number is generated by the database when the record is
created; it is not entered by the user. (Unique positive integer)
- whether the car has been sold
(Y/N). (Character)
For each customer, the system must keep track of the following information:
- first name (string)
- last name (string)
- street address (string)
- town (string)
- state (string)
- zip code (string)
- customer id (a positive
integer that is unique for every customer who has ever been in the system)
For each sales record, the system must keep track of the following
information:
- the car id number
- the customer id number
- the actual sale price
- the date of the sale
(string)
- sales record id (a positive integer
that is unique for every sales record that has ever been in the system)
User Interface
Commands
- add a car: prompt the user
for the car information and add the car to the database.
- delete car: prompt the user
for car identify number, and if it is found, delete the car from the
database.
- sell a car: prompt the user
for all the information needed for a sales record and add the sales record
to the database.
- search for car: the user can
perform a search by manufacturer, price (all cars within $1000 of the
given price), year (all cars within one year of the given year), color,
miles on the odometer (all cars within 5000 miles of the given number).
The system will display all cars that match the search requirements.
- add a customer: prompt the
user for all the information to generate a customer record and add the
customer record to the database.
Database information
- Files: There are to be 3
files, one for each of the 3 types of records (car, customer, sales
record). The data for each type of record is to be stored in files called
"car.dat",
"customer.dat", and "sales.dat". Please use
EXACTLY those names.
- Loading the database
information: the data files are automatically read in when the system
starts. If any of the files for holding records doesn’t exist, an empty
file with the correct name should be created.
General Comments
Many interface commands should only work on cars that are in stock (i.e.,
have not been sold).
You are guaranteed good input data from the test files. However, you must
perform error checking for your input/output (I/O) to ensure that you detect
any serious I/O problems.
Whenever something has not been explicitly specified, you may do anything
reasonable that works.
A grading sheet for the project will be provided before a week of the due
date.
A sample design report is here. Your report
will have a complete high level and low level design of the class, its
functions and data members.
The data files for the customer, car and sales are here car.dat
customer.dat
sales.dat. Description of these input files is here.
Last
modified: May 08, 2003.