Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For JAVA Create classes for Salesmen, Cars and Sales Records Create an array of 3 salesmen, 50 Cars, and 100 records Create your classes according

For JAVA

Create classes for Salesmen, Cars and Sales Records Create an array of 3 salesmen, 50 Cars, and 100 records Create your classes according to the following outline. You may create additional classes as needed. Salesmen Name ID number Commission rate Total commissions earned Total number of sales Car Year Make Model Vin Color Buying price Selling price Record Car Salesman Dealer Profit Date Keep your variables private. Provide a default constructor and at least one x argument constructor for each class, where x is any number greater than zero. Provide a display() method for each class. Create other methods as needed. Allow the user to select from the following menu and implement each operation: 1. Buy Car 2. Sell Car 3. Show inventory 4. Show salesmen 5. Show sales records 6. Exit the program Initialize the array for all salesmen, 4 cars and 4 records one for each car; Validate all input and keep your output looking professional.

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 same as Buy Car but for a sale rather than a purchase. Also update the salesman who made 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions