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
9731050
Lab9
Commits
472e1a5d
Commit
472e1a5d
authored
May 14, 2019
by
9731050
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
6th
parent
7efa2917
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
0 deletions
+86
-0
AbstractEmployee.java
src/org/university/core/AbstractEmployee.java
+54
-0
AccountingInterface.java
src/org/university/core/AccountingInterface.java
+6
-0
Statement.java
src/org/university/core/Statement.java
+26
-0
No files found.
src/org/university/core/AbstractEmployee.java
0 → 100644
View file @
472e1a5d
package
org
.
university
.
core
;
import
java.util.ArrayList
;
public
abstract
class
AbstractEmployee
extends
Person
implements
AccountingInterface
{
protected
ArrayList
<
Statement
>
bankStatments
=
new
ArrayList
<
Statement
>();
protected
String
position
;
protected
double
basicIncome
,
currentIncome
;
public
AbstractEmployee
(
String
firstName
,
String
lastName
,
String
ID
,
int
joiningYear
,
Department
department
,
String
position
,
double
basicIncome
)
{
super
(
firstName
,
lastName
,
ID
,
joiningYear
,
department
);
this
.
position
=
position
;
this
.
basicIncome
=
basicIncome
;
}
public
abstract
boolean
isPromotable
();
public
void
addBankStatement
(
Statement
s
)
{
bankStatments
.
add
(
s
);
}
@Override
public
AbstractEmployee
callEmployee
()
{
return
this
;
}
@Override
public
double
callCurrentIncome
()
{
return
callCurrentIncome
();
}
public
ArrayList
<
Statement
>
getBankStatments
()
{
return
bankStatments
;
}
public
String
getPosition
()
{
return
position
;
}
public
void
setPosition
(
String
position
)
{
this
.
position
=
position
;
}
public
double
getBasicIncome
()
{
return
basicIncome
;
}
public
void
setBasicIncome
(
double
basicIncome
)
{
this
.
basicIncome
=
basicIncome
;
}
public
void
setCurrentIncome
(
double
currentIncome
)
{
this
.
currentIncome
=
currentIncome
;
}
public
double
calCurrentIncome
()
{
return
currentIncome
;
}
}
src/org/university/core/AccountingInterface.java
0 → 100644
View file @
472e1a5d
package
org
.
university
.
core
;
public
interface
AccountingInterface
{
public
AbstractEmployee
callEmployee
();
public
double
callCurrentIncome
();
}
src/org/university/core/Statement.java
0 → 100644
View file @
472e1a5d
package
org
.
university
.
core
;
public
class
Statement
{
private
double
amount
;
private
AbstractEmployee
reciever
;
public
Statement
(
double
amount
,
AbstractEmployee
reciever
)
{
this
.
amount
=
amount
;
this
.
reciever
=
reciever
;
}
public
double
getAmount
()
{
return
amount
;
}
public
void
setAmount
(
double
amount
)
{
this
.
amount
=
amount
;
}
public
AbstractEmployee
getReciever
()
{
return
reciever
;
}
public
void
setReciever
(
AbstractEmployee
reciver
)
{
this
.
reciever
=
reciever
;
}
}
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