Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
lab9_new2
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
9731065
lab9_new2
Commits
abb60a7a
Commit
abb60a7a
authored
May 14, 2019
by
9731065
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doing
parent
3d889f4f
Pipeline
#602
canceled with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
0 deletions
+96
-0
Employee.java
src/Employee.java
+32
-0
Personnel.java
src/Personnel.java
+32
-0
Report.java
src/Report.java
+16
-0
Time.java
src/Time.java
+16
-0
No files found.
src/Employee.java
0 → 100644
View file @
abb60a7a
import
java.util.ArrayList
;
public
class
Employee
extends
Personnel
{
private
ArrayList
<
Report
>
reports
=
new
ArrayList
<>();
private
int
level
;
public
Employee
(
String
name
,
double
basicSalary
,
int
level
){
super
(
name
,
basicSalary
);
this
.
level
=
level
;
}
public
ArrayList
<
Report
>
getReports
()
{
return
reports
;
}
public
int
getLevel
()
{
return
level
;
}
public
void
increaseLevel
(){
if
(
this
.
level
==
3
)
return
;
else
{
this
.
level
++;
}
}
public
void
decreaseLevel
(){
if
(
this
.
level
==
1
)
return
;
else
{
this
.
level
--;
}
}
}
src/Personnel.java
0 → 100644
View file @
abb60a7a
import
java.util.ArrayList
;
public
class
Personnel
{
protected
ArrayList
<
Time
>
inTime
=
new
ArrayList
<>()
;
protected
ArrayList
<
Time
>
outTime
=
new
ArrayList
<>()
;
protected
String
name
;
protected
double
basicSalary
;
protected
double
currentSalary
;
public
Personnel
(
String
name
,
double
basicSalary
){
this
.
name
=
name
;
this
.
basicSalary
=
basicSalary
;
}
public
String
getName
()
{
return
name
;
}
public
double
getBasicSalary
()
{
return
basicSalary
;
}
public
double
getCurrentSalary
()
{
return
currentSalary
;
}
public
void
setInTime
(
Time
inTime
)
{
this
.
inTime
.
add
(
inTime
);
}
public
void
setOutTime
(
Time
outTime
)
{
this
.
inTime
.
add
(
outTime
);
}
}
src/Report.java
0 → 100644
View file @
abb60a7a
public
class
Report
{
private
String
report
;
private
Time
time
;
public
Report
(
String
report
,
Time
time
){
this
.
report
=
report
;
this
.
time
=
time
;
}
public
String
getReport
()
{
return
report
;
}
public
Time
getTime
()
{
return
time
;
}
}
src/Time.java
0 → 100644
View file @
abb60a7a
public
class
Time
{
int
hour
;
int
minute
;
int
second
;
String
date
;
public
Time
(
int
hour
,
int
minute
,
int
second
,
String
date
){
this
.
hour
=
hour
;
this
.
minute
=
minute
;
this
.
second
=
second
;
this
.
date
=
date
;
}
@Override
public
String
toString
(){
return
Integer
.
toString
(
hour
)
+
" : "
+
Integer
.
toString
(
minute
)
+
" : "
+
Integer
.
toString
(
second
);
}
}
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