II41_Unterklassen_und_Vererbung/ 40777 0 0 0 11665441757 12206 5 II41_Unterklassen_und_Vererbung/Angestellter.java 100777 0 0 1676 11641053413 15572 0 public class Angestellter extends Person { /** Gibt die Dienststellung des Angestellten an */ protected String stellung; public Angestellter () { System.out.print ("Stellung des Angestellten: "); stellung = System.console().readLine(); } public void mahnung (int mahngebuehr) { /* System.out.println ("\n" + "Mitteilung an " + this +":"); System.out.println ("Ihre Mahngebuehr betraegt " + mahngebuehr + " Euro."); */ super.mahnung (mahngebuehr); System.out.println ("Sie wird automatisch vom Gehalt abgebucht."); System.out.println ("\n" + "Mitteilung an die Gehaltsstelle:"); System.out.println ("Bei dem Gehalt von " + this + " muessen " + mahngebuehr + " Euro abgezogen werden."); } public static void main (String [] args) { Angestellter x = new Angestellter (); System.out.println ("Eingelesen wurde " + x); x.mahnung(75); } } II41_Unterklassen_und_Vererbung/Angestellter_ohne_Vererbung.java 100777 0 0 2520 11641053532 20611 0 public class Angestellter_ohne_Vererbung { /** Schluessel, der den Angestellten eindeutig kennzeichnet */ private int key; private String vorname, nachname; /** Gibt die Dienststellung des Angestellten an */ private String stellung; /** Gibt an, ob der Angestellte maennlich oder weiblich ist */ private boolean male; public Angestellter_ohne_Vererbung () { String antwort; System.out.print ("Key des Angestellten: "); key = Integer.parseInt(System.console().readLine()); System.out.print ("Vorname des Angestellten: "); vorname = System.console().readLine(); System.out.print ("Nachname des Angestellten: "); nachname = System.console().readLine(); System.out.print ("Stellung des Angestellten: "); stellung = System.console().readLine(); System.out.print ("Ist der Angestellte maennlich [j/n]? "); antwort = System.console().readLine(); if (antwort.equals("j")) male = true; else male = false; } public String toString () { String anrede; if (male) anrede = "Herr "; else anrede = "Frau "; return anrede + vorname + " " + nachname; } public static void main (String [] args) { Angestellter_ohne_Vererbung x = new Angestellter_ohne_Vererbung (); System.out.println ("Eingelesen wurde " + x); } } II41_Unterklassen_und_Vererbung/doc/ 40777 0 0 0 11641053622 12733 5 II41_Unterklassen_und_Vererbung/doc/allclasses-frame.html 100777 0 0 2230 11641053622 17134 0
public class Angestellter extends Person
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
stellung
Gibt die Dienststellung des Angestellten an
|
Constructor and Description |
---|
Angestellter() |
public class Angestellter_ohne_Vererbung
extends java.lang.Object
Constructor and Description |
---|
Angestellter_ohne_Vererbung() |
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
Each annotation type has its own separate page with the following sections:
Each enum has its own separate page with the following sections:
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
These links take you to the next or previous class, interface, package, or related page.
These links show and hide the HTML frames. All pages are available with or without frames.
The All Classes link shows all classes and interfaces except non-static nested types.
Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.
Class | Description |
---|---|
Angestellter | |
Angestellter_ohne_Vererbung | |
Person | |
Person_Programm | |
Student | |
Student_ohne_Vererbung |
public class Person
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
hochschule
Gibt an, ob die Person einen Hochschulabschluss besitzt
|
protected int |
key
Schluessel, der die Person eindeutig kennzeichnet
|
protected boolean |
male
Gibt an, ob die Person maennlich oder weiblich ist
|
protected java.lang.String |
nachname |
protected java.lang.String |
vorname |
Constructor and Description |
---|
Person() |
Person(int key) |
Person(int key,
java.lang.String vorname,
java.lang.String nachname,
boolean male,
boolean hochschule) |
Person(java.lang.String vorname,
java.lang.String nachname) |
protected int key
protected java.lang.String vorname
protected java.lang.String nachname
protected boolean male
protected boolean hochschule
public Person()
public Person(int key)
public Person(java.lang.String vorname, java.lang.String nachname)
public Person(int key, java.lang.String vorname, java.lang.String nachname, boolean male, boolean hochschule)
public java.lang.String toString()
toString
in class java.lang.Object
public void mahnung(int gebuehr)
public int mahnung(int gebuehr, int gebuehr2)
public static void sendeMahnungen(Person[] ausleiher, int gebuehr)
public static void main(java.lang.String[] args)
public class Person_Programm
extends java.lang.Object
Constructor and Description |
---|
Person_Programm() |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args) |