Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hi
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
9831061
hi
Commits
b6069def
Commit
b6069def
authored
Feb 22, 2020
by
erfan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
karga source code
parents
Pipeline
#2011
failed with stages
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
140 additions
and
0 deletions
+140
-0
Main.java
src/com/company/Main.java
+21
-0
Student.java
src/com/company/Student.java
+48
-0
lab.java
src/com/company/lab.java
+71
-0
No files found.
src/com/company/Main.java
0 → 100644
View file @
b6069def
package
com
.
company
;
/**
* This class is about student
* its access is public
*/
public
class
Main
{
public
static
void
main
(
String
[]
args
)
{
Student
[]
student
=
new
Student
[
5
];
student
[
0
]=
new
Student
(
"sdf"
,
"fsdfdsf"
,
"2"
);
student
[
1
]=
new
Student
(
"sdf"
,
"fsdfdsf"
,
"2"
);
student
[
2
]=
new
Student
(
"sdf"
,
"fsdfdsf"
,
"2"
);
student
[
3
]=
new
Student
(
"sdf"
,
"fsdfdsf"
,
"2"
);
student
[
4
]=
new
Student
(
"sdf"
,
"fsdfdsf"
,
"2"
);
}
}
\ No newline at end of file
src/com/company/Student.java
0 → 100644
View file @
b6069def
package
com
.
company
;
public
class
Student
{
private
String
firstName
;
private
String
lastName
;
private
int
grade
;
private
String
Id
;
public
Student
(
String
fn
,
String
ln
,
String
id
){
firstName
=
fn
;
lastName
=
ln
;
grade
=
0
;
Id
=
id
;
}
public
String
getFirstName
()
{
return
firstName
;
}
public
int
getGrade
()
{
return
grade
;
}
public
String
getLastName
()
{
return
lastName
;
}
public
String
getId
()
{
return
Id
;
}
public
void
setFirstName
(
String
firstName
)
{
this
.
firstName
=
firstName
;
}
public
void
setGrade
(
int
grade
)
{
this
.
grade
=
grade
;
}
public
void
setId
(
String
id
)
{
Id
=
id
;
}
public
void
setLastName
(
String
lastName
)
{
this
.
lastName
=
lastName
;
}
public
void
print
(){
System
.
out
.
println
(
"first name:"
+
firstName
+
"last name"
+
lastName
+
"id:"
+
Id
+
"grade:"
+
grade
);
}
}
\ No newline at end of file
src/com/company/lab.java
0 → 100644
View file @
b6069def
package
com
.
company
;
/**
* @author erfan omid seyed
* this class have 4 field and it's about student of a school
* @since 2020-01-24
* @
*/
public
class
lab
{
Student
[]
students
;
int
avg
;
String
day
;
int
capt
;
int
size
;
public
lab
(
int
cap
,
String
d
){
}
/**
* this is method for lab class
* @param std this is the first parametr
*/
public
void
enrollStudent
(
Student
std
){
if
(
size
<
capt
){
students
[
size
]
=
std
;
size
++;
}
else
{
System
.
out
.
println
(
"Lab is full!!!"
);
}
}
public
void
print
(){}
public
Student
[]
getStudents
(){
return
students
;
}
public
int
getAvg
()
{
return
avg
;
}
public
int
getCapt
()
{
return
capt
;
}
public
int
getSize
()
{
return
size
;
}
public
String
getDay
()
{
return
day
;
}
public
void
setAvg
(
int
avg
)
{
this
.
avg
=
avg
;
}
public
void
setDay
(
String
day
)
{
this
.
day
=
day
;
}
public
void
setCapt
(
int
capt
)
{
this
.
capt
=
capt
;
}
public
void
setSize
(
int
size
)
{
this
.
size
=
size
;
}
public
void
setStudents
(
Student
[]
students
)
{
this
.
students
=
students
;
}
}
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