GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Notizen

AbAP Class

Jose Manuel Spanisch 1 Seite

Inhalt der Notizen (1)

Seite 1

A subclass may only have one direct superclass.

A reliable test to see if there is a genuine inheritance relationship between two classes is to try to say "a subclass is a superclass"

The superclass may have any number of subclasses, but it does not know about any of them.

Each subclass has a single direct superclass. It knows its superclass, but does not know about any sibling classes (other classes that are derived from the same superclass

Redefining Methods

the definition of the method stays exactly the same. You must follow these rules:

The method retains the same name

You indicate that you want to redefine the method by declaring it in the subclass with the addition REDEFINITION.

The method has the same visibility as in the superclass

You must not change the signature of the method

You cannot redefine a static method

In a subclass, you may define a new constructor. In contrast to method redefinitions, a constructor may have its own signature.

The signature of a constructor will often contain the same parameters as the constructor of the superclass, plus new parameters of its own. This is because the new instance constructor has two tasks - firstly to call the constructor of the superclass, and then to take care of initalizing its own attributes that are specific to the subclass.

As well as defining a new constructor, you can also define a new static constructor in a subclass.

By using the abstract class, you can implement all of the common components in the plane class without having to worry that somebody might create instances of the class by mistake.

If a class is abstract, you can still access its static components. These are:

Static methods

Static attributes

Constants

Type definitions

Informationen

Beschreibung
Notiz am AbAP Class, erstellt von Jose Manuel am 13/04/2025.
Erstellt von
Jose Manuel
Aufrufe
13
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck