forked from rick2785/JavaCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColleague.java
More file actions
29 lines (15 loc) · 512 Bytes
/
Colleague.java
File metadata and controls
29 lines (15 loc) · 512 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
public abstract class Colleague{
private Mediator mediator;
private int colleagueCode;
public Colleague(Mediator newMediator){
mediator = newMediator;
mediator.addColleague(this);
}
public void saleOffer(String stock, int shares){
mediator.saleOffer(stock, shares, this.colleagueCode);
}
public void buyOffer(String stock, int shares){
mediator.buyOffer(stock, shares, this.colleagueCode);
}
public void setCollCode(int collCode){ colleagueCode = collCode; }
}