Question

A small company wants you to develop a small application to keep customers informed when trying...

A small company wants you to develop a small application to keep customers informed when trying to purchase a new car. Write me a quick program (dialog boxes optional) that prompts a user to enter the following information:

  • The price of the car (10pts)
  • The length of the loan in months (10pts)
  • The estimated percentage interest rate (10pts)

Use the formula:

payments = price (rate/12)/ (1 - (1 + (rate/12))^-months) to calculate the payments. (30pts)

For example, a 3 year (36 month) loan of $15,000 at 7% interest would look like this:

15000 ( 0.07/ 12 )

             ------------------------------
                                       -36
                (1 - ( 1 + (0.07 / 12))    )

The payment for this car will be $463.16 per month.

Java does not recognize the ^ for exponentation. You are to research the method to perform exponentation in this language. (10pts)

Initialize all variables (10pts)

Output the payment (10pts)

Before submission declare the package payments; at the top of the file after your name documentation. (5pts)

Remember to only submit the .java file. (5pts)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hopefully all yours doubt will clear if you have left with any doubt please let me know in comment. I will try my best to resolve that.

Here I am posting code and screenshot of output.

Code :-

// import library such as Math for pow method and Util.* for Scanner
import java.util.*;
import java.lang.Math;
public class Payment
{

    public static void main(String []args)
    {
        // take user input for price ,months and rate
        System.out.println("Enter price of the car");
        Scanner sc = new Scanner(System.in);
        double price = sc.nextDouble();
        System.out.println("Enter length of the loan in months");
        double months = sc.nextDouble();
        System.out.println("Enter estimated rate percentage interest rate");
        double rate = sc.nextDouble();
        // calculate power
        double payment = price*(rate/12)/(1-Math.pow((1+(rate/12)),-months));
        // display result
        System.out.println("payment is : "+payment);
    }
}

Screenshot of the output :-

​​​​​​

Add a comment
Know the answer?
Add Answer to:
A small company wants you to develop a small application to keep customers informed when trying...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • You are considering buying a car with an amortized loan. The car loan will be $40,000...

    You are considering buying a car with an amortized loan. The car loan will be $40,000 and have an annual interest rate of 2.8%, compounded monthly. You have two options for financing the car, the first is a fully amortized loan for 72 months while the second is a partially amortized loan for 36 months with a balloon payment of $18,000 (i.e. you will still owe $18,000 on the loan at month 36). What are the payments for each option?

  • When you borrow money to buy a house, a car, or for some other purpose, you...

    When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that...

  • WUSUI Rei Finance Charges. Bill wants to purchase a new car for $50,000. Bill has no...

    WUSUI Rei Finance Charges. Bill wants to purchase a new car for $50,000. Bill has no savings, so he needs to finance the entire purchase amount. With no down payment, the interest rate on the loan is 8% and the maturity of the loan is six years. His monthly payments will be $876.66. Bill's monthly net cash flows are $686. Bill also has a credit card with a $9,365 limit and an interest rate of 12%. If Bill uses all...

  • You have some extra cash this month and you are considering putting it toward your car loan. Your...

    You have some extra cash this month and you are considering putting it toward your car loan. Your interest rate is 6.8 %​, your loan payments are $ 624 per​ month, and you have 36 months left on your loan. If you pay an additional $ 1 comma 500 with your next regular $ 624 payment​ (due in one​ month), how much will it reduce the amount of time left to pay off your​ loan? ​(Note: Be careful not to...

  • This worksheet will compute the monthly value of an amortized loan for 36 months. This will...

    This worksheet will compute the monthly value of an amortized loan for 36 months. This will be a worksheet in which the loan value or principal, interest rate, and monthly payment can be changed and the worksheet will automatically update. Within the worksheet there will be some absolute cell referencing that is needed and some relative cell referencing that is needed. You will need to determine which is appropriate. Title the worksheet "Amortization of Car Loan" in cell A1. Leave...

  • This worksheet will compute the monthly value of an amortized loan for 36 months. This will...

    This worksheet will compute the monthly value of an amortized loan for 36 months. This will be a worksheet in which the loan value or principal, interest rate, and monthly payment can be changed and the worksheet will automatically update. Within the worksheet there will be some absolute cell referencing that is needed and some relative cell referencing that is needed. You will need to determine which is appropriate. Title the worksheet "Amortization of Car Loan" in cell A1. Leave...

  • Please complete on Excel and show any computations Thank you 1. Shop online for your dream...

    Please complete on Excel and show any computations Thank you 1. Shop online for your dream car and get its price. Attach documentation on the price (screen print). 2. Shop around (online) for financing and select the best financing rate available for a 4-year (48 months) loan. Attach documentation on financing rates. (Do not apply for actual loan – this is simply an exercise) 3. Pay 10% down. How much are you financing today? 4. Using MS Excel features, compute...

  • On 1/1/21, you purchase a used car for $5,000 with a 12% loan (note) payable monthly....

    On 1/1/21, you purchase a used car for $5,000 with a 12% loan (note) payable monthly. Payments of principal and interest are made at the end of each month for the next three years. Required a. Compute the amount of your monthly payment. b. Create an effective interest amortization table in Excel for the entire life of the car loan payable using the following columns: payment number, payment date, beginning carrying value, effective interest rate, interest expense, cash paid (principal...

  • Assume that you are planning on purchasing a new car. You are considering financing the $40,000...

    Assume that you are planning on purchasing a new car. You are considering financing the $40,000 purchase price using a car loan arranged through the car dealership. The terms of the loan are: 8 years of fixed monthly payments, and 2.4% quoted annual periodic rate of interest (this will need to be converted to a monthly rate by dividing the annual rate by 12). Assuming the loan will be completely paid off by the end of the 8 years, determine...

  • You are buying a house and trying to decide when you want to mortgage to mature....

    You are buying a house and trying to decide when you want to mortgage to mature. You are going to borrow $170,000. Your credit is good, so you will get the lowest rates available. You have two choices. You can finance for 30 years at an interest rate of 3.85% per year, or for 15 years with an interest rate of 3.15% per year. Set up a full amortization schedule for each of these options to help you make your...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT