// Beispiel Klasse fuer FluSuServlet // WWW & Servlets // Fachgruppe Softwaretechnik // Uwe Poborski 14.04.99 // Flugzeug.java // benoetigte Klassen: class Flugzeug { public int TCPlaetze, BCPlaetze, FCPlaetze; public float TCPreis, BCPreis, FCPreis; // Preis 1 Flugstunde public String Typ; static final String Typ1 = "T1"; static final String Typ2 = "T2"; static final String Typ3 = "T3"; static final String TypX = "XXX"; public Flugzeug(String Typ) { this.Typ = Typ; if (Typ.equals(Typ1)) { TCPlaetze = 20; BCPlaetze = 5; FCPlaetze = 0; TCPreis = 100.0f; BCPreis = 150.0f; FCPreis = 0.0f; } if (Typ.equals(Typ2)) { TCPlaetze = 30; BCPlaetze = 8; FCPlaetze = 2; TCPreis = 120.0f; BCPreis = 170.0f; FCPreis = 210.0f; } if (Typ.equals(Typ3)) { TCPlaetze = 50; BCPlaetze = 10; FCPlaetze = 5; TCPreis = 140.0f; BCPreis = 190.0f; FCPreis = 250.0f; } if (Typ.equals(TypX)) { TCPlaetze = 200; BCPlaetze = 100; FCPlaetze = 50; TCPreis = 100.0f; BCPreis = 200.0f; FCPreis = 300.0f; } } }