Question: Java help please read the instructions carefully specially the variables and classes name - i will provide the extra files you need to build the

Java help

please read the instructions carefully specially the variables and classes name

- i will provide the extra files you need to build the program.

Please build the entire program not just the classes.

Java help please read the instructions carefully specially the variables and classes

name - i will provide the extra files you need to build

the program. Please build the entire program not just the classes. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This is the main.java so you can start with it

------------------------------------------------------------------------------------------------------------------------------------------------------------------------ public class Main { public static void main(String[] args) { double

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This is the main.java so you can start with it

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

public class Main { public static void main(String[] args) { double creditAmount = 0.0, debitAmount = 0.0, months = 0.0, interestRate = 0.0; SavingsAccount savAcct = new SavingsAccount(); System.out.println("---------------------------------------------------------"); System.out.println("----------- CHECKING ACCOUNT ----------------------------"); System.out.print("Creating a new savings account. "); savAcct = new SavingsAccount(1000,1); System.out.println("Opening balance: "+savAcct.getBalance()); creditAmount = 100000.0; System.out.println("Credit: "+creditAmount); savAcct.credit(creditAmount); System.out.println("After credit balance: "+savAcct.getBalance()); debitAmount = 2000.0; System.out.println("Debit: "+debitAmount); savAcct.debit(debitAmount); System.out.println("After debit balance: "+savAcct.getBalance()); months = 36; System.out.println("Balance forecast after "+months+" months : "+savAcct.forcastBalance(months) +" at "+savAcct.getInterestRate()+"%"); interestRate = 3.0; System.out.println("Changing interest rate to: "+interestRate+"%"); savAcct.setInterestRate(interestRate); System.out.println("Balance forecast after "+months+" months : "+savAcct.forcastBalance(months) +" at new "+savAcct.getInterestRate()+"%"); debitAmount = 200000.0; System.out.println("Debit: "+debitAmount); savAcct.debit(debitAmount); System.out.println("After debit balance: "+savAcct.getBalance()); debitAmount = -200000.0; System.out.println("Debit: "+debitAmount); savAcct.debit(debitAmount); System.out.println("After debit balance: "+savAcct.getBalance()); System.out.println(" "); System.out.println("---------------------------------------------------------"); System.out.println("----------- CHECKING ACCOUNT ----------------------------"); CheckingAccount chkAcct = new CheckingAccount(); System.out.print("Creating a new checking account:"); chkAcct = new CheckingAccount(2000, 15.0); System.out.println("Opening balance: "+chkAcct.getBalance()); months = 36; System.out.println("Balance forecast after "+months+" months: "+chkAcct.forcastBalance(months) ); creditAmount = 10000.0; System.out.println("Credit: "+creditAmount); chkAcct.credit(creditAmount); System.out.println("After credit balance: "+chkAcct.getBalance()); months = 24; System.out.println("Balance forecast after "+months+" months: "+chkAcct.forcastBalance(months) ); } }

Java: Interfaces and Exceptions OBJECTIVE Enhance the understanding of interfaces and exceptions. UBMISSIO DEADLINE The assignment is due in BlackBoard on 25th July, 11:59 PM PLEASE MAKE SURE THAT YOUR CODE COMPILES Please make a compressed/zip file with all your source files (.zip extension) DO NOT upload individual files separately Name your zip file as .zip. For example: John Doe 123456 should have a zip file: John Doe 123456.zip PROBLEM You have to design a program that manages different types of accounts for a bank. You will need to create an interface BankAccount, which will be implemented by two classes: SavingsAccount and CheckingAccount. You will also need five custom exception classes to handle different exceptions InvalidMonthsException, InvalidMonthlyFeesException and NegativeValueException. Another class Main (Main.java) is provided for you with these instructions. InvalidlnterestRateException, LowAccountBalanceException, IMPLEMENTATION BANKACCOUNT INTERFACE The code for BankAccount interface is given below public interface BankAccountt public double getBalance(); public double forcastBalance (double months) throws InvalidMonthsException; public void credit (double value) throws NegativeValueException; public void debit(double value) throws LowAccountBalanceException, NegativeValueException

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!