forked from cict-cit207/act4-java-methods
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCJAMOLAR.java
More file actions
76 lines (66 loc) · 2.05 KB
/
CJAMOLAR.java
File metadata and controls
76 lines (66 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import java.util.Scanner;
public class CJAmolar {
private static final Scanner scanner = new Scanner(System.in);
public static void main(String[] args) {
System.out.println("Hey there! What would you like to do today? Enter 1 to rest and 2 to do something today: ");
int choice = scanner.nextInt();
if (choice == 1) {
rest();
} else if (choice == 2) {
doSomething();
} else {
System.out.println("Invalid choice. Please try again.");
}
scanner.close();
}
public static void amRoutine() {
System.out.println();
print("Eating breakfast.");
print("Taking a Shower.");
print("Doing some light stretches.");
print("Taking a Quick Jog around the neighborhood.");
print("Doing Homeworks.");
System.out.println();
System.out.println("You're doing great! Press any key to continue.");
keyPress();
pmRoutine();
}
public static void pmRoutine() {
System.out.println();
print("Lunch Break!!");
print("Playing Video Games.");
print("Watching Anime.");
print("Preparing Dinner.");
print("Dinner.");
print("Half bath.");
print("Brushing teeth.");
System.out.println();
print("Preparing Bed.");
print("Good night!");
}
public static void rest() {
System.out.println();
print("Sleeping.");
print("More sleeping.");
print("Still sleeping.")
System.out.println();
System.out.println("Ready to get up? Press any key to continue.");
keyPress();
amRoutine();
}
public static void doSomething() {
amRoutine();
}
public static void print(String message) {
System.out.print(message);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
System.out.println();
}
public static void keyPress() {
scanner.next();
}
}