package test3; import java.util.Random; /** * This class represents a badge. Each badge has a name. */ public class Badge { /** * Initializes this badge with the name "No Name". */ public Badge() { } /** * Initializes this badge with the given name. * * @param name the name of this badge. * @pre. name != null */ public Badge(String name) { } /** * Returns the name of this badge. * * @return the name of this badge. */ public String getName() { } /** * Sets the name of this badge to the given name. * * @param name the new name of this badge. * @pre. name != null */ public void setName(String name) { } /** * Tests whether this badge is the same as the given object. * Two badges are the same if their names are the same, ignoring * capitalizations. For example, badges with the names "John doe" * and "john DOE" are considered equal. * * @param object an object. * @return true if this badge is the same as the given object, * false otherwise. */ public boolean equals(Object object) { } // Although equals is overridden, you do not have to override hashCode in this test /** * Random object that can be used in the getRandom method. */ private static Random random = new Random(System.currentTimeMillis()); /** * Returns a badge with either the name "John Doe" or the * name "Jane Doe". The name is chosen randomly. * * @return a badge with either the name "John Doe" or the * name "Jane Doe". */ public static Badge getRandom() { } }