Answered step by step
Verified Expert Solution
Question
1 Approved Answer
ISTE-120 Comp Prob for Information Domain I Homework Assignment # 6 DELIVERABLE Zip your files together and submit zip the file to the appropriate MyCourses
ISTE-120 Comp Prob for Information Domain I Homework Assignment # 6 DELIVERABLE Zip your files together and submit zip the file to the appropriate MyCourses dropbox. Homework MUST be submitted on time to receive full credit. Homework submitted to the "late" dropbox will receive a maximum grade of 80%. Homework not submitted to either dropbox will receive no credit. ASSIGNMENT This assignment is to write a program to calculate car purchase information. The program will require the use of Strings (including the substring method which you must learn about via the Java API), escape characters, the formatting of numbers using the printf (or String.format) method, calcating values and the Scanner class. NewCar Create a class called NewCar whose constructor accomplishes the following 1. 2. Takes in three String arguments for a car's year, make and model. Creates a String that has the full car description in it. e.g. 2014 Ford Fusion 3. Creates an abbreviation for the car that has the last two digits of year and the first letters of the make and model. e.g. 14FF 4. Initializes all other attributes to an initial value (0 or null). Create a method called calcFinalPrice that does the following: 1. Takes three double arguments for the sticker price, discount and sales tax rate 2. Returns final price calculated as: sticker_price discount + sales_tax The sales tax is applied to (sticker_price -discount). Often, car dealers offer zero interest loans for the purchase of a new car. Create a method called calczeroPctMonPayt that takes in an int argument for the number of months and returns the calculated monthly payment based on the final price. Create a toString method that takes in no arguments and returns the following string You want to purchase a Full car were calculated in the constructor ISTE-120 e.g you want to purchas, "2024 Ford Fusion" Abbreviation: "14FF" Note that all classes already have an inherited toString ) method. This method provides some identifying information about the class. In this case, the inherited method is being overridden to produce a String that has some meaningful information. DETAILS 1. Submit all files to the MyCourses dropbox. 2. All calculations must be done in the NewCar class. 3. Scanner should be used for input 4. Proper data types should be used 5. A sample run is shown below. Enter the car's Year, Make and Model: 2014 Ford Fusion Enter the Sticker Price: 23950 Enter the Discount: 1500 Enter the Sales Tax Rate: 8 Enter the Number of Months at Zero Percent Interest: 6 You want to purchase a "2014 Ford Fusion" Abbreviation: "14FF" Final Price: 24246.00 Monthly Payment at zero percent: 4041.00
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