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
velikii [3]
3 years ago
12

Write a Java program that can compute the interest on the next monthly mortgage payment. The program reads the balance and the a

nnual percentage interest rate from the console.
The interest rate should be entered as a percentage value and not as a floating-point number (e.g.: for an interest rate of 4.25%, the user should enter 4.25, and not 0.0425). The program should check to be sure that the inputs of balance and the interest rate are not negative. The program should then compute and display the interest amount as a floating-point number with 2 digits after the floating point.
Formula: the interest on the next monthly mortgage payment can be computed using the following formula: Interest = balance x (annualInterestRate / 1200)
Computers and Technology
1 answer:
kherson [118]3 years ago
3 0

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

   

    double balance, rate, interest;

   

 System.out.print("Enter the balance: ");

 balance = input.nextDouble();

 

 System.out.print("Enter the annual percentage interest rate [%4.25 must be entered as 4.25]: ");

 rate = input.nextDouble();

 

 if(balance < 0 || rate < 0)

     System.out.println("The balance and/or interest rate cannot be negative!");

 else{

     interest = balance * (rate / 1200);

     System.out.printf("The interest amount $%.2f", interest);

 }

}

}

Explanation:

Ask the user to enter the balance

Ask the user to enter the interest rate as given format

Check the balance and rate. If any negative value is entered, print an error message. Otherwise, calculate the interest using the given formula and print the interest in required format

You might be interested in
Computer software licensed under exclusive legal right of the copyright holder with the intent that the licensee is given the ri
Shkiper50 [21]

Answer:

The following statement is 'True'.

Explanation:

There is a software named 'Proprietary software' and also called 'closed-source software', it's non-free software and used to describe the software that is not freely licensed such as operating system, file formats, and system programs. this software is licensed for studying, sharing, modification, redistribution and reverse engineering and has the copyright to use the software under only certain conditions and we can also say that it bears limit against these types of uses.

6 0
3 years ago
You are unpacking and setting up workstations
Anestetic [448]

Answer:

For setting up workstations in classrooms, one end of cables connected into the built in NIC and other end will be connected to a drop.

Explanation:

A drop will be used for connectivity in this case, which will work as connection point in a network. Drops are just like outlets in wall having  Ethernet Jacks where a network device or system can be plugged into it.

8 0
3 years ago
Explain how loops can be utilized in list processing. Please provide Python examples in your response.
Dominik [7]

Answer:

data = [0,1,2,3,4]

for i in range(4):

   print(data[i])

   i+=1

Explanation:

Loops can be utilized in a listing process by looping back to a list with a variable while the loop increases that variable to give a different response from the list.

8 0
2 years ago
A ________ is a very large general-purpose computer that is capable of performing very many functions as if these are done simul
Soloha48 [4]

Answer:

Mainframe Computer is capable of doing all the functions which are listed in question.

Explanation:

A mainframe is a very large general-purpose computer (usually costing millions of dollars) that is capable of performing very many simultaneous functions, supporting very many simultaneous users, and storing huge amounts of data. A microcomputer is the type of computer you use.

3 0
3 years ago
Use the Internet to gather information on four filesystems compatible with Linux. For each filesystem, list the situations for w
marta [7]
If fhun gftrfjjtcbjjbsufcghtfghyrssfbkoire crazy ahh young man
7 0
4 years ago
Other questions:
  • What is the correct order of network types when categorized by their size or the physical area they cover, from largest to small
    10·1 answer
  • Impact of computer on education
    6·2 answers
  • Ray has to type an invoice using the QWERTY keyboard. Along with letters and numbers, he also has to insert the dollar sign. Whi
    13·1 answer
  • HURRY!! Ill give brainily and 25 points. Describe how Scent is related to the culture and historical period when it was created.
    15·1 answer
  • To close the ____ view, click File on the Ribbon or click the preview of the document in the Info gallery to return to the docum
    9·1 answer
  • Which relation is created with the primary key associated with the relationship or associative entity, plus any non-key attribut
    6·1 answer
  • what term defines inventiveness uncertainty and futuristic ideas typically deals with science and technology
    15·1 answer
  • What are the tyoe of typical application of mainframe computer<br>​
    6·1 answer
  • Based on the screenshot below which letter do you select to sort the items in an alphabetical order?
    9·1 answer
  • It is important to consider design details when creating an api because: ______________
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!