-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathClock.java
More file actions
71 lines (68 loc) · 2.38 KB
/
Clock.java
File metadata and controls
71 lines (68 loc) · 2.38 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
package Practice.Phone;
import java.util.Scanner;
import static Practice.Phone.MainMenu.phone;
public class Clock {
static Scanner key = new Scanner(System.in);
static int n;
static int b;
static int c;
public static void clock() {
System.out.println("""
...Clock
1. Alarm clock
2. Clock settings
3. Date setting
4. Stopwatch
5. Countdown timer
6. Auto update of date and time
99. Main menu
""");
n = key.nextInt();
switch (n) {
case 1:
System.out.println("""
___alarm clock___
0. back""");
b = key.nextInt();
if (b == 0) { clock(); }
else { System.out.println("option does not exist"); phone(); }
case 2:
System.out.println("""
___clock settings___
0. back""");
b = key.nextInt();
if (b == 0) { clock(); }
else { System.out.println("option does not exist"); phone(); }
case 3:
System.out.println("""
__date setting___
0. back""");
b = key.nextInt();
if (b == 0) { clock(); }
else { System.out.println("option does not exist"); phone(); }
case 4:
System.out.println("""
___stopwatch___
0. back""");
b = key.nextInt();
if (b == 0) { clock(); }
else { System.out.println("option does not exist"); phone(); }
case 5:
System.out.println("""
___countdown timer___
0. back""");
b = key.nextInt();
if (b == 0) { clock(); }
else { System.out.println("option does not exist"); phone(); }
case 6:
System.out.println("""
___auto update of date and timer___
0. back""");
b = key.nextInt();
if (b == 0) { clock(); }
else { System.out.println("option does not exist"); phone(); }
case 99: phone();
default: System.out.println("invalid number"); clock();
}
}
}