Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
group2-9831045-APmanual-2
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
9831045
group2-9831045-APmanual-2
Commits
2c6b6869
Commit
2c6b6869
authored
Mar 06, 2020
by
9831045
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixes
parent
88df324f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
15 deletions
+35
-15
workspace.xml
.idea/workspace.xml
+8
-9
Lab.class
out/production/Run/Lab.class
+0
-0
Run.class
out/production/Run/Run.class
+0
-0
Student.class
out/production/Run/Student.class
+0
-0
Lab.java
src/Lab.java
+15
-6
Run.java
src/Run.java
+9
-0
Student.java
src/Student.java
+3
-0
No files found.
.idea/workspace.xml
View file @
2c6b6869
...
...
@@ -2,7 +2,6 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"721d25be-807f-4a41-a78a-d223bc93b2f4"
name=
"Default Changelist"
comment=
""
>
<change
afterPath=
"$PROJECT_DIR$/.idea/vcs.xml"
afterDir=
"false"
/>
<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/Run.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/Run.java"
afterDir=
"false"
/>
...
...
@@ -70,22 +69,22 @@
<screen
x=
"0"
y=
"0"
width=
"1366"
height=
"728"
/>
</state>
<state
x=
"275"
y=
"21"
key=
"#Project_Structure/0.0.1366.728@0.0.1366.728"
timestamp=
"1583492226195"
/>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1583
495551043
"
>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1583
500264815
"
>
<screen
x=
"0"
y=
"0"
width=
"1366"
height=
"728"
/>
</state>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.bottom/0.0.1366.728@0.0.1366.728"
timestamp=
"1583
495551043
"
/>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.center"
timestamp=
"1583
495551042
"
>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.bottom/0.0.1366.728@0.0.1366.728"
timestamp=
"1583
500264815
"
/>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.center"
timestamp=
"1583
500264814
"
>
<screen
x=
"0"
y=
"0"
width=
"1366"
height=
"728"
/>
</state>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.center/0.0.1366.728@0.0.1366.728"
timestamp=
"1583
495551042
"
/>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.left"
timestamp=
"1583
495551042
"
>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.center/0.0.1366.728@0.0.1366.728"
timestamp=
"1583
500264814
"
/>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.left"
timestamp=
"1583
500264814
"
>
<screen
x=
"0"
y=
"0"
width=
"1366"
height=
"728"
/>
</state>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.left/0.0.1366.728@0.0.1366.728"
timestamp=
"1583
495551042
"
/>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.right"
timestamp=
"1583
495551042
"
>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.left/0.0.1366.728@0.0.1366.728"
timestamp=
"1583
500264814
"
/>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.right"
timestamp=
"1583
500264814
"
>
<screen
x=
"0"
y=
"0"
width=
"1366"
height=
"728"
/>
</state>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.right/0.0.1366.728@0.0.1366.728"
timestamp=
"1583
495551042
"
/>
<state
width=
"1366"
height=
"180"
key=
"GridCell.Tab.0.right/0.0.1366.728@0.0.1366.728"
timestamp=
"1583
500264814
"
/>
<state
x=
"184"
y=
"0"
key=
"SettingsEditor"
timestamp=
"1583493438190"
>
<screen
x=
"0"
y=
"0"
width=
"1366"
height=
"728"
/>
</state>
...
...
out/production/Run/Lab.class
View file @
2c6b6869
No preview for this file type
out/production/Run/Run.class
View file @
2c6b6869
No preview for this file type
out/production/Run/Student.class
View file @
2c6b6869
No preview for this file type
src/Lab.java
View file @
2c6b6869
...
...
@@ -44,7 +44,7 @@ public class Lab {
}
*/
for
(
int
i
=
0
;
i
<
students
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
capacity
;
i
++)
{
System
.
out
.
println
(
"std fname: "
+
students
[
i
].
getFirstName
()
+
" std id:"
+
students
[
i
].
getId
()
+
" std grade:"
+
students
[
i
].
getGrade
());
}
System
.
out
.
println
(
"Lab AVG:"
+
avg
);
}
...
...
@@ -65,9 +65,11 @@ public class Lab {
*/
public
void
setStudents
(
Student
[]
students
)
{
int
j
=
0
;
for
(
Studenti
:
students
){
this
.
students
[
j
]
=
i
;
currentSize
=
0
;
for
(
Student
i
:
students
)
{
this
.
students
[
j
]
=
new
Student
(
i
.
getFirstName
(),
i
.
getLastName
(),
i
.
getId
());
j
++;
currentSize
++;
}
}
...
...
@@ -121,6 +123,15 @@ public class Lab {
*/
public
void
setCapacity
(
int
capacity
)
{
this
.
capacity
=
capacity
;
}
}
/*
Student[] students1 = new Student[capacity];
for (int i = 0 ; i < students.length && i < capacity ; i++){
students1[i] = students[i];
...
...
@@ -130,6 +141,4 @@ public class Lab {
students[i] = students1[i];
}
}
}
*/
\ No newline at end of file
src/Run.java
View file @
2c6b6869
...
...
@@ -41,15 +41,24 @@ public class Run {
//now to show that no one can attend the lab when its full
Student
std4
=
new
Student
(
"new students first name"
,
"new students last name "
,
"9031059"
);
lab
.
enrollment
(
std4
);
//now lets increase the classes capacity
lab
.
setCapacity
(
4
);
//the new lab student can be enrolled
lab
.
enrollment
(
std4
);
//printing the labs new list
students
=
lab
.
getStudents
();
students
[
0
].
print
();
students
[
1
].
print
();
students
[
2
].
print
();
students
[
3
].
print
();
lab
.
print
();
}
}
src/Student.java
View file @
2c6b6869
...
...
@@ -60,5 +60,8 @@ public class Student {
public
String
getId
(){
return
id
;
}
public
String
getLastName
(){
return
lastName
;
}
}
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