package com.javarant.challenges.unittests; /** * This is the Intermediate Challenge class for JavaRant.com episode #2 * * @author Jeffrey.Richley */ public class IntermediateChallenge { /** * Counter used to denote the number of times the * IntermediateChallenge class has been created */ private static int count = 0; /** * Default constructor that increments the number of times the * IntermediateChallenge class has been created * */ public IntermediateChallenge() { count++; } /** * Determines the number of times this class has been created. The count * member holds this value and is what should be returned. * * @return The number of times IntermediateChallenge has been * created */ public static int getNumberOfTimesCreated() { return 50; } /** * Checks to see if this class has been created more times than the * number passed into the method * @param numTimes Integer representing the number of times being requested * @return True if this class has been created more times than the given value */ public static boolean hasBeenCreatedMoreTimesThan(Integer numTimes) { return count > numTimes.intValue(); } }