Assignment 10 Car Sales Report
CISP 300 - Chapter 10 - File
BRAND-WISE
SALES REPORT
CARS JUNE 2018
Car Report Arc Auto Sales is a new car dealership in town that sells BMWs, Toyotas, Hyundais and
Chevys. Arc Auto Sales has 4 salespersons on site: Andrea, Barry, Charlie, and Dominic. You are going to
open the sales.dat file (provided with this assignment), read the records from the file and print out a
sales report.
Each record in the file will be formatted as follows:
Example:
salesperson, carBrand, carModel, price
Barry, Chevy, Silverado, 42000
User Inputs
(records in
sales.dat file)
1. salesperson
2. carBrand
3. carModel
4. price
a. open sales.dat file
b. read and store all records in an array
Processing
c. close sales.dat file
d. calculate total number of each car brand sold
e. calculate total number of each car model
f. calculate total number of cars each salesperson sold
g. calculate total cost of cars sold by each salesperson
Outputs
Print title of report
Print d - g above, each on its own line
Notes/Hints
Always use meaningful variable names.
Always print descriptive labels on the outputs