|
|
|
@ -11,7 +11,7 @@ public class CounterMain {
|
|
|
|
|
private static void countUp() {
|
|
|
|
|
ByTwos twos = new ByTwos();
|
|
|
|
|
ByFives fives = new ByFives();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Display the first 5 numbers for each counter defined
|
|
|
|
|
for (int i = 0; i < 5; i++) {
|
|
|
|
|
System.out.println("Counting By " + twos.countBy());
|
|
|
|
@ -26,15 +26,15 @@ public class CounterMain {
|
|
|
|
|
System.out.println("Enter In The Number That You Want To Count:\n");
|
|
|
|
|
int userInput = in.nextInt();
|
|
|
|
|
|
|
|
|
|
CounterHelper helper = new CounterHelper(new ByTwos(), new ByThrees(), new ByFives());
|
|
|
|
|
CounterHelper helper = new CounterHelper(new ByOnes(), new ByTwos(), new ByThrees(), new ByFours(),
|
|
|
|
|
new ByFives());
|
|
|
|
|
helper.doInteractive(userInput);
|
|
|
|
|
|
|
|
|
|
System.out.println("Enter In The Number Of Times You Want To Count:\n");
|
|
|
|
|
int userIterations = in.nextInt();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
helper.displayCounter(userIterations);
|
|
|
|
|
in.close();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|