import java.text.*; public class InsecureCreditCard { private String name; private String number; private int expirationMonth; private int expirationYear; /** * Constructs a new InsecureCreditCard with the specified * name and number. * * @param ccName the credit card name * @param ccNumber the credit card number */ public InsecureCreditCard(String ccName, String ccNumber) { name = ccName; number = ccNumber; } /** * Sets this InsecureCreditCard's expiration date. * * @param month the expiration month * @param year the expiration year */ public void setExpirationDate(int month, int year) { expirationMonth = month; expirationYear = year; } /** * Prints out credit card information. */ public void printInfo() { DecimalFormat df = new DecimalFormat("00"); System.out.println(name); System.out.println(number); System.out.print(df.format(expirationMonth) + "/"); df.applyPattern("0000"); System.out.println(df.format(expirationYear)); System.out.println(); } /** * Compares this InsecureCreditCard to the specified InsecureCreditCard. * Two InsecureCreditCard objects are considered to be equal * if their names, numbers, expiration months, and expiration * years are all equal. * * @param card the InsecureCreditCard to test for equality * * @return true if the given InsecureCreditCard is equivalent * to this InsecureCreditCard, false otherwise */ public boolean equals(InsecureCreditCard card) { // ::: FILL IN THE CORRECT CODE HERE BASED ON THE // DESCRIPTION GIVEN IN THE COMMENTS ABOVE return false; } }