mmayoub

Bank, Client class

Aug 10th, 2017
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. package BankClients;
  2.  
  3. import java.time.LocalDate;
  4.  
  5. import BankExceptions.BankAgeException;
  6. import BankPkg.BankUtils;
  7.  
  8. public class Client extends Person {
  9.     public Client(String name, int id, LocalDate birthDate) throws Exception {
  10.         super(name, id, birthDate);
  11.  
  12.         if (this.getAge() < BankUtils.minClientAge)
  13.             throw new BankAgeException(this.getAge());
  14.     }
  15.  
  16.     public Client(Client other) {
  17.         super(other);
  18.     }
  19. }
Add Comment
Please, Sign In to add comment