info-java/Aktienhandel/OnlineBroker.java

17 lines
583 B
Java
Raw Permalink Normal View History

2024-10-18 18:12:21 +02:00
public class OnlineBroker extends Broker {
protected double platformFee;
protected String platformName;
public OnlineBroker(String name, int age, double money, double provision, int clientCount, double platformFee, String platformName) {
super(name, age, money, provision, clientCount);
this.platformFee = platformFee;
this.platformName = platformName;
}
public void gebuehrErheben(Trader trader) {
trader.geldAuszahlen(this.platformFee);
this.money += this.platformFee;
}
public void neueKundenAkquirieren(int amt) {
this.clientCount += amt;
}
}