-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSocialMedia.java
More file actions
66 lines (51 loc) · 1.51 KB
/
Copy pathSocialMedia.java
File metadata and controls
66 lines (51 loc) · 1.51 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
import java.util.Scanner;
class MediaModel {
private int id = 0;
private String name = "";
private int connections[];
MediaModel(int id, String name, int connections[]) {
this.id = id;
this.name = name;
this.connections = connections;
}
public int getId() {
return id;
}
public String getName() {
return name;
}
public int[] getConnections() {
return connections;
}
}
class MediaViewModel {
}
public class SocialMedia {
public static void main(String []args){
Scanner sc=new Scanner(System.in);
MediaViewModel media=new MediaViewModel();
int p;
System.out.println("------------------------------------");
System.out.println("1.add the Member\n2.display all the Member\n3.specific Member\n4.Mutual Friends\n5.Exit..");
System.out.println("------------------------------------");
do{
System.out.println("Enter the operation:");
p=sc.nextInt();
switch(p){
case 1:
media.addStudent();
break;
case 2:
media.display();
break;
case 3:
media.specific();
break;
case 4:
System.out.println("Exiting...");
break;
}
}while(p!=5);
sc.close();
}
}