1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
NISA [10]
3 years ago
13

Write a program that lets the user enter the loan amount and loan period in number of years and displays the monthly and total p

ayments for each interest rate starting from 5% to 8%, with an increment of 1/8.
Computers and Technology
1 answer:
Citrus2011 [14]3 years ago
7 0

Answer:

Following are the code to this question:

import java.util.*;//import package

public class Main //defining a class

{

public static void main(String[] axc)//main method  

{

double Loan_Amount,years,Annual_Interest_Rate=5.0,Monthly_Interest_Rate,Total_Amount,Monthly_Payment;//defining variables

Scanner ax = new Scanner(System.in);//creating Scanner class object

System.out.print("Enter loan amount:");//print message

Loan_Amount = ax.nextDouble();//input Loan_Amount value

System.out.print("Enter number of years: ");//print message

years= ax.nextInt();//input number of years value

System.out.printf("   %-20s%-20s%-20s\n", "Interest Rate", "Monthly Payment","Total Payment");//print message

while (Annual_Interest_Rate <= 8.0) //use while loop to calculate Interest rate table

{

Monthly_Interest_Rate = Annual_Interest_Rate / 1200;//calculating the interest Rate

Monthly_Payment = Loan_Amount * Monthly_Interest_Rate/(1 - 1 / Math.pow(1 + Monthly_Interest_Rate,years * 12));//calculating monthly payment

Total_Amount = Monthly_Payment * years * 12;//calculating yearly Amount

System.out.printf("\t %-19.3f%-19.2f%-19.2f\n", Annual_Interest_Rate,Monthly_Payment,Total_Amount);//use print meethod to print table

Annual_Interest_Rate = Annual_Interest_Rate + 1.0 / 8;//use Annual_Interest_Rate to increating the yearly Rate

}

}

}

Output:

Please find the attached file.

Explanation:

In this code inside the class, several double variables are declared in which the "Loan_Amount and years" is used for input value from the user-end, and another variable is used for calculating the value.

In this code a while loop is declared that checks the "Annual_Interest_Rate" value and creates the interest rate table which is defined in the image file please find it.

You might be interested in
According to the information presented in this​ video, a spreadsheet is effective for managing information about one thing​ (e.g
Nat2105 [25]

Answer:

According to the information presented in this​ video, a spreadsheet is effective for managing information about one thing​ (e.g., items for​ sale), but a

C. database

is better for managing information about more than one thing​ (e.g., items for sale and suppliers of​ items).

Explanation:

  • The option A is not correct as the flowchart is a step-by-step explanation of a procedure. It is visual presentation in which we explain a whole process.
  • The  option B is not correct as network is defined as the group of different computers, servers and other machines that helps the exchange of data.
  • The option c is correct as database is the means of storage of data as well as we can access this data at any time and it let you manage the data as well so we can manage a lot of information about multiple things at a time.
  • The option d is also incorrect as workflow is the visual presentation of sequence in which tasks are performed so it doesn't have to do anything wit the managing the information.
  • The option e is also incorrect as data model defines the properties of data of different things and it is used in database. It sets the rule of storing, managing and accessing the data in a database.
7 0
3 years ago
Which element is the first thing you should complete when making a movie?
AlekseyPX

Answer:

storyboard!!!

Explanation:

its important to have the concept in mind before starting

6 0
3 years ago
Read 2 more answers
PLEASE HELP ME ON THIS what is the slide sorter used f or? A. viewing presentation notes B. editing the slide content C. changin
Oduvanchick [21]
I use PowerPoint a lot and C would be correct
7 0
3 years ago
Peter wants to query to determine the names of the students who scored more than 95 in the internal assessment test which functi
Mariulka [41]

the answer is floor

It's too short. Write at least 20 characters to explain it well.

8 0
4 years ago
In theory, a(n) _____ can be an independent centralized database management system with proper interfaces to support remote acce
Vlad [161]

Answer:

Transaction Manger

Explanation:

Transaction Manger

Transaction Manager is responsible for transaction between resources that are available. It works as interface to support remote access form other systems in Data base management system.

8 0
3 years ago
Other questions:
  • What is a sluggish beta signal detection theory?
    15·1 answer
  • intext:"The browser feature which enables tabs to work independently from one another so if one crashes, the others may continue
    12·1 answer
  • The American Footwear and Apparel Group exerts pressure
    12·1 answer
  • What term identifies the physical interface between a computer and its peripherals?
    5·1 answer
  • Describe how an attacker can use whois databases and the nslookup tool to perform reconnaissance on an institution before launch
    8·1 answer
  • In mathematics, the notation n! represents the factorial of the nonnegative integer n. The factorial of n is the product of all
    7·1 answer
  • The Loanable Funds Market is built very similar to the Supply &amp; Demand Model. The Loanable Funds Market relates ____________
    14·1 answer
  • Which web design concept is most closely related to elements that symbolize the real world​
    5·1 answer
  • 1. You are designing a program that will keep track of the boxes in a doctor’s office. Each box will have three attributes: date
    10·1 answer
  • Which statements are TRUE about web services protocols? (Select TWO responses) SOAP and REST are both web service communication
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!