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
6946658a
Commit
6946658a
authored
5 years ago
by
9731050
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4th
parent
5eb98ae1
master
No related merge requests found
Pipeline
#592
failed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
3 deletions
+65
-3
Account.java
src/org/university/core/Account.java
+28
-0
AccountingManagement.java
src/org/university/core/AccountingManagement.java
+32
-0
GradStudent.java
src/org/university/core/GradStudent.java
+5
-3
No files found.
src/org/university/core/Account.java
0 → 100644
View file @
6946658a
package
org
.
university
.
core
;
public
class
Account
{
private
AbstractEmployee
owner
;
private
double
credit
;
public
Account
(
AbstractEmployee
owner
,
double
credit
)
{
this
.
owner
=
owner
;
this
.
credit
=
credit
;
}
public
AbstractEmployee
getOwner
()
{
return
owner
;
}
public
void
setOwner
(
AbstractEmployee
owner
)
{
this
.
owner
=
owner
;
}
public
double
getCredit
()
{
return
credit
;
}
public
void
setCredit
(
double
credit
)
{
this
.
credit
=
credit
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/org/university/core/AccountingManagement.java
0 → 100644
View file @
6946658a
package
org
.
university
.
core
;
import
java.util.ArrayList
;
public
class
AccountingManagement
{
private
ArrayList
<
Account
>
accounts
;
private
ArrayList
<
Statement
>
statements
;
public
void
checkout
(
AccountingInterface
employee
)
{
boolean
command
=
true
;
for
(
Account
account:
accounts
)
{
if
(
account
.
getOwner
()==
employee
)
{
double
amount
=
employee
.
callCurrentIncome
();
account
.
setCredit
(
account
.
getCredit
()+
amount
);
command
=
false
;
Statement
s
=
new
Statement
(
amount
,
employee
.
callEmployee
());
statements
.
add
(
s
);
}
}
if
(
command
)
{
double
amount
=
employee
.
callCurrentIncome
();
Account
ac
=
new
Account
(
employee
.
callEmployee
(),
employee
.
callCurrentIncome
());
accounts
.
add
(
ac
);
Statement
s
=
new
Statement
(
amount
,
employee
.
callEmployee
());
statements
.
add
(
s
);
}
}
}
This diff is collapsed.
Click to expand it.
src/org/university/core/GradStudent.java
View file @
6946658a
...
...
@@ -3,18 +3,20 @@ package org.university.core;
import
java.util.ArrayList
;
public
class
GradStudent
extends
Student
{
private
ArrayList
<
p
ublication
>
publications
;
private
ArrayList
<
P
ublication
>
publications
;
private
Professor
advisor
;
public
GradStudent
(
String
firstName
,
String
lastName
,
String
ID
,
int
joiningYear
,
Department
department
,
Professor
professor
)
{
super
(
firstName
,
lastName
,
ID
,
joiningYear
,
department
);
publications
=
new
ArrayList
<
p
ublication
>();
publications
=
new
ArrayList
<
P
ublication
>();
this
.
advisor
=
professor
;
}
public
void
addPublication
(
Publication
p
){
publications
.
add
(
p
);
}
public
ArrayList
<
p
ublication
>
getPublications
()
{
public
ArrayList
<
P
ublication
>
getPublications
()
{
return
publications
;
}
// public int calCurrentIncome(){}
}
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