Advertisement
cgorrillaha

Untitled

Dec 1st, 2020
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. import java.util.InputMismatchException;
  2.  
  3. public class TestAccount {
  4.     public static void main(String[] args) {
  5.         //(Person p, double bal, int acctNum)
  6.         Account act=new Account(new Person("Charlie", "Gorrill", 45), 5000.00, 12345);
  7.         System.out.println(act.getBalance());
  8.         act.deposit(500);
  9.         System.out.println(act.getBalance());
  10.         act.deposit(-500);
  11.         System.out.println(act.getBalance());
  12.         double amt=act.withdraw(500);
  13.     }
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement