+++ /dev/null
-target/classes/de/tankstelle/Main.class
-target/classes/de/tankstelle/Treibstoff.class
-target/classes/de/tankstelle/Treibstofftyp.class
-target/classes/de/tankstelle/Tankstelle.class
-target/classes/de/tankstelle/GrosseTankstelle.class
-target/classes/de/tankstelle/KleineTankstelle.class
-target/classes/de/tankstelle/MittlereTankstelle.class
\ No newline at end of file
private String betreiberfirma_supermarkt;
public GrosseTankstelle(String betreiberfirma_supermarkt) {
- Treibstoff[] treibstoffe = { new Treibstoff(Treibstofftyp.SUPER, 16000f, 0f),
- new Treibstoff(Treibstofftyp.SUPER_E10, 16000f, 0f),
- new Treibstoff(Treibstofftyp.DIESEL, 16000f, 0f),
- new Treibstoff(Treibstofftyp.PREMIUM_DIESEL, 16000f, 0f),
- new Treibstoff(Treibstofftyp.AUTOGAS, 16000f, 0f) };
+ Treibstoff[] treibstoffe = { new Treibstoff(Treibstofftyp.SUPER, 8000f, 0f, 16000),
+ new Treibstoff(Treibstofftyp.SUPER_E10, 8000f, 0f, 16000),
+ new Treibstoff(Treibstofftyp.DIESEL, 8000f, 0f, 16000),
+ new Treibstoff(Treibstofftyp.PREMIUM_DIESEL, 8000f, 0f, 16000),
+ new Treibstoff(Treibstofftyp.AUTOGAS, 8000f, 0f, 16000) };
super((byte) 4, treibstoffe);
this.betreiberfirma_supermarkt = betreiberfirma_supermarkt;
private short anzahl_getraenkeautomaten;
public KleineTankstelle(short anzahl_getraenkeautomaten) {
- Treibstoff[] treibstoffe = { new Treibstoff(Treibstofftyp.SUPER, 8000f, 0f),
- new Treibstoff(Treibstofftyp.DIESEL, 8000f, 0f) };
+ Treibstoff[] treibstoffe = { new Treibstoff(Treibstofftyp.SUPER, 4000f, 0f, 8000),
+ new Treibstoff(Treibstofftyp.DIESEL, 4000f, 0f, 8000) };
super((byte) 4, treibstoffe);
this.anzahl_getraenkeautomaten = anzahl_getraenkeautomaten;
}
private short quadratmeterzahl_verkaufsflaeche;
public MittlereTankstelle(short quadratmeterzahl_verkaufsflaeche) {
- Treibstoff[] treibstoffe = { new Treibstoff(Treibstofftyp.SUPER, 12000f, 0f),
- new Treibstoff(Treibstofftyp.SUPER_E10, 12000f, 0f),
- new Treibstoff(Treibstofftyp.PREMIUM_DIESEL, 12000f, 0f),
- new Treibstoff(Treibstofftyp.AUTOGAS, 12000f, 0f) };
+ Treibstoff[] treibstoffe = { new Treibstoff(Treibstofftyp.SUPER, 6000f, 0f, 12000),
+ new Treibstoff(Treibstofftyp.SUPER_E10, 6000f, 0f, 12000),
+ new Treibstoff(Treibstofftyp.PREMIUM_DIESEL, 6000f, 0f, 12000),
+ new Treibstoff(Treibstofftyp.AUTOGAS, 6000f, 0f, 12000) };
super((byte) 4, treibstoffe);
this.quadratmeterzahl_verkaufsflaeche = quadratmeterzahl_verkaufsflaeche;
}
public class Treibstoff {
/**
- * Der Treibstofftyp. Wird sich innerhalb einer Instanz nicht ändern und ist deshalb final
+ * Der Treibstofftyp. Wird sich innerhalb einer Instanz nicht ändern und ist
+ * deshalb final
*/
public final Treibstofftyp TREIBSTOFFTYP;
*/
public float menge;
+ /**
+ * Größtmöglicher Treibstoffvorrat
+ */
+ public final int KAPAZITAET;
+
/**
* Verkaufspreis / L
*/
public float preis;
- Treibstoff(Treibstofftyp Treibstofftyp, float menge, float preis) {
+ Treibstoff(Treibstofftyp Treibstofftyp, float menge, float preis, int kapazitaet) {
this.TREIBSTOFFTYP = Treibstofftyp;
this.menge = menge;
this.preis = preis;
+ this.KAPAZITAET = kapazitaet;
}
}