Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1. public class IDCard extends Card {
  2.    
  3.     private String idNum; //the ID number
  4.    
  5.     /**
  6.      * default constructor for IDCard
  7.      */
  8.     public IDCard() {
  9.         super();
  10.         idNum = "00000000";
  11.     }
  12.    
  13.     /**
  14.      * modified constructor for IDCard
  15.      * @param n the person's name
  16.      * @param id the ID number
  17.      */
  18.     public IDCard(String n, String id) {
  19.         super(n);
  20.         idNum = id;
  21.     }
  22.    
  23.     /**
  24.      * gets the ID number
  25.      * @return idNum the ID number
  26.      */
  27.     public String getID() {
  28.         return idNum;
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement