Question: Hello everybody. Below I have attached a code and we are supposed to add comments explaining what each line of code does. For each method

Hello everybody. Below I have attached a code and we are supposed to add comments explaining what each line of code does. For each method add a precise description of its purpose, input and output. Explain the purpose of each member variable. . Some help would be greaty appreciated. (I have finished the code below with typing as my screen wasnt big enough to fit the whole code image)

Hello everybody. Below I have attached a code and we are supposed

}

public void withdrawal (double amount) {

balance -=amount;

}

public String ToString() {

return type + ": " + accountNumber + " " + ownerName + " " + balance;

}

}

ADD COMMENTS TO THIS CLASS, DO NOT CHANGE ANY CODE! import java.util.*; public class BankAccount private int accountNumber; priva private double balance private String type; // Personal, Business, Charitable ownerName: public BankAccount) accoun tNumber- ownerName -""; balance0.0 type "Personal"; public BankAccount (int number, String name, double initialDeposit, string type) ( accoun tNumber ownerName - name/ balance -initialDeposit; this.type - type // Why does 'this' need to be used here?? = number; public int getAccountNumber) ( return accountNumber public void setAccountNumber (int number) ( number ; accoun tNumber public String getownerName) return ownerName public void setownerName (String name) ownerName - name/ public double getBalance () return balance; public void setBalance (double newAmount) ( balancenewAmount public String getType ) return type; public void deposit (double amount) balance += amount

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!