status menu

This commit is contained in:
CT
2026-04-30 17:17:42 -05:00
parent a6d29dd322
commit e6620d1ae8

View File

@@ -79,6 +79,7 @@ public class HockeyStats {
case 4: case 4:
System.out.println("Thank you!"); System.out.println("Thank you!");
close = true; close = true;
break;
default: default:
System.out.println("Please choose one of the available menu options!"); System.out.println("Please choose one of the available menu options!");
break; break;
@@ -112,8 +113,10 @@ public class HockeyStats {
switch (k) { switch (k) {
case 1: case 1:
System.out.println(players.toString()); System.out.println(players.toString());
break;
case 2: case 2:
saveData("save.txt"); saveData("save.txt");
break;
case 3: case 3:
break; break;
case 4: case 4:
@@ -129,18 +132,40 @@ public class HockeyStats {
public static boolean showStatsMenu() { public static boolean showStatsMenu() {
System.out.print( System.out.print(
""" """
<----------------------------> <---------------------------->
Hockey Stats Editor Menu Hockey Stats Viewer Menu
Select an option: Select an option:
(1) Stats (1) Stats
(2) Stats (2) Stats
(3) Stats (3) Stats
(4) Stats (4) Stats
<----------------------------> <---------------------------->
"""); """);
return false; boolean statsExit = false;
int k;
try {
k = s.nextInt();
} catch (Exception e) {
System.out.println("Please choose one of the available menu options!");
return false;
}
switch (k) {
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
statsExit = true;
break;
default:
System.out.println("Please choose one of the available menu options!");
break;
}
return statsExit;
} }
} }