java.lang.ObjectLift
public class Lift
Constructor Summary | |
---|---|
Lift(int maxGewicht)
Constructor voor objecten van de klasse Lift. |
Method Summary | |
---|---|
int |
aantalVrouwen()
Berekent het aantal vrouwen in de lift. |
int |
berekenGewichtInLift()
Berekent het totaal gewicht van alle personen in de lift. |
int |
getMaxGewicht()
Geeft het gewicht dat de lift maximaal kan dragen terug. |
void |
printLift()
Toont alle informatie over de lift in het terminalvenster. |
void |
stapInLift(Persoon lifter)
Laat een persoon in de lift stappen op voorwaarde dat het maximumgewicht niet overschreden wordt. |
void |
stapUitLift(Persoon lifter)
Laat een persoon uit de lift stappen. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Lift(int maxGewicht)
maxGewicht
- Het gewicht dat de lift maximaal kan dragen.Method Detail |
---|
public int aantalVrouwen()
public int berekenGewichtInLift()
public int getMaxGewicht()
public void printLift()
public void stapInLift(Persoon lifter)
lifter
- De persoon die in de lift wil stappen.public void stapUitLift(Persoon lifter)
lifter
- De persoon die de lift verlaat.