Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class BankAccount {
- String bankName;
- int accountID;
- String user;
- double money;
- public BankAccount() {
- }
- public BankAccount(String bankName, int accountID, String user, double money) {
- this.bankName = bankName;
- this.accountID = accountID;
- this.user = user;
- this.money = money;
- }
- @Override
- public String toString() {
- return "BankAccount " + " Bank Name: " + bankName +
- ", Account ID: " + accountID + ", User: " + user + ", Money: " + money + '.';
- }
- public void deposit(double deposit) {
- this.money += deposit;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement