public class ItemPrice extends Object
Constructor and Description |
---|
ItemPrice() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getAmount()
Gibt die Anzahl des Items zurück.
|
double |
getPrice()
Gibt den Item Preis zurück.
|
ItemType |
getType()
Gibt den Typ des Eintrags zurück, Verkauf oder Ankauf.
|
int |
hashCode() |
void |
setAmount(int amount) |
void |
setPrice(double price) |
void |
setType(ItemType type) |
public ItemType getType()
public void setType(ItemType type)
public double getPrice()
public void setPrice(double price)
public int getAmount()
Beispiel für Ankauf: amount=16, price=10 Dann wird angekauft: 16 für 10$, 32 für 20$, 48 für 30$, etc. Packt der Kunde nun 20 Items in die Kiste werden 4 wieder zurückgedroppt und 16 für 10$ angekauft.
public void setAmount(int amount)
Copyright © 2023. All rights reserved.