added Aktienhandel
This commit is contained in:
16
Aktienhandel/Broker.java
Executable file
16
Aktienhandel/Broker.java
Executable file
@ -0,0 +1,16 @@
|
||||
public class Broker extends Person {
|
||||
protected double provision;
|
||||
protected int clientCount;
|
||||
public Broker(String name, int age, double money, double provision, int clientCount) {
|
||||
super(name, age, money);
|
||||
this.provision = provision;
|
||||
this.clientCount = clientCount;
|
||||
}
|
||||
public void tradeAbwickeln(Trader trader, String aktieName, double price, int amt) {
|
||||
trader.aktieKaufen(aktieName, price, amt);
|
||||
this.money += this.provision;
|
||||
}
|
||||
public void kundenAnzeigen() {
|
||||
System.out.println("Kunden: " + this.clientCount);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user