Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit34f2ed2

Browse files
1 parent6651354 commit34f2ed2

File tree

3 files changed

+112
-0
lines changed

3 files changed

+112
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
importjava.util.Scanner;
2+
classMediaModel {
3+
privateintid =0;
4+
privateStringname ="";
5+
privateintconnections[];
6+
7+
MediaModel(intid,Stringname,intconnections[]) {
8+
this.id =id;
9+
this.name =name;
10+
this.connections =connections;
11+
}
12+
13+
publicintgetId() {
14+
returnid;
15+
}
16+
17+
publicStringgetName() {
18+
returnname;
19+
}
20+
21+
publicint[]getConnections() {
22+
returnconnections;
23+
}
24+
25+
}
26+
27+
classMediaViewModel {
28+
29+
}
30+
31+
32+
publicclassSocialMedia {
33+
34+
publicstaticvoidmain(String []args){
35+
Scannersc=newScanner(System.in);
36+
37+
MediaViewModelmedia=newMediaViewModel();
38+
intp;
39+
System.out.println("------------------------------------");
40+
System.out.println("1.add the Member\n2.display all the Member\n3.specific Member\n4.Mutual Friends\n5.Exit..");
41+
System.out.println("------------------------------------");
42+
do{
43+
System.out.println("Enter the operation:");
44+
p=sc.nextInt();
45+
switch(p){
46+
case1:
47+
media.addStudent();
48+
break;
49+
case2:
50+
media.display();
51+
break;
52+
case3:
53+
media.specific();
54+
break;
55+
case4:
56+
System.out.println("Exiting...");
57+
break;
58+
59+
}
60+
61+
}while(p!=5);
62+
sc.close();
63+
64+
}
65+
}
66+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
packageArrayBasedProblems;
2+
3+
publicclassOverlappingIntervals {
4+
5+
}

‎demo.html‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!DOCTYPE html>
2+
<htmllang="en">
3+
<head>
4+
<metacharset="UTF-8">
5+
<metaname="viewport"content="width=device-width, initial-scale=1.0">
6+
<title>Document</title>
7+
<style>
8+
9+
.c1{
10+
11+
border:5px solid red;
12+
height:100px;
13+
display: flex;
14+
justify-content: center;
15+
align-items: center;
16+
17+
}
18+
.c2{
19+
height:50px;
20+
width:70px;
21+
background-color: yellow;
22+
border:1px solid red;
23+
}
24+
</style>
25+
</head>
26+
<body>
27+
<divclass="c1">
28+
29+
<divclass="c2"></div>
30+
<divclass="c2"></div>
31+
<divclass="c2"></div>
32+
<divclass="c2"></div>
33+
<divclass="c2"></div>
34+
<divclass="c2"></div>
35+
<divclass="c2"></div>
36+
<divclass="c2"></div>
37+
<divclass="c2"></div>
38+
<divclass="c2"></div>
39+
</div>
40+
</body>
41+
</html>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp