Question: The book is named building java programs 4th public void clear purchased and total 0. to o Resets this stock's number of shares cost to
public void clear purchased and total 0. to o Resets this stock's number of shares cost to 11, suppose the following BankAccount class has been created user's account 1 BankAccount object represents one of money. 2 information including name and balance blic Constructs a public Retums this 3 public BankAccount public Po 4 String name Returns this double balance; public st Returns a S public void deposit (double amount) Add the fol balance balance amount public do 10 Returns the 11 public void withdraw (double amount) If equals 12 balance balance amount Add the fol 13 public L 14 Add a Constructs to field to the BankAccount class named transactionFee for a real number representing an amed Add the fol deduct every time the user withdraws money The default value is so 00, but the client can change Public b Deduct the transaction fee money during every withdraw sure Returns tr cannot go negative during a withdrawal, ufthe call (but not from deposits). Make that negative, don't modify withdrawal (amount plus transaction fee) wou tely, the balance at all. m. T 12. Add a tostring method to the BankAc class method should contains the account's name count from the previous exercise. Your has the name and balance or a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
