-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFinalGameDetails.java
More file actions
57 lines (45 loc) · 1.98 KB
/
FinalGameDetails.java
File metadata and controls
57 lines (45 loc) · 1.98 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
import java.io.*;
import java.util.*;
public class FinalGameDetails {
public static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static LinkedList<GameDetails> gameList = new LinkedList<>();
static AddingGameDetails addingGameDetails = new AddingGameDetails();
public void operations() throws Exception {
gameList = addingGameDetails.addingDetails();
while ( true ) {
System.out.println("OPerations are as follows : ");
System.out.println("1 :- To add Details");
System.out.println("2 :- To remove Details");
System.out.println("3 :- To Update Details");
System.out.println("4 :- To Display the Details");
System.out.println("5 :- To stop doing Operations");
int choice = Integer.parseInt(br.readLine());
SpecificOperations specificOperations = new SpecificOperations();
switch ( choice ) {
case 1:
LinkedList<GameDetails> returnList = new LinkedList<>();
returnList = specificOperations.addDetails();
gameList.addAll(returnList);
break;
case 2:
specificOperations.deleteDetails(gameList);
break;
case 3:
specificOperations.updateDetails(gameList);
break;
case 4:
specificOperations.displayDetails(gameList);
break;
case 5:
specificOperations.displayDetails(gameList);
break;
default:
System.out.println("Enter a Valid Choice");
}
if ( choice == 5 ) {
System.out.println("You Have stopped doing Operatins. Thank you");
break;
}
}
}
}