Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
project-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
Amirhosein Rajabpour
project-Lab9
Commits
7e268de1
Commit
7e268de1
authored
5 years ago
by
Amirhosein Rajabpour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
final commit
parent
d9f25ffb
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
Professor.java
src/org/university/core/Professor.java
+15
-0
ServiceEmployee.java
src/org/university/core/ServiceEmployee.java
+18
-0
No files found.
src/org/university/core/Professor.java
View file @
7e268de1
...
@@ -4,6 +4,7 @@ import java.util.ArrayList;
...
@@ -4,6 +4,7 @@ import java.util.ArrayList;
public
class
Professor
extends
AbstractEmployee
public
class
Professor
extends
AbstractEmployee
{
{
private
double
income
=
0
;
private
ArrayList
<
Course
>
courses
;
private
ArrayList
<
Course
>
courses
;
private
ArrayList
<
Article
>
articles
;
private
ArrayList
<
Article
>
articles
;
private
String
group
;
private
String
group
;
...
@@ -12,6 +13,20 @@ public class Professor extends AbstractEmployee
...
@@ -12,6 +13,20 @@ public class Professor extends AbstractEmployee
Department
department
,
String
position
,
double
basicIncome
,
String
group
)
{
Department
department
,
String
position
,
double
basicIncome
,
String
group
)
{
super
(
firstName
,
lastName
,
ID
,
joiningYear
,
department
,
position
,
basicIncome
);
super
(
firstName
,
lastName
,
ID
,
joiningYear
,
department
,
position
,
basicIncome
);
this
.
group
=
group
;
this
.
group
=
group
;
this
.
income
=
0
;
}
public
void
income
(
Professor
professor
){
income
=
(
professor
.
articles
.
size
()*
1000
)
+
basicIncome
;
}
public
void
setIncome
(
double
income
)
{
this
.
income
=
income
;
}
public
double
getIncome
()
{
return
income
;
}
}
public
void
addArticle
(
Article
a
){
public
void
addArticle
(
Article
a
){
...
...
This diff is collapsed.
Click to expand it.
src/org/university/core/ServiceEmployee.java
View file @
7e268de1
...
@@ -4,14 +4,32 @@ import java.util.Date;
...
@@ -4,14 +4,32 @@ import java.util.Date;
public
class
ServiceEmployee
extends
AbstractEmployee
public
class
ServiceEmployee
extends
AbstractEmployee
{
{
double
income
=
0
;
int
additionalHour
=
0
;
public
ServiceEmployee
(
String
firstName
,
String
lastName
,
String
ID
,
int
joiningYear
,
Department
department
,
String
position
,
double
basicIncome
)
{
public
ServiceEmployee
(
String
firstName
,
String
lastName
,
String
ID
,
int
joiningYear
,
Department
department
,
String
position
,
double
basicIncome
)
{
super
(
firstName
,
lastName
,
ID
,
joiningYear
,
department
,
position
,
basicIncome
);
super
(
firstName
,
lastName
,
ID
,
joiningYear
,
department
,
position
,
basicIncome
);
this
.
income
=
0
;
}
}
int
passedDays
=
0
;
int
passedDays
=
0
;
public
void
setPassedDays
(
int
passedDays
)
{
public
void
setPassedDays
(
int
passedDays
)
{
this
.
passedDays
++;
this
.
passedDays
++;
}
}
public
void
income
(
ServiceEmployee
serviceEmployee
){
income
=
(
additionalHour
*
500
)
+
basicIncome
;
}
public
double
getIncome
()
{
return
income
;
}
public
void
setIncome
(
double
income
)
{
this
.
income
=
income
;
}
public
void
setAdditionalHour
(
int
additionalHour
)
{
this
.
additionalHour
=
additionalHour
;
}
@Override
@Override
public
boolean
isPromotable
()
{
public
boolean
isPromotable
()
{
...
...
This diff is collapsed.
Click to expand it.
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