Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class IDCard extends Card {
- private String idNum; //the ID number
- /**
- * default constructor for IDCard
- */
- public IDCard() {
- super();
- idNum = "00000000";
- }
- /**
- * modified constructor for IDCard
- * @param n the person's name
- * @param id the ID number
- */
- public IDCard(String n, String id) {
- super(n);
- idNum = id;
- }
- /**
- * gets the ID number
- * @return idNum the ID number
- */
- public String getID() {
- return idNum;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement