Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
APLAB-SESSION9
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
9731044
APLAB-SESSION9
Commits
54f71a19
Commit
54f71a19
authored
May 12, 2019
by
9731044
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parents
Pipeline
#589
failed with stages
Changes
16
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
326 additions
and
0 deletions
+326
-0
.classpath
.classpath
+6
-0
.project
.project
+17
-0
org.eclipse.jdt.core.prefs
.settings/org.eclipse.jdt.core.prefs
+11
-0
AbstractEmployee.java
src/org/university/core/AbstractEmployee.java
+37
-0
Account.java
src/org/university/core/Account.java
+29
-0
AccountingManagement.java
src/org/university/core/AccountingManagement.java
+5
-0
Article.java
src/org/university/core/Article.java
+5
-0
Course.java
src/org/university/core/Course.java
+40
-0
Department.java
src/org/university/core/Department.java
+21
-0
GraduateStudent.java
src/org/university/core/GraduateStudent.java
+5
-0
Person.java
src/org/university/core/Person.java
+35
-0
Professor.java
src/org/university/core/Professor.java
+54
-0
ServiceEmployee.java
src/org/university/core/ServiceEmployee.java
+20
-0
Statement.java
src/org/university/core/Statement.java
+5
-0
Student.java
src/org/university/core/Student.java
+27
-0
Undergrad.java
src/org/university/core/Undergrad.java
+9
-0
No files found.
.classpath
0 → 100644
View file @
54f71a19
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"
/>
<classpathentry
kind=
"src"
path=
"src"
/>
<classpathentry
kind=
"output"
path=
"bin"
/>
</classpath>
.project
0 → 100644
View file @
54f71a19
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
LAB-9
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
org.eclipse.jdt.core.javanature
</nature>
</natures>
</projectDescription>
.settings/org.eclipse.jdt.core.prefs
0 → 100644
View file @
54f71a19
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
src/org/university/core/AbstractEmployee.java
0 → 100644
View file @
54f71a19
package
org
.
university
.
core
;
import
java.util.ArrayList
;
public
abstract
class
AbstractEmployee
extends
Person
{
ArrayList
<
Statement
>
bankStatements
;
String
position
;
double
basicIncome
,
currentIncome
;
public
AbstractEmployee
(
String
firstName
,
String
lastName
,
String
position
,
String
ID
,
double
basicIncome
,
int
joiningYear
,
Department
department
)
{
super
(
firstName
,
lastName
,
ID
,
joiningYear
,
department
);
this
.
position
=
position
;
this
.
basicIncome
=
basicIncome
;
bankStatements
=
new
ArrayList
<>();
}
public
String
getPosition
()
{
return
position
;
}
public
void
addBankStatement
(
Statement
s
)
{
bankStatements
.
add
(
s
);
}
public
ArrayList
getBankStatement
()
{
return
bankStatements
;
}
public
void
setCurrentIncome
(
double
currentIncome
){
this
.
currentIncome
=
currentIncome
;
}
public
abstract
double
calCurrentIncome
();
}
src/org/university/core/Account.java
0 → 100644
View file @
54f71a19
package
org
.
university
.
core
;
public
class
Account
{
private
AbstractEmployee
owner
;
double
credit
;
public
Account
(
AbstractEmployee
owner
,
double
credit
)
{
this
.
credit
=
credit
;
this
.
owner
=
owner
;
this
.
credit
=
0
;
}
public
AbstractEmployee
getOwner
()
{
return
owner
;
}
public
double
getCredit
()
{
return
credit
;
}
public
void
setCredit
(
double
credit
)
{
this
.
credit
=
credit
;
}
}
src/org/university/core/AccountingManagement.java
0 → 100644
View file @
54f71a19
package
org
.
university
.
core
;
public
class
AccountingManagement
{
}
src/org/university/core/Article.java
0 → 100644
View file @
54f71a19
package
org
.
university
.
core
;
public
class
Article
{
}
src/org/university/core/Course.java
0 → 100644
View file @
54f71a19
package
org
.
university
.
core
;
import
java.util.ArrayList
;
public
class
Course
{
private
String
name
;
private
Professor
instructor
;
private
ArrayList
<
Student
>
students
=
new
ArrayList
<
Student
>();
private
GraduateStudent
teacherAssistance
;
public
GraduateStudent
getTeacherAssistance
()
{
return
teacherAssistance
;
}
public
void
setTeacherAssistance
(
GraduateStudent
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 @
54f71a19
import
java.util.ArrayList
;
public
class
Department
{
private
String
name
;
private
ArrayList
<
Course
>
courses
=
new
ArrayList
<>();
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/GraduateStudent.java
0 → 100644
View file @
54f71a19
package
org
.
university
.
core
;
public
class
GraduateStudent
{
}
src/org/university/core/Person.java
0 → 100644
View file @
54f71a19
package
org
.
university
.
core
;
public
class
Person
{
String
firstName
;
String
lastName
;
String
ID
;
int
joiningYear
;
Department
department
;
public
Person
(
String
firstName
,
String
lastName
,
String
ID
,
int
joiningYear
,
Department
department
)
{
this
.
department
=
department
;
this
.
firstName
=
firstName
;
this
.
ID
=
ID
;
this
.
lastName
=
lastName
;
}
public
String
getFullname
()
{
return
firstName
+
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 @
54f71a19
package
org
.
university
.
core
;
import
java.util.ArrayList
;
public
class
Professor
extends
AbstractEmployee
{
ArrayList
<
Course
>
courses
;
String
group
;
ArrayList
<
Article
>
articles
;
public
Professor
(
String
firstName
,
String
lastName
,
String
position
,
String
ID
,
double
basicIncome
,
int
joiningYear
,
Department
department
,
String
group
)
{
super
(
firstName
,
lastName
,
position
,
ID
,
basicIncome
,
joiningYear
,
department
);
this
.
group
=
group
;
courses
=
new
ArrayList
<>();
articles
=
new
ArrayList
<>();
}
public
void
setPosition
(
String
position
)
{
this
.
position
=
position
;
}
public
void
setGroup
(
String
group
)
{
this
.
group
=
group
;
}
public
void
setBasicIncome
(
double
basicIncome
)
{
this
.
basicIncome
=
basicIncome
;
}
public
void
addCourse
(
Course
c
)
{
courses
.
add
(
c
);
}
public
ArrayList
<
Course
>
getCourses
(){
return
courses
;
}
public
String
getGroup
()
{
return
group
;
}
public
void
addArticle
(
Article
a
)
{
articles
.
add
(
a
);
}
@Override
public
double
calCurrentIncome
()
{
currentIncome
+=
articles
.
size
()*
1000
;
return
currentIncome
;
}
}
src/org/university/core/ServiceEmployee.java
0 → 100644
View file @
54f71a19
package
org
.
university
.
core
;
public
class
ServiceEmployee
extends
AbstractEmployee
{
public
ServiceEmployee
(
String
firstName
,
String
lastName
,
String
position
,
String
ID
,
double
basicIncome
,
int
joiningYear
,
Department
department
)
{
super
(
firstName
,
lastName
,
position
,
ID
,
basicIncome
,
joiningYear
,
department
);
}
@Override
public
double
calCurrentIncome
()
{
return
currentIncome
;
}
}
src/org/university/core/Statement.java
0 → 100644
View file @
54f71a19
package
org
.
university
.
core
;
public
class
Statement
{
}
src/org/university/core/Student.java
0 → 100644
View file @
54f71a19
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
)
{
super
(
firstName
,
lastName
,
ID
,
joiningYear
,
department
);
courses
=
new
ArrayList
<>();
}
public
void
addCourse
(
Course
c
)
{
courses
.
add
(
c
);
}
public
ArrayList
<
Course
>
getCourses
(){
return
courses
;
}
}
src/org/university/core/Undergrad.java
0 → 100644
View file @
54f71a19
package
org
.
university
.
core
;
public
class
Undergrad
extends
Student
{
public
Undergrad
(
String
firstName
,
String
lastName
,
String
ID
,
int
joiningYear
,
Department
department
)
{
super
(
firstName
,
lastName
,
ID
,
joiningYear
,
department
);
}
}
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