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
9731082
Lab9
Commits
e416a740
Commit
e416a740
authored
May 16, 2019
by
armin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
callCurrentIncome va Override doros shod
parent
3b278a1a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
13 deletions
+35
-13
AbstractEmployee.java
src/org/university/core/AbstractEmployee.java
+3
-3
Professor.java
src/org/university/core/Professor.java
+6
-5
ServiceEmployee.java
src/org/university/core/ServiceEmployee.java
+26
-5
No files found.
src/org/university/core/AbstractEmployee.java
View file @
e416a740
...
...
@@ -19,6 +19,8 @@ public abstract class AbstractEmployee extends Person implements AccountingInter
public
abstract
boolean
isPromotable
();
public
abstract
double
callCurrentIncome
()
;
public
void
addBankStatement
(
Statement
s
)
{
bankStatments
.
add
(
s
);
...
...
@@ -29,8 +31,6 @@ public abstract class AbstractEmployee extends Person implements AccountingInter
return
this
;
}
public
abstract
double
callCurrentIncome
()
;
public
ArrayList
<
Statement
>
getBankStatments
()
{
return
bankStatments
;
}
...
...
@@ -56,7 +56,7 @@ public abstract class AbstractEmployee extends Person implements AccountingInter
this
.
currentIncome
=
currentIncome
;
}
public
double
cal
CurrentIncome
()
public
double
get
CurrentIncome
()
{
return
currentIncome
;
}
...
...
src/org/university/core/Professor.java
View file @
e416a740
...
...
@@ -9,8 +9,9 @@ public class Professor extends AbstractEmployee {
private
double
income
=
0
;
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
;
super
(
firstName
,
lastName
,
ID
,
joiningYear
,
department
,
position
,
basicIncome
)
;
this
.
group
=
group
;
this
.
income
=
0
;
}
public
void
addArticle
(
Article
article
){
...
...
@@ -21,8 +22,8 @@ public class Professor extends AbstractEmployee {
return
articles
;
}
public
void
income
(
Professor
p
){
income
=
(
p
.
articles
.
size
())*
1000
+
basicIncome
;
public
void
income
(
Professor
p
rofessor
){
income
=
(
p
rofessor
.
articles
.
size
())*
1000
+
basicIncome
;
}
public
void
setIncome
(
double
income
){
...
...
@@ -45,6 +46,6 @@ public class Professor extends AbstractEmployee {
@Override
public
double
callCurrentIncome
()
{
return
0
;
return
getIncome
()
;
}
}
src/org/university/core/ServiceEmployee.java
View file @
e416a740
...
...
@@ -2,18 +2,34 @@ package org.university.core;
public
class
ServiceEmployee
extends
AbstractEmployee
{
int
passedDays
=
0
;
double
income
=
0
;
int
additionalHour
=
0
;
public
ServiceEmployee
(
String
firstName
,
String
lastName
,
String
ID
,
int
joiningYear
,
Department
department
,
String
position
,
double
basicIncome
)
{
super
(
firstName
,
lastName
,
ID
,
joiningYear
,
department
,
position
,
basicIncome
);
this
.
income
=
0
;
}
int
passedDays
=
0
;
double
income
;
public
void
setPassedDays
(
int
passedDays
){
this
.
passedDays
++
;
}
public
void
income
(
ServiceEmployee
s
){
income
=
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
...
...
@@ -29,7 +45,12 @@ public class ServiceEmployee extends AbstractEmployee
@Override
public
double
callCurrentIncome
()
{
return
0
;
return
getIncome
()
;
}
@Override
public
AbstractEmployee
callEmployee
()
{
return
null
;
}
...
...
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