Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
lab9
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
9731088
lab9
Commits
7206aba8
Commit
7206aba8
authored
May 12, 2019
by
Roham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first
parent
400b576c
Pipeline
#575
canceled with stages
Changes
11
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
285 additions
and
0 deletions
+285
-0
Course.java
src/org/university/core/Course.java
+44
-0
Department.java
src/org/university/core/Department.java
+22
-0
Employee.java
src/org/university/core/Employee.java
+36
-0
GradStudent.java
src/org/university/core/GradStudent.java
+24
-0
Person.java
src/org/university/core/Person.java
+37
-0
Professor.java
src/org/university/core/Professor.java
+40
-0
Publication.java
src/org/university/core/Publication.java
+11
-0
ServiceEmployee.java
src/org/university/core/ServiceEmployee.java
+14
-0
Statement.java
src/org/university/core/Statement.java
+27
-0
Student.java
src/org/university/core/Student.java
+21
-0
UnderGradStudent.java
src/org/university/core/UnderGradStudent.java
+9
-0
No files found.
src/org/university/core/Course.java
0 → 100644
View file @
7206aba8
package
org
.
university
.
core
;
import
org.university.core.GradStudent
;
import
org.university.core.Professor
;
import
org.university.core.Student
;
import
java.util.ArrayList
;
public
class
Course
{
private
String
name
;
private
Professor
instructor
;
private
ArrayList
<
Student
>
students
=
new
ArrayList
<
Student
>();
private
GradStudent
teacherAssistance
;
public
GradStudent
getTeacherAssistance
()
{
return
teacherAssistance
;
}
public
void
setTeacherAssistance
(
GradStudent
teacherAssistance
)
{
this
.
teacherAssistance
=
teacherAssistance
;
}
public
Course
(
String
name
,
Professor
instructor
)
{
this
.
name
=
name
;
this
.
instructor
=
instructor
;
}
public
String
getName
()
{
return
name
;
}
public
Professor
getInstructor
()
{
return
instructor
;
}
public
ArrayList
<
Student
>
getStudents
()
{
return
students
;
}
public
void
addStudent
(
Student
student
){
this
.
students
.
add
(
student
);
}
}
src/org/university/core/Department.java
0 → 100644
View file @
7206aba8
package
org
.
university
.
core
;
import
java.util.ArrayList
;
public
class
Department
{
private
String
name
;
private
ArrayList
<
Course
>
courses
=
new
ArrayList
<
Course
>();
public
Department
(
String
name
){
this
.
name
=
name
;
}
public
String
getName
()
{
return
name
;
}
public
ArrayList
<
Course
>
getCourses
()
{
return
courses
;
}
public
void
addCourse
(
Course
course
){
courses
.
add
(
course
);
}
}
src/org/university/core/Employee.java
0 → 100644
View file @
7206aba8
package
org
.
university
.
core
;
import
java.util.ArrayList
;
public
abstract
class
Employee
extends
Person
{
protected
ArrayList
<
Statement
>
bankStatements
;
protected
String
position
;
protected
double
basicIncome
;
public
Employee
(
String
firstName
,
String
lastName
,
String
id
,
int
joiningYear
,
Department
department
,
String
position
,
double
basicIncome
)
{
super
(
firstName
,
lastName
,
id
,
joiningYear
,
department
);
this
.
position
=
position
;
this
.
bankStatements
=
new
ArrayList
<>();
this
.
basicIncome
=
basicIncome
;
}
public
void
addBankStatements
(
Statement
s
)
{
this
.
bankStatements
.
add
(
s
);
}
public
ArrayList
<
Statement
>
getBankStatements
()
{
return
bankStatements
;
}
public
String
getPosition
()
{
return
position
;
}
public
void
setBasicIncome
(
double
basicIncome
)
{
this
.
basicIncome
=
basicIncome
;
}
public
abstract
double
calCurrentIncome
();
public
abstract
Boolean
isPromotable
();
}
src/org/university/core/GradStudent.java
0 → 100644
View file @
7206aba8
package
org
.
university
.
core
;
import
java.util.ArrayList
;
public
class
GradStudent
extends
Student
{
private
ArrayList
<
Publication
>
publications
;
private
Professor
advisor
;
public
GradStudent
(
String
firstName
,
String
lastName
,
String
id
,
int
joiningYear
,
Department
department
,
ArrayList
<
Course
>
courses
,
Professor
advisor
)
{
super
(
firstName
,
lastName
,
id
,
joiningYear
,
department
,
courses
);
this
.
publications
=
publications
;
this
.
publications
=
new
ArrayList
<
Publication
>();
this
.
advisor
=
advisor
;
}
public
ArrayList
<
Publication
>
getPublications
()
{
return
publications
;
}
public
void
addPublication
(
Publication
publication
)
{
this
.
publications
.
add
(
publication
);
}
}
src/org/university/core/Person.java
0 → 100644
View file @
7206aba8
package
org
.
university
.
core
;
public
class
Person
{
protected
String
firstName
;
protected
String
lastName
;
protected
String
id
;
protected
int
joiningYear
;
protected
Department
department
;
public
Person
(
String
firstName
,
String
lastName
,
String
id
,
int
joiningYear
,
Department
department
)
{
this
.
firstName
=
firstName
;
this
.
lastName
=
lastName
;
this
.
id
=
id
;
this
.
joiningYear
=
joiningYear
;
this
.
department
=
department
;
}
public
String
getFirstName
()
{
return
firstName
;
}
public
String
getLastName
()
{
return
lastName
;
}
public
String
getId
()
{
return
id
;
}
public
int
getJoiningYear
()
{
return
joiningYear
;
}
public
Department
getDepartment
()
{
return
department
;
}
}
src/org/university/core/Professor.java
0 → 100644
View file @
7206aba8
package
org
.
university
.
core
;
import
java.util.ArrayList
;
public
class
Professor
extends
Employee
{
private
ArrayList
<
Course
>
courses
;
private
String
group
;
public
Professor
(
String
firstName
,
String
lastName
,
String
id
,
int
joiningYear
,
Department
department
,
String
position
,
double
basicIncome
,
String
group
)
{
super
(
firstName
,
lastName
,
id
,
joiningYear
,
department
,
position
,
basicIncome
);
this
.
group
=
group
;
this
.
courses
=
new
ArrayList
<
Course
>();
}
public
double
getCurrentIncome
()
{
return
super
.
basicIncome
;
}
public
ArrayList
<
Course
>
getCourses
()
{
return
this
.
courses
;
}
public
void
addCourse
(
Course
course
)
{
this
.
courses
.
add
(
course
);
}
public
String
getGroup
()
{
return
group
;
}
public
double
calCurrentIncome
()
{
}
public
Boolean
isPromotable
()
{
}
}
src/org/university/core/Publication.java
0 → 100644
View file @
7206aba8
package
org
.
university
.
core
;
public
class
Publication
{
private
String
title
;
private
int
year
;
public
Publication
(
String
title
,
int
year
)
{
this
.
title
=
title
;
this
.
year
=
year
;
}
}
src/org/university/core/ServiceEmployee.java
0 → 100644
View file @
7206aba8
package
org
.
university
.
core
;
public
class
ServiceEmployee
extends
Employee
{
public
ServiceEmployee
(
String
firstName
,
String
lastName
,
String
id
,
int
joiningYear
,
Department
department
,
String
position
,
double
basicIncome
)
{
super
(
firstName
,
lastName
,
id
,
joiningYear
,
department
,
position
,
basicIncome
);
}
public
double
calCurrentIncome
()
{
}
public
Boolean
isPromotable
()
{
}
}
src/org/university/core/Statement.java
0 → 100644
View file @
7206aba8
package
org
.
university
.
core
;
public
class
Statement
{
private
double
amount
;
Employee
reciever
;
public
Statement
(
double
amount
,
Employee
reciever
)
{
this
.
amount
=
amount
;
this
.
reciever
=
reciever
;
}
public
double
getAmount
()
{
return
amount
;
}
public
Employee
getReciever
()
{
return
reciever
;
}
public
void
setAmount
(
double
amount
)
{
this
.
amount
=
amount
;
}
public
void
setReciever
(
Employee
reciever
)
{
this
.
reciever
=
reciever
;
}
}
src/org/university/core/Student.java
0 → 100644
View file @
7206aba8
package
org
.
university
.
core
;
import
java.util.ArrayList
;
public
class
Student
extends
Person
{
ArrayList
<
Course
>
courses
;
public
Student
(
String
firstName
,
String
lastName
,
String
id
,
int
joiningYear
,
Department
department
,
ArrayList
<
Course
>
courses
)
{
super
(
firstName
,
lastName
,
id
,
joiningYear
,
department
);
this
.
courses
=
courses
;
}
public
ArrayList
<
Course
>
getCourses
()
{
return
courses
;
}
public
void
addCourse
(
Course
course
)
{
courses
.
add
(
course
);
}
}
src/org/university/core/UnderGradStudent.java
0 → 100644
View file @
7206aba8
package
org
.
university
.
core
;
import
java.util.ArrayList
;
public
class
UnderGradStudent
extends
Student
{
public
UnderGradStudent
(
String
firstName
,
String
lastName
,
String
id
,
int
joiningYear
,
Department
department
,
ArrayList
<
Course
>
courses
)
{
super
(
firstName
,
lastName
,
id
,
joiningYear
,
department
,
courses
);
}
}
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