Created
September 5, 2024 11:29
-
-
Save kunxin-chor/e6366f9e6c1489e29248cfd32416deb5 to your computer and use it in GitHub Desktop.
Main.java template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main() { | |
while (true) { | |
displayMenu(); | |
int choice = getMenuChoice(); | |
boolean keepRunning = processChoice(choice); | |
if (keepRunning == false) { | |
break; | |
} | |
} | |
} | |
public static void displayMenu() { | |
} | |
// get the choice that the user has entered | |
public static int getMenuChoice() { | |
return 0; | |
} | |
// depending on the user has entered at the menu, do something | |
// if return true, keep running the program | |
// if return false, quit the program | |
public static boolean processChoice(int choice) { | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment