Question: Homework Due February 6, 2020 Create a full Program for a class called BankAccount. It will have the following members. An initial balance as a
Homework Due February 6, 2020 Create a full Program for a class called BankAccount. It will have the following members. An initial balance as a double. It will have a method called getBalance() and setBalance() as well as deposit(double amt) and withdraw(double amt) which will assign balance a new value as added or subtracted along with a toString() method that will output the following format Your final balance is $_ where holds the final balance It will have a no arg constructor setting balance to 0.0 and an argument constructor. Create 1 object as an arg Constructor with the following balance 10000.0 and then call the withdraw(234.55) then output it's value using toString. Create object 2 as no arg constructor. Set the balance to 20000.55 Use the getBalance() to display the balance at that time. Now call the deposit and add 100.45 to the balance. And now display the new value of the balance using toString
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
