Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

get the price by following the instructions and using a string model. PART B: PROGRAMMING QUESTION [25 marks Write a full Java program which will

image text in transcribedimage text in transcribedget the price by following the instructions and using a string model.

PART B: PROGRAMMING QUESTION [25 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) 10 ITEC 1620: MT Fall 2019 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. This program will use the class Inventory, which contains the prices for new els The API for Inventory is the following: 000 OE oproli public Inventory (); Il constructor public getPrice (String model); tomto 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 PART B: PROGRAMMING QUESTION [25 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) 10 ITEC 1620: MT Fall 2019 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. This program will use the class Inventory, which contains the prices for new els The API for Inventory is the following: 000 OE oproli public Inventory (); Il constructor public getPrice (String model); tomto 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

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

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions