Samorokimetal

HW 29/10/20 - Main

Oct 29th, 2020
519
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Main {
  2.     public static void main(String[] args) {
  3.         Person p1 = new Person("Ivan",20);
  4.         p1.AddBankAccount(new BankAccount(10,1000));
  5.         p1.AddBankAccount(new BankAccount(44,1000));
  6.         p1.AddBankAccount(new BankAccount(14,5555));
  7.         System.out.println(p1.getBalance());
  8.  
  9.         System.out.print(p1.getAccountWithMostMoney(p1));
  10.     }
  11. }
RAW Paste Data