-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNokia3310.java
More file actions
475 lines (349 loc) · 11.1 KB
/
Copy pathNokia3310.java
File metadata and controls
475 lines (349 loc) · 11.1 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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
import java.util.Scanner;
public class Nokia3310 {
public static void main(String... args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Welcome to your Nokia phone");
String menu = """
1. Phone book
2. Messages
3. Chat
4. Call register
5. Tones
6. Settings
7. Call divert
8. Games
9. Calculator
10. Reminder
11. Clock
12. Profiles
13. SIM services
""";
System.out.println("Menu" + menu);
System.out.print("Menu option: ");
int menuOption = scanner.nextInt();
switch (menuOption){
case 1: System.out.println("Phone");
String phonebook = """
1. Search
2. Service Nos
3. Add name
4. Erase
5. Edit
6. Assign tone
7. Send b'card
8. Options
9. Speed dials
10. Voice tags
""";
System.out.println(" book" + phonebook);
int phoneBook = scanner.nextInt();
switch (phoneBook){
case 1: System.out.println("Search"); break;
case 2: System.out.println("Service Nos"); break;
case 3: System.out.println("Add name"); break;
case 4: System.out.println("Erase"); break;
case 5: System.out.println("Edit"); break;
case 6: System.out.println("Assign tone"); break;
case 7: System.out.println("Send b'card"); break;
case 8: System.out.println("Options");
String options = """
1. Type of view
2. Memory status
""";
System.out.println(" " + options);
int option = scanner.nextInt();
switch (option){
case 1: System.out.println("Type of view"); break;
case 2: System.out.println("Memory status"); break;
default : System.out.println("Invalid entry");
break;
}
break;
case 9: System.out.println("Speed dials"); break;
case 10: System.out.println("Voice tags"); break;
default : System.out.println("Invalid entry");
break;
}
break;
case 2: System.out.println("Messages");
String phoneMessages = """
1. Write messages
2. Inbox
3. Outbox
4. Picture messages
5. Templates
6. Smileys
7. Message settings
8. Info service
9. Voice mailbox number
10. Service command editor
""";
System.out.println(" " + phoneMessages);
int messages = scanner.nextInt();
switch (messages){
case 1: System.out.println("Write messages"); break;
case 2: System.out.println("Inbox"); break;
case 3: System.out.println("Outbox"); break;
case 4: System.out.println("Picture messages"); break;
case 5: System.out.println("Templates"); break;
case 6: System.out.println("Smileys"); break;
case 7: System.out.println("Message settings");
int messageSettings = scanner.nextInt();
switch (messageSettings){
case 1: System.out.println("Set");
String PhoneSet = """
1. Message centre number
2. Messages sent as
3. Message validity
""";
System.out.println(" " + PhoneSet);
int set = scanner.nextInt();
switch (set){
case 1: System.out.println("Message centre number"); break;
case 2: System.out.println("Messages sent as"); break;
case 3: System.out.println("Message validity"); break;
default: System.out.println("Invalid entry"); break;
}
break;
case 2: System.out.println("Common");
String phoneCommon = """
1. Delivery reports
2. Reply via same centre
3. Character support
""";
System.out.println(" " + phoneCommon);
int common = scanner.nextInt();
switch (common){
case 1: System.out.println("Delivery reports"); break;
case 2: System.out.println("Reply via same centre"); break;
case 3: System.out.println("Character support"); break;
default: System.out.println("Invalid entry");
break;
}
break;
default: System.out.println("Invalid entry");
break;
}
break;
case 8: System.out.println("Info service"); break;
case 9: System.out.println("Voice mailbox number"); break;
case 10: System.out.println("Service command editor"); break;
default: System.out.println("Invalid entry");
break;
}
break;
case 3: System.out.println("Chat"); break;
case 4: System.out.println("Call register");
String call = """
1. Missed calls
2. Received calls
3. Dialled numbers
4. Erase recent call lists
5. Show call duration
6. Show call costs
7. Call cost settings
8. Prepaid credit
""";
System.out.println(" Register" + call);
int callRegister = scanner.nextInt();
switch (callRegister){
case 1: System.out.println("Missed calls"); break;
case 2: System.out.println("Received calls"); break;
case 3: System.out.println("Dialled numbers"); break;
case 4: System.out.println("Erase recent call lists"); break;
case 5: System.out.println("Show call duration");
String show = """
1. Last call duration
2. All calls' duration
3. Received calls' duration
4. Dialled calls' duration
5. Clear timers
""";
System.out.println(" call duration" + show);
int showCallDuration = scanner.nextInt();
switch (showCallDuration){
case 1: System.out.println("Last call duration"); break;
case 2: System.out.println("All calls' duration"); break;
case 3: System.out.println("Received calls' duration"); break;
case 4: System.out.println("Dialled calls' duration"); break;
case 5: System.out.println("Clear timers");
break;
default: System.out.println("Invalid entry");
break;
}
break;
case 6: System.out.println("Show call ");
String showCall = """
1. Last call cost
2. All calls' cost
3. Clear counters
""";
System.out.println(" costs" + showCall);
int showCallCosts = scanner.nextInt();
switch (showCallCosts){
case 1: System.out.println("Last call cost"); break;
case 2: System.out.println("All call's cost"); break;
case 3: System.out.println("Clear counters"); break;
default: System.out.println("Invalid entry");
break;
}
break;
case 7: System.out.println("Call cost settings");
String callCost = """
1. Call cost limit
2. Show costs in
""";
System.out.println(" settings" + callCost);
int callCostSettings = scanner.nextInt();
switch (callCostSettings){
case 1: System.out.println("Call cost limit"); break;
case 2: System.out.println("Show costs in"); break;
default: System.out.println("Invalid entry");
break;
}
break;
case 8: System.out.println("Prepaid credit");
default: System.out.println("Invalid entry");
break;
}
break;
case 5: System.out.println("Tones");
String toness = """
1. Ringing tone
2. Ringing volume
3. Incoming call alert
4. Composer
5. Message alert tone
6. Keypad tones
7. Warning and game tones
8. Vibrating alert
9. Screen saver
""";
System.out.println(" " + toness);
int tones = scanner.nextInt();
switch (tones){
case 1: System.out.println("Ringing tone"); break;
case 2: System.out.println("Ringing volume"); break;
case 3: System.out.println("Incoming call alert"); break;
case 4: System.out.println("Composer"); break;
case 5: System.out.println("Message alert tone"); break;
case 6: System.out.println("Keypad tones"); break;
case 7: System.out.println("Warning and game tones"); break;
case 8: System.out.println("Vibrating alert"); break;
case 9: System.out.println("Screen saver"); break;
default: System.out.println("Invalid entry");
break;
}
break;
case 6:System.out.println("Settings");
String settingss = """
1. Call settings
2. Phone settings
3. Security settings
4. Restore factory settings
""";
System.out.println(" " + settingss);
int settings = scanner.nextInt();
switch (settings){
case 1: System.out.println("Call ");
String callSetting = """
1. Automatic redial
2. Speed dialing
3. Call waiting options
4. Own number sending
5. Phone line in use
6. Automatic answer
""";
System.out.println(" settings " + callSetting);
int callSettings = scanner.nextInt();
switch(callSettings){
case 1: System.out.println("Automatic redial"); break;
case 2: System.out.println("Speed dialing"); break;
case 3: System.out.println("Call waiting options"); break;
case 4: System.out.println("Own number sending"); break;
case 5: System.out.println("Phone line in use"); break;
case 6: System.out.println("Automatic answer"); break;
default: System.out.println("Invalid entry");
break;
}
break;
case 2: System.out.println("Phone");
String phonesettings = """
1. Language
2. Cell info display
3. Welcome note
4. Network selection
5. Lights
6. Confirm SIM service actions
""";
System.out.println(" settings " + phonesettings);
int phoneSettings = scanner.nextInt();
switch(phoneSettings){
case 1: System.out.println("Language"); break;
case 2: System.out.println("Cell info display"); break;
case 3: System.out.println("Welcome note"); break;
case 4: System.out.println("Network selection"); break;
case 5: System.out.println("Lights"); break;
case 6: System.out.println("Confirm SIM service actions"); break;
default: System.out.println("Invalid entry");
break;
}
break;
case 3: System.out.println("Security");
String security = """
1. PIN code request
2. Call barring serevice
3. Fixed dialling
4. Closed user group
5. Phone security
6. Change access codes
""";
System.out.println(" settings " + security);
int securitySetting = scanner.nextInt();
switch(securitySetting){
case 1: System.out.println("PIN code request"); break;
case 2: System.out.println("Call barring serevice"); break;
case 3: System.out.println("Fixed dialling"); break;
case 4: System.out.println("Closed user group"); break;
case 5: System.out.println("Phone security"); break;
case 6: System.out.println("Change access codes"); break;
default: System.out.println("Invalid entry");
break;
}
break;
case 4: System.out.println("Restore factory settings"); break;
default: System.out.println("Invalid entry"); break;
}
break;
case 7: System.out.println("Call divert"); break;
case 8: System.out.println("Games"); break;
case 9: System.out.println("Calculator"); break;
case 10: System.out.println("Reminder"); break;
case 11: System.out.println("Clock");
String clocks = """
1. Alarm clock
2. Clock settings
3. Date setting
4. Stopwatch
5. Countdown timer
6. Auto update of date and time
""";
System.out.println(" " + clocks);
int clock = scanner.nextInt();
switch(clock){
case 1: System.out.println("Alarm clock"); break;
case 2: System.out.println("Clock settings"); break;
case 3: System.out.println("Date setting"); break;
case 4: System.out.println("Stopwatch"); break;
case 5: System.out.println("Countdown timer"); break;
case 6: System.out.println("Auto update of date and time"); break;
default: System.out.println("Invalid entry");
break;
}
break;
case 12: System.out.println("Profiles"); break;
case 13: System.out.println("SIM services"); break;
default : System.out.println("Invalid entry"); break;
}
}
}