Answered step by step
Verified Expert Solution
Question
1 Approved Answer
* * * 0 * X + X X X X O ir LA Study Puck Practice as been posted PART B: PROGRAMMING QUESTION 125
* * * 0 * X + X X X X O ir LA Study Puck Practice as been posted PART B: PROGRAMMING QUESTION 125 marks write a full Java program which will allow a customer to enquire the price of a car at a Toyota dealership. The price of a car is dictated by the following information: - Model of the car (such as Corolla, Camry, Sienna) -Year of manufacturing - If the year is smaller than 2018 the car will be considered Used For Used cars the price will depend on the Mileage. OOO P This program will use the class Inventory, which contains the prices for new cars. yo'nta The API for Inventory is the following: 000.0 olim A public Inventory (); // constructor public getPrice (String model); altning twoimstane Your program should get from the keyboard the model of the car and the year of manufacturing. For Used cars will also get the mileage on the car. For Used cars the price is lowered by 10% for cars with less than 30,000 miles, 20% for cars with 30,000-60,000 miles and 50% for cars with more than 60,000 miles. The program should allow the user to enquire prices for several cars. The repetition loop will stop when for the model of the car the user will enter the word "Stop". Make sure that the user of the program is presented with information about the options for the car model and your program will force the user to enter the correct data from the keyboard. For each enquiry the program will present the answer as in the following example: Model: Camry: Year: 2012; Price: $24.545.67 1957 * * * 0 * X + X X X X O ir LA Study Puck Practice as been posted PART B: PROGRAMMING QUESTION 125 marks write a full Java program which will allow a customer to enquire the price of a car at a Toyota dealership. The price of a car is dictated by the following information: - Model of the car (such as Corolla, Camry, Sienna) -Year of manufacturing - If the year is smaller than 2018 the car will be considered Used For Used cars the price will depend on the Mileage. OOO P This program will use the class Inventory, which contains the prices for new cars. yo'nta The API for Inventory is the following: 000.0 olim A public Inventory (); // constructor public getPrice (String model); altning twoimstane Your program should get from the keyboard the model of the car and the year of manufacturing. For Used cars will also get the mileage on the car. For Used cars the price is lowered by 10% for cars with less than 30,000 miles, 20% for cars with 30,000-60,000 miles and 50% for cars with more than 60,000 miles. The program should allow the user to enquire prices for several cars. The repetition loop will stop when for the model of the car the user will enter the word "Stop". Make sure that the user of the program is presented with information about the options for the car model and your program will force the user to enter the correct data from the keyboard. For each enquiry the program will present the answer as in the following example: Model: Camry: Year: 2012; Price: $24.545.67 1957
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