Question: Please help Total Points- 6+3-9 (PRINT Section: No. 2(a) 6 Points Write a program that helps a person decide whether to buy a brand new
Total Points- 6+3-9 (PRINT Section: No. 2(a) 6 Points Write a program that helps a person decide whether to buy a brand new car or a certified pre-owned car. Your program's input should be .The cost of a new car The estimated miles driven per year . The estimated gas price The efficiency in miles per gallon The estimated resale value after five (5) years Compute the total cost of owing the car for five years. Run your program twice for both a brand new car and a certified pre- owned car for comparison. Use the following data for new car (Hint* use Scanner or inputDialog to read input from user's keyboard): (These values MUST be read from user. These MUST NOT be hardcoded in the variables) Price of a new car: 25000 Estimated miles driven per year: 15000 Estimated gas price: 2.50 Miles per gallon: 30 Estimated resale value after 5 years: 13000 Use the following data for a certified pre-owned car (Hint use Scanner or inputDialog to read input from user's keyboard) (These values MUST be read from user. These MUST NOT be hardcoded in the variables) Price of a certified pre-owned car: 19000 Estimated miles driven per year: 15000 Estimated gas price: 2.50 Miles per gallon: 23 Estimated resale value after 5 years: 14500 // First, run your code in Eclipse. Once you are satisfied then paste your code here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
