Question: Java Create a program for a car dealer to use where you have a class for Salesman, Cars, and the Records of sale. 4 salesman
Java
Create a program for a car dealer to use where you have a class for Salesman, Cars, and the Records of sale. 4 salesman and 4 cars to start with but have array size for 50 cars, have space for 100 records in array. The program should have 6 options in the menu. buy car, sell car, show inventory, show salesman, show sales records, and exit.
Salesman class - Name, ID number, Commision rate, Total commisions earned, Totals number of sales
Car class - Year, make, model, vin, color, buying price, and selling price
Record class - Car, Salesman, dealer profit, and date
This program is meant to be a way for a car dealer to track their sales
MENU DETAILS
Buy Car: Should obtain all information from the user on a car that was purchased by the dealer and store it in a record. Create a new object for the Car that was purchased . Create a new Record. Update the Car and Record arrays accordingly.
Sell Car: The user should only be able to sell a car that is in the inventory. You may want to show a numbered list of cars in the inventory and let the user choose from the list. Let the user choose a salesman in the same way. Update the Salesmen object that sold the car and update the record array for the sale.
Show Inventory: Use a for loop and a display() method to show all of the cars and their data. Display the total number of cars and their net worth at the end of the report.
Show Salesmen Show all stats for each salesman at the dealership. At the end of the report rank the salesmen in order based on highest commissions.
Show Sales Records Show all records for cars that have been bought and sold. Show the total number of cars purchased, total number of cars sold and total net profit of the dealer.
Exit Offers a confirmation message and then kills the program if the user agrees.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
