Question: I need to write a code for this assignment. I have this but I cant figure out how to add on without giving me an

I need to write a code for this assignment. I have this but I cant figure out how to add on without giving me an error... pls help  I need to write a code for this assignment. I have
this but I cant figure out how to add on without giving
me an error... pls help Please review the corresponding informal UML class

Please review the corresponding informal UML class diagram for the BankAccount class. We have added 2 additional instance variables. We have also added the corresponding accessor (get) and mutator (set) methods. You must name your variables and methods as indicated. Steps to update your BankAccount class: vate int acctNumber Define all additional instance variables o o Update constructor methods so that all o Add mutator (setters) and accessor (getters) o Add any other methods defined in the UML o Update the toString method to return the double balance ivate String name instance variables are initialized methods for appropriate instance variables. c void setAcctNumber(int acct) c void setName(String owner) c int getAcctNumber() c String getName() diagram. current state of all instance variables. public double getBalance() void deposit(double amount) ic void withdraw(double amount) ic String toString) Update the tester class called Bank to test (or use) each additional method of the BankAccount class to include these additional operations. //create a BankAccount object called studentAcct //studentacct should be owned by Sue Student //studentAcet account number should be 1234 /display the state of object studentAcct / /deposit 200.00 in studentAcct //withdraw 30.00 from studentAcct //display the balance in studentAcct display the state of object myAcct display the state of object studentAcct The output from running Bank should be as follows: Welcome to our Bank Beginning state of myAcct: acctNumber: 0 balance: $0.00 name: Unknown The balance of myAcct after deposit is: 100.0 State of myAcct after deposit and withdraw: acctNumber: 0 balance: $75.00 name: Unknown State of studentAcct: acctNumber: 1234 balance: $0.00 name: Sue Student The balance of studentAcct after deposit/withdraw is : 170.0 State of myAcct: acctNumber: 0 balance: $75.00 name: Unknown State of studentAcct: acctNumber: 1234 balance: $170.00 name: Sue Student

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!