Question

Java Bank program A bank charges a base fee of $10 per month, plus the following...

Java Bank program

A bank charges a base fee of $10 per month, plus the following check fees for a commercial checking account:

    $.10 each for less than 20 checks

    $.08 each for 20–39 checks

    $.06 each for 40–59 checks

    $.04 each for 60 or more checks

Write a program that asks for the number of checks written for the month. The program should then calculate and display the bank’s service fees for the month.

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

import java.lang.*;
import java.util.Scanner;
public class bank{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
System.out.println("Number of checks written for a month");
int check = sc.nextInt();
int basefee = 10;
if(check<20){
System.out.println("$"+(basefee+0.10));
}
else if(check>=29 && check<=39){
System.out.println("$"+(basefee+0.8));
}
else if(check>=40 && check<=59){
System.out.println("$"+(basefee+0.6));
}
else{
System.out.println("$"+(basefee+0.4));
}
}
}

Add a comment
Know the answer?
Add Answer to:
Java Bank program A bank charges a base fee of $10 per month, plus the following...
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
  • Python Question A bank charges a base fee of $10 per month plus the following check...

    Python Question A bank charges a base fee of $10 per month plus the following check fees for a commercial checking account: $.10 each for less than 20 checks $.08 each for 20 to 29 checks $.06 each for 40 to 59 checks $.04 each for 60 or more checks Write a program that asks for the number of checks per month (integer) and displays the fee for the month.

  • C++ A bank charges $10 per month plus the following check fees for a commercial checking...

    C++ A bank charges $10 per month plus the following check fees for a commercial checking account: $.10 each for fewer than 20 checks $.08 each for 20-39 checks $.06 each for 40-59 checks $.04 each for 60 or more checks The bank also charges an extra $15 if the balance of the account falls below $400 (before any check fees are applied). Write a program that asks for the beginning balance and the number of checks written. Compute and...

  • Must be written in C++ Bank Charges A bank charges $15 per month plus the following...

    Must be written in C++ Bank Charges A bank charges $15 per month plus the following check fees for a commercial checking account: $0.10 per check each for fewer than 20 checks (1-19) $0.08 each for 20–39 checks $0.06 each for 40–59 checks $0.04 each for 60 or more checks Write a program that asks for the number of checks written during the past month, then computes and displays the bank’s fees for the month. Input Validation: Display an error...

  • Using Python write a code for Function 1: A bank charges $10 per month plus the...

    Using Python write a code for Function 1: A bank charges $10 per month plus the following check fees for a commercial checking account: a. $0.10 each for 1-19 checks b. $0.08 each for 20-39 checks c. $0.06 each for 40-59 checks d. $0.04 each for 60 or more checks. (Note that the same fee is charged for all checks. If the customer writes 21 checks, all 21 checks are billed at the $0.08 rate.) The bank also charges an...

  • Must be written in C++ Bank Charges A bank charges $15 per month plus the following...

    Must be written in C++ Bank Charges A bank charges $15 per month plus the following check fees for a commercial checking account: $0.10 per check each for fewer than 20 checks (1-19) $0.08 each for 20–39 checks $0.06 each for 40–59 checks $0.04 each for 60 or more checks Write a program that asks for the number of checks written during the past month, then computes and displays the bank’s fees for the month. Input Validation: Display an error...

  • 1. Creatc a lava program thal asks the user to cnter his/her first name and last...

    1. Creatc a lava program thal asks the user to cnter his/her first name and last namc, in a single linc and separaled by a spacc. The program should output separately the first namc and the last name. (Use the Scanner class.) 2. Create a Java program thal asks the user for a medium (air, water or sleel), and outputs the speed of sound in thal medium (1 100 feclsec in air, 4900 feesec in water and 16,400 feet sec...

  • Im opening a corporate bank account. Bank A charges a fixed monthly fee of $120 plus...

    Im opening a corporate bank account. Bank A charges a fixed monthly fee of $120 plus 10 cents per check written. Bank B charges a fixed monthly fee of $100 plus 14 cents per check written. (a). Sketch the graphs of the functions A(x) and B(x) which represents the monthly cost of banking at the two banks, where x is the number of checks written in the month. Label the y-axis intercepts and find the coordinates of the point where...

  • Answer Point Value Points Earned American Credit Union First National Bank Hillsboro Bank Internet Bank ATM...

    Answer Point Value Points Earned American Credit Union First National Bank Hillsboro Bank Internet Bank ATM Charges Home bank Free Free Free Free $1 4 free then $2 per use $3 $500 $200 $5 $6 Use of service at competitor's bank Checking Account Minimum balance required to avoid fees $400 $250 Monthly Maintenance Fee $13 7 free checks, then $1 per Per Check Processing Fees Unlimited check 1. Selecting a Bank. Sean wants to open a checking account with $275....

  • Java project: A Bank Transaction System For A Regional Bank User Story A regional rural bank...

    Java project: A Bank Transaction System For A Regional Bank User Story A regional rural bank CEO wants to modernize banking experience for his customers by providing a computer solution for them to post the bank transactions in their savings and checking accounts from the comfort of their home. He has a vision of a system, which begins by displaying the starting balances for checking and savings account for a customer. The application first prompts the user to enter the...

  • Java coding help! Write a program to simulate a bank which includes the following. Include a...

    Java coding help! Write a program to simulate a bank which includes the following. Include a commented header section at the top of each class file which includes your name, and a brief description of the class and program. Create the following classes: Bank Customer Account At a minimum include the following data fields for each class: o Bank Routing number Customer First name Last name Account Account number Balance Minimum balance Overdraft fee At a minimum write the following...

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