-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNokiaPhone.java
More file actions
294 lines (248 loc) · 10.6 KB
/
Copy pathNokiaPhone.java
File metadata and controls
294 lines (248 loc) · 10.6 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
import java.util.Scanner;
public class NokiaPhone {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("\n=== MAIN MENU ===");
System.out.println("1. Phone book");
System.out.println("1. Phone book");
System.out.println("2. Messages");
System.out.println("3. Chat");
System.out.println("4. Call register");
System.out.println("5. Exit");
System.out.print("Choose: ");
int choice = scanner.nextInt();
switch (choice) {
case 1 -> phoneBookMenu();
case 2 -> messagesMenu();
case 3 -> System.out.println("Chat opened.");
case 4 -> callRegisterMenu();
case 5 -> {
System.out.println("Exiting...");
return;
}}
}
}
}
public static void main (String[]args){
System.out.print(phoneBookMenu);
System.out.println("\n--- PHONE BOOK ---");
System.out.println("1. Search");
System.out.println("2. Service Nos.");
System.out.println("3. Add name");
System.out.println("4. Erase");
System.out.println("5. Edit");
System.out.println("6. Assign tone");
System.out.println("7. Send b'card");
System.out.println("8. Options");
System.out.println("9. Speed dials");
System.out.println("10. Voice tags");
System.out.println("11. Back");
System.out.print("Choose: ");
int choice = scanner.nextInt();
if (choice == 11) return;
switch (choice) {
case 8 -> phoneBookOptions();
default -> System.out.println("Function executed: " + choice);
}
}
public static void main(String[]args){
System.out.print(phoneBookOptions);
System.out.println("\n--- OPTIONS ---");
System.out.println("1. Type of view");
System.out.println("2. Memory status");
System.out.println("3. Back");
System.out.print("Choose: ");
int choice = scanner.nextInt();
if (choice == 3) return;
System.out.println("Option executed: " + choice);
}
public static void main(String[]args){
System.out.print(messagesMenu);
System.out.println("\n--- MESSAGES ---");
System.out.println("1. Write messages");
System.out.println("2. Inbox");
System.out.println("3. Outbox");
System.out.println("4. Picture messages");
System.out.println("5. Templates");
System.out.println("6. Smileys");
System.out.println("7. Message settings");
System.out.println("8. Back");
System.out.print("Choose: ");
int choice = scanner.nextInt();
if (choice == 8) return;
if (choice == 7) messageSettings();
else System.out.println("Function executed: " + choice);
}
public static void main(String[]args){
System.out.print(messageSettings);
System.out.println("\n--- MESSAGE SETTINGS ---");
System.out.println("1. Set 1");
System.out.println("2. Common");
System.out.println("3. Back");
System.out.print("Choose: ");
int choice = scanner.nextInt();
if (choice == 3) return;
switch (choice) {
case 1 -> {
System.out.println("1. Message centre number");
System.out.println("2. Messages sent as");
System.out.println("3. Message validity");
}
case 2 -> {
System.out.println("1. Delivery reports");
System.out.println("2. Reply via same centre");
System.out.println("3. Character support");
}
System.out.println("Invalid");
}
}
}
public static void main(String[]args){
System.out.print(callRegisterMenu);
System.out.println("\n--- CALL REGISTER ---");
System.out.println("1. Missed calls");
System.out.println("2. Received calls");
System.out.println("3. Dialled numbers");
System.out.println("4. Erase recent call lists");
System.out.println("5. Show call duration");
System.out.println("6. Show call costs");
System.out.println("7. Call cost settings");
System.out.println("8. Prepaid credit");
System.out.println("9. Back");
System.out.print("Choose: ");
int choice = scanner.nextInt();
if (choice == 9) return;
switch (choice) {
case 5 -> callDurationMenu();
case 6 -> callCostMenu();
case 7 -> callCostSettingsMenu();
default -> System.out.println("Function executed: " + choice);
}
}
}
public static void main(String[]args){
System.out.print(callDurationMenu);
System.out.println("\n--- CALL DURATION ---");
System.out.println("1. Last call duration");
System.out.println("2. All calls' duration");
System.out.println("3. Received calls' duration");
System.out.println("4. Dialled calls' duration");
System.out.println("5. Clear timers");
}
public static void main(String[])args{
System.out.print(callCostMenu);
System.out.println("\n--- CALL COSTS ---");
System.out.println("1. Last call cost");
System.out.println("2. All calls' cost");
System.out.println("3. Clear counters");
}
public static void main(String][]args){
System.out.print(callCostSettingsMenu);
System.out.println("\n--- CALL COST SETTINGS ---");
System.out.println("1. Call cost limit");
System.out.println("2. Show costs in");
}
}
public static void main(String[] args) {
boolean running = true;
while (running) {
displayMainMenu();
System.out.print("Enter your choice (5-13, or 0 to Exit): ");
if (scanner.hasNextInt()) {
int choice = scanner.nextInt();
switch (choice) {
case 5:
handleTones();
break;
case 6:
handleSettings();
break;
case 7:
System.out.println("7. Call divert selected. Divert calls to another number.");
break;
case 8:
handleUtilitiesMenu("Games, Calculator, Stopwatch, Countdown timer");
break;
case 9:
handleUtilitiesMenu("Calculator");
break;
case 10:
handleUtilitiesMenu("Stopwatch");
break;
case 11:
handleClock();
break;
case 12:
System.out.println("12. Profiles selected. Change phone profile (General, Silent, etc.).");
break;
case 13:
System.out.println("13. SIM services selected. Options depend on your SIM card.");
break;
case 0:
System.out.println("Exiting Phone Menu Simulator. Goodbye!");
running = false;
break;
System.out.println("Invalid choice. Please enter a number between 5 and 13, or 0 to Exit.");
}
} else {
System.out.println("Invalid input. Please enter a number.");
}
if (running) {
System.out.println("--- Press Enter to continue ---");
scanner.nextLine(); // Consume the newline left by nextInt()
scanner.nextLine(); // Wait for user to press Enter
}
}
scanner.close();
}
public static void main(String[]args){
System.out.print(MainMenu);
System.out.println("\n--- MAIN MENU (Part 2) ---");
System.out.println("5. Tones");
System.out.println("6. Settings");
System.out.println("7. Call divert");
System.out.println("8. Games");
System.out.println("9. Calculator");
System.out.println("10. Reminders");
System.out.println("11. Clock");
System.out.println("12. Profiles");
System.out.println("13. SIM services");
System.out.println("0. Exit");
System.out.println("--------------------------");
}
public static void main(String[]args){
System.out.print(handleTone);
System.out.println("\n--- 5. Tones Sub-Menu ---");
System.out.println("1. Ringing tone");
System.out.println("2. Ringing volume");
System.out.println("3. Incoming call alert");
System.out.println("... (and 6 other options)");
System.out.println("-------------------------");
}
public static void main(String[]args){
Sysstem.out.pprint(handleSettings);
System.out.println("\n--- 6. Settings Sub-Menu ---");
System.out.println("1. Call settings (Automatic redial, Speed dialling, etc.)");
System.out.println("2. Phone settings (Language, Cell info display, etc.)");
System.out.println("3. Security settings (PIN code request, Call barring service, etc.)");
System.out.println("4. Restore factory settings");
System.out.println("----------------------------");
}
public static void main(String[]args){
System.out.print(handleClock);
System.out.println("\n--- 11. Clock Sub-Menu ---");
System.out.println("1. Alarm clock");
System.out.println("2. Clock settings");
System.out.println("3. Date setting");
System.out.println("4. Stopwatch");
System.out.println("5. Countdown timer");
System.out.println("6. Auto update of date and time");
System.out.println("--------------------------");
}
public static void main(String[]args){
System.out.print(handleUtilitiesMenu);
System.out.println("\n--- Selected Menu Option ---");
System.out.println("You selected " + item + ". Starting utility application...");
System.out.println("----------------------------");
}
}