Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

I need help with this program.  I have attached the instructions and my code

I need help with this program.  I have attached the instructions and my code.  I see a lot of errors in

my code. I can’t get this program to print the balance once you select “check balance”. The program is just not doing what it should.  Can someone take a look at my code and help fix what is wrong? Also when I try to write a check for $100, I receive the below errors:

Exception in thread “main” java.lang.RuntimeException: Uncompilable source code – missing return statement

at banking.CheckingAccount.dollarsToWords(CheckingAccount.java:36)

at banking.CheckingAccount.writeCheck(CheckingAccount.java:32)

at banking.Bank.menuinfo(Bank.java:146)

at banking.Bank.instructions(Bank.java:35)

at banking.Bank.main(Bank.java:21)

/** To change this license header, choose License Headers in Project Properties.* To change this template file, choose Tools | Templates* and open the template in the editor.*/package banking;import java.util.Scanner;/**** @author*/public class Bank {public int cent;public BankAccount checking = new CheckingAccount(1, 500);public BankAccount savings = new SavingsAccount(1,5000);public static void main(String[] args) {Bank newInstructions = new Bank();newInstructions.instructions();}public void instructions () {System.out.println(“Welcome to Infinite Tangent Bank”);System.out.println(“Please select from the following menu”);System.out.print(“1. Deposit“);System.out.print(“2. Withdrawl \n”);System.out.print(“3. Transfer“);System.out.print(“4. Check Balance \n”);System.out.print(“5. Write a Check“);System.out.print(“6. Exit \n”);Bank newMenu = new Bank();newMenu.menuinfo();}public void menuinfo () {Scanner scanInput = new Scanner (System.in);int menu = scanInput.nextInt();if (menu == 1){System.out.println(“Which account would you like to depositto?”);Scanner scanAcctIn = new Scanner(System.in);String acctIn = scanAcctIn.nextLine();if (null != acctIn)switch (acctIn) {case “checking”:{System.out.println (“How much would you like to deposit?”);Scanner scanIn = new Scanner (System.in);String dep = scanIn.nextLine();String adep = dep.replace(“$”, “”);double bDep = Double.parseDouble(adep);cent = Bank.convertToCents(bDep);checking.deposit(cent);break;}case “savings”:{System.out.println (“How much would you like to deposit?”);Scanner scanIn = new Scanner (System.in);String dep = scanIn.nextLine();String adep = dep.replace(“$”, “”);double bDep = Double.parseDouble(adep);
Background image of page 1
cent = Bank.convertToCents(bDep);savings.deposit(cent);break;}}} else if (menu == 2) {System.out.println(“Which account would you like to withdrawfrom?”);Scanner scanAcctOut = new Scanner(System.in);String acctOut = scanAcctOut.nextLine();if(null != acctOut)switch (acctOut) {case “checking”:{System.out.println (“How much would you like to withdraw?”);Scanner scanOut = new Scanner (System.in);String with = scanOut.nextLine();String nWith = with.replace(“$”, “”);double bDep = Double.parseDouble(nWith);cent = Bank.convertToCents(bDep);checking.withdraw(cent);break;}case “savings”:{System.out.println (“How much would you like to withdraw?”);Scanner scanOut = new Scanner (System.in);String with = scanOut.nextLine();String nWith = with.replace(“$”, “”);double bDep = Double.parseDouble(nWith);cent = Bank.convertToCents(bDep);savings.withdraw(cent);break;}}} else if (menu == 3) {System.out.println(“What bank account would you like to transferfrom?”);Scanner scanAcct1 = new Scanner (System.in);String transFrom = scanAcct1.nextLine();if (null != transFrom)switch (transFrom) {case “checking”:{System.out.println(“How much would you like to transfer?”);Scanner scanAmt = new Scanner (System.in);String transfer = scanAmt.nextLine();String nTransfer = transfer.replace(“$”, “”);double bDep = Double.parseDouble(nTransfer);cent = Bank.convertToCents(bDep);BankAccount.transfer(cent, checking, savings);break;}case “savings”:{System.out.println(“How much would you like to transfer?”);Scanner scanAmt = new Scanner (System.in);String transfer = scanAmt.nextLine();String nTransfer = transfer.replace(“$”, “”);double bDep = Double.parseDouble(nTransfer);cent = Bank.convertToCents(bDep);BankAccount.transfer(cent, savings, checking);break;}}} else if (menu == 4) {System.out.println(“What account would you like to check the
Background image of page 2

Show 

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"