Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
workshop2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
9734022
workshop2
Commits
6af57270
Commit
6af57270
authored
Mar 06, 2020
by
mohammadali-keshtparvar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finally project of workshop2
parent
f84c76d5
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
21 deletions
+57
-21
vcs.xml
.idea/vcs.xml
+6
-0
workspace.xml
.idea/workspace.xml
+24
-10
Lab.class
out/production/w22/Lab.class
+0
-0
Main.class
out/production/w22/Main.class
+0
-0
University.class
out/production/w22/University.class
+0
-0
Lab.java
src/Lab.java
+1
-4
Main.java
src/Main.java
+16
-7
University.java
src/University.java
+10
-0
No files found.
.idea/vcs.xml
0 → 100644
View file @
6af57270
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$"
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
.idea/workspace.xml
View file @
6af57270
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"2fc8dee6-dc07-4947-87ed-795929e1f6f3"
name=
"Default Changelist"
comment=
""
/>
<list
default=
"true"
id=
"2fc8dee6-dc07-4947-87ed-795929e1f6f3"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/Lab.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/Lab.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/Main.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/Main.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/University.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/University.java"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
<option
name=
"HIGHLIGHT_NON_ACTIVE_CHANGELIST"
value=
"false"
/>
<option
name=
"LAST_RESOLUTION"
value=
"IGNORE"
/>
</component>
<component
name=
"Git.Settings"
>
<option
name=
"RECENT_GIT_ROOT_PATH"
value=
"$PROJECT_DIR$"
/>
</component>
<component
name=
"ProjectId"
id=
"1YlMVyQSDFt0xYqw42aGbDN0Cjt"
/>
<component
name=
"ProjectLevelVcsManager"
settingsEditedManually=
"true"
/>
<component
name=
"ProjectViewState"
>
<option
name=
"hideEmptyMiddlePackages"
value=
"true"
/>
<option
name=
"showExcludedFiles"
value=
"true"
/>
...
...
@@ -43,7 +52,8 @@
<option
name=
"number"
value=
"Default"
/>
<option
name=
"presentableId"
value=
"Default"
/>
<updated>
1583512754291
</updated>
<workItem
from=
"1583512755984"
duration=
"4223000"
/>
<workItem
from=
"1583512755984"
duration=
"4839000"
/>
<workItem
from=
"1583527493436"
duration=
"808000"
/>
</task>
<servers
/>
</component>
...
...
@@ -51,21 +61,25 @@
<option
name=
"version"
value=
"1"
/>
</component>
<component
name=
"WindowStateProjectService"
>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1583516632630"
>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1583528305317"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824"
timestamp=
"1583528305317"
/>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.center"
timestamp=
"1583528305317"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.
bottom/0.0.1536.824@0.0.1536.824"
timestamp=
"1583516632630
"
/>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.
center"
timestamp=
"1583516632629
"
>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.
center/0.0.1536.824@0.0.1536.824"
timestamp=
"1583528305317
"
/>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.
left"
timestamp=
"1583528305317
"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.
center/0.0.1536.824@0.0.1536.824"
timestamp=
"1583516632629
"
/>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.
left"
timestamp=
"1583516632629
"
>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.
left/0.0.1536.824@0.0.1536.824"
timestamp=
"1583528305317
"
/>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.
right"
timestamp=
"1583528305317
"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.
left/0.0.1536.824@0.0.1536.824"
timestamp=
"1583516632629
"
/>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.right"
timestamp=
"1583516632
630"
>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.
right/0.0.1536.824@0.0.1536.824"
timestamp=
"1583528305317
"
/>
<state
x=
"465"
y=
"238"
key=
"com.intellij.ide.util.TipDialog"
timestamp=
"1583527544
630"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"1493"
height=
"225"
key=
"GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824"
timestamp=
"1583516632
630"
/>
<state
x=
"465"
y=
"238"
key=
"com.intellij.ide.util.TipDialog/0.0.1536.824@0.0.1536.824"
timestamp=
"1583527544
630"
/>
</component>
</project>
\ No newline at end of file
out/production/w22/Lab.class
View file @
6af57270
No preview for this file type
out/production/w22/Main.class
View file @
6af57270
No preview for this file type
out/production/w22/University.class
View file @
6af57270
No preview for this file type
src/Lab.java
View file @
6af57270
...
...
@@ -66,10 +66,7 @@ public class Lab {
double
sum
=
0
;
int
i
;
for
(
i
=
0
;
i
<
currentSize
;
i
++){
System
.
out
.
println
((
i
+
1
)+
")fName:"
+
students
[
i
].
getFirstName
());
System
.
out
.
println
((
i
+
1
)+
")lName:"
+
students
[
i
].
getLastName
());
System
.
out
.
println
((
i
+
1
)+
")ID:"
+
students
[
i
].
getId
());
System
.
out
.
println
((
i
+
1
)+
")grade:"
+
students
[
i
].
getGrade
());
students
[
i
].
print
();
sum
+=
students
[
i
].
getGrade
();
}
double
v
=
sum
/
i
;
...
...
src/Main.java
View file @
6af57270
...
...
@@ -26,19 +26,28 @@ public class Main {
az
[
1
]
=
new
Lab
(
10
,
"Monday"
);
az
[
2
]
=
new
Lab
(
3
,
"Tuesday"
);
for
(
int
i
=
0
;
i
<
3
;
i
++){
for
(
int
j
=
0
;
j
<
3
;
j
++){
az
[
i
].
enrollStudent
(
s
[
j
]);
}
}
az
[
0
].
enrollStudent
(
s
[
0
]);
az
[
0
].
enrollStudent
(
s
[
1
]);
az
[
0
].
enrollStudent
(
s
[
2
]);
az
[
1
].
enrollStudent
(
s
[
3
]);
az
[
1
].
enrollStudent
(
s
[
4
]);
az
[
1
].
enrollStudent
(
s
[
5
]);
az
[
2
].
enrollStudent
(
s
[
6
]);
az
[
2
].
enrollStudent
(
s
[
7
]);
az
[
2
].
enrollStudent
(
s
[
8
]);
University
uni
=
new
University
(
"Computer Engineering"
,
3
);
for
(
int
i
=
0
;
i
<
3
;
i
++){
uni
.
enrollLab
(
az
[
i
]);
}
System
.
out
.
println
(
"Name of university : "
+
uni
.
getName
());
/*
System.out.println("Name of university : "+uni.getName());
System.out.println("Number of labs : "+uni.getCurrentLab());
System.out.println("Capasity of university : "+uni.getSum());
System
.
out
.
println
(
"Average of all of students in university : "
+
uni
.
getAverage
());
System.out.println("Average of all of students in university : "+uni.getAverage());*/
/*az[0].printMember();
az[1].printMember();
az[2].printMember();*/
uni
.
printInfo
();
}
}
src/University.java
View file @
6af57270
...
...
@@ -62,5 +62,15 @@ public class University {
this
.
sum
=
sum
;
}
public
void
printInfo
()
{
double
s
=
0
;
for
(
int
i
=
0
;
i
<
currentLab
;
i
++)
{
lab
[
i
].
printMember
();
s
+=
lab
[
i
].
getAvg
();
}
double
av
=
s
/
currentLab
;
System
.
out
.
println
(
"Average of university : "
+
av
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment