Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The Mark McCormick Used Car Lot needs a report and search ability of their inventory of the 2 5 best - selling cars of the
The Mark McCormick Used Car Lot needs a report and search ability of their inventory of the bestselling cars of the year. You have been provided with a file containing a list the bestselling cars. The inventory data is stored in a file named carinventory.txt The data for each car is stored on two lines in the file and the data is space delimited. The below data must be read in from the specified data file and stored in arrays accordingly.The structure of each record of the file is as follows:LineItemTypeDescriptionStringSerial NumberintQuantityintCostfloatPricefloatColor codeint Name your class "CarReport". Use a minimum of methods. Use printf to format and display PRICE with $ and decimal places. Use a loop to read in the data from file. Use arrays to store data. Use the FilePrintWriter classes to readwrite data tofrom file Your program needs to be menu driven. You will allow the user to produce the report as displayed on these instructions sorted by serial number order OR sorted by description in alphabetical order. The user will have the option to print the report to the screen, to an output file, or both. When the user selects the option to search, you need to prompt the user for the cars serial number. After the user enters a serial number, your program should search and display all of the associated data on one line for that ONE car to the screen.The data contains codes for each color. You will need to create a method to convert the code to the color description as follows:Color ChartWhiteBlackBlueSilverRedGreen Menu Example:Menu Report by Serial Number OR Report by Description Search by Serial Number ExitReport ExampleSerial #DescriptionColorQuantityCostPriceProfitChevy MalibuBlueChrysler PacificaBlueSubaru CrosstrekBlueMazda CXRedSubaru OutbackWhiteJeep WranglerRedFord ExplorerWhiteToyota HighlanderBlackHonda CivicBlackHonda AccordBlueHyundai TucsonBlueChevy EquinoxRedToyota CorollaGreenTesla Model GreenToyota TacomaGreenJeep GrandCherokeeGreenNissan RogueWhiteGMC SierraWhiteToyota CamryGreenHonda CRVWhiteTesla Model YBlueToyota RAVBlueRam PickupBlackChevy SilveradoWhiteFord FSeriesRed Total Cars Total Cost Total Retail Total Profit
using eclipse ide java
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started