Question: I need help with a Design solution and Java code program based on the following specs. Part I: (required) You have been asked to design
I need help with a Design solution and Java code program based on the following specs.
Part I: (required)
You have been asked to design a modular program that willmanage a fleet of trucks and advise on a truck or trucks that are to be auctioned because their millage is over 500000 miles.
Important! All your variables must be declared globally (outside of main and any other method but inside the class)
-You are given 4 sets of information. All information is stored in parallel arrays.
--an array of trucks VIN of size 100
--an array of trucks make of size is 100
--an array of trucks' model of size is 100
--an array of purchase price of size 100
--an array of their related and current millage: (this array has 100 entries too)
--an empty array to hold the status of each truck: (this array has 100 entries)
The array of truck status should be of type 'boolean' (store true if truck to be auctioned or false if not).
-your program should prompt the user if he/she wants to start this program or quit early.
-if the user chooses to start program, then prompt the user with a menu similar to the following:
---1-Add a truck
---2-Search for a truck
---3-Display All trucks
---4-Quit
Implement the menu as a separate function/method
-Implement a function/method for each of the menu items. (make sure that user select only allowed options).
-if user select option 1 (add truck)) then prompt the user to enter a truck VIN (digits and letters only), truck make (letters only), truck model (digits and letters) model , purchase price (digits only and one decimal point...two decimals allowed) validate the VIN, Make, Model, and Purchase Price by coding a function/method for each validation. Call a function/method that generates miles between 0 and 1000000 for the current truck, and store the value in the related location for millage in the array of miles. Call a function method that evaluate the status of the truck, and if it is more than 500000, update the status in the array of statuses to 'true' to mean that the truck is eligible for auctioning or 'false' when it is not to be auctioned.The auction price is set at 35% of the purchase price.
-if user chooses 2 then prompt the user to enter a truck VIN, call a search function/method, and if the VIN is found, check its status, and if status is set to true, then display all info about this truck and a statement similar to "Truck to be auctioned" followed with the calculated auction price, otherwise display "Truck not eligible for auctioning". You must display all information about a truck to be auctioned or not.
-when user select 3, make sure you display all Trucks, check the status of each and display if eligible (followed with the auction price) or not eligible for auctioning. Display all information for this truck.
-If user select 4 (Quit) program and for extra credits, display the truck information for the truck with most millage. Code a function/method that determines the max of all millage. (you are not allowed the use of the max function/method in Java). Also, and for extra credits, display the total of all auctions sales and the difference between the total original purchase price of all auctioned trucks and the total auctions sales.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
