Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A bank charges $10 per month plus the following check fees for acommercial check

ID: 3616881 • Letter: A

Question

A bank charges $10 per month plus the following check fees for acommercial checking account:
$.10 for each check if less than 20 checks are written $.08 for each check if 20 through 39 checks are written $.06 for each check if 40 through 59 checks are written $.04 for each check if 60 or more checks are written The bank also charges an extra $15 if the account balancefalls below $400 (before any check fees are applied). Design aclass that stores the ending balance of an account and the numberof checks written. It should also have a method that returnsthe bank's service fees for the month.
$.10 for each check if less than 20 checks are written $.08 for each check if 20 through 39 checks are written $.06 for each check if 40 through 59 checks are written $.04 for each check if 60 or more checks are written The bank also charges an extra $15 if the account balancefalls below $400 (before any check fees are applied). Design aclass that stores the ending balance of an account and the numberof checks written. It should also have a method that returnsthe bank's service fees for the month.

Explanation / Answer

please rate - thanks import java.util.*; public class bankChargesTest { public static void main(String[] args) { double balance,fee; int checks; Scanner input = new Scanner(System.in); System.out.print("Enter current balance: "); balance=input.nextDouble(); System.out.print("Enter number of check written this month: "); checks=input.nextInt(); bankCharges acct=new bankCharges(balance,checks); acct.getFees(); System.out.printf("Your new balance is$%.2f ",acct.getBalance()); } } -------------------------------------------------- public class bankCharges { private double balance; private int checks; public bankCharges( double b, int c) { balance=b; checks=c; } public double getBalance( ) { return balance; } public void getFees( ) { balance-=10; if(balance=60)      balance-=(checks*.04); else if(checks>=40)      balance-=(checks*.06); else if(checks>=20)      balance-=(checks*.08); else      balance-=(checks*.1); } }
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote