package eecs1022.finalb; import java.util.Date; /** * This class represents a badge. Each badge has a name * and an expiry date. */ public class Badge { private String name; private Date expiryDate; /** * Initializes this badge with the given name and the * given expiry date. * * @param name the name of this badge. * @param expiryDate the expiry date of this badge. */ public Badge(String name, Date expiryDate) { this.name = name; this.expiryDate = expiryDate; } /** * Initializes this badge with the name "No Name" and * today as the expiry date. */ public Badge() { this.name = "No Name"; this.expiryDate = new Date(); } /** * Returns the name of this badge. * * @return the name of this badge. */ public String getName() { return this.name; } /** * Returns the expiry date of this badge. * * @return the expiry date of this badge. */ public Date getExpiryDate() { return this.expiryDate; } }