diff --git a/src/Assignment1/AnagramsCheck.java b/src/Assignment1/AnagramsCheck.java index 71d4f0c..b5c8eba 100644 --- a/src/Assignment1/AnagramsCheck.java +++ b/src/Assignment1/AnagramsCheck.java @@ -59,15 +59,20 @@ import java.util.Scanner; public class AnagramsCheck { + // Starts the program. public static void main(String[] args) { AnagramsCheck program = new AnagramsCheck(); program.start(); } + // Field variables private String first; private String second; private int comparisons; + /** + * Starts the sentinel loop by getting an option, executing it, and getting another until exit option. + */ public void start() { int option = getOption(); while (option != 3) { @@ -173,7 +178,6 @@ public class AnagramsCheck { return input; } - /** * Performs the algorithm in checking if two strings are anagrams. * It accomplishes this by first removing casing and spacing from the strings. diff --git a/src/Assignment1/LockerDoors.java b/src/Assignment1/LockerDoors.java index 95c2777..87aefec 100644 --- a/src/Assignment1/LockerDoors.java +++ b/src/Assignment1/LockerDoors.java @@ -53,6 +53,7 @@ package Assignment1; import java.util.Scanner; public class LockerDoors { + /** * Starts the program and begins the sentinel loop. */ @@ -77,7 +78,6 @@ public class LockerDoors { } } - /** * Prints out the menu of options, asks for an input, and if that input is invalid it prints an error and * prompts the user again for the input. @@ -111,7 +111,6 @@ public class LockerDoors { } } - /** * This method executes the option based on that which was provided in the parameters. * This method prevents any option from running (Ex. Option 2) until all preconditions have been met. @@ -168,8 +167,6 @@ public class LockerDoors { System.out.println(); } - - /** * Displays the menu options. */ @@ -203,7 +200,6 @@ public class LockerDoors { } } - // Made my locker list easier to follow by toggling. class Locker { public boolean isOpen;