(a) hier gibt es Code-Tags
(b) Du hast eine Klasse definiert, warum dann Record im Namen
(c) private Variablen bekommen ein F als Anfangsbuchstaben
(d)
type
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13:
| TFrage = class(TObject) private Ffragen_id : Integer; Fantwort_id : Integer; public frage : String; antwort1 : String; antwort2 : String; antwort3 : String; antwort4 : String; constructor Create(fragen_nr, antwort_nummer: Integer); destructor Destroy; end; |
(e) ein Konstruktor ist eine Prozedure ... (hier gibt es ein paar
Grundlagen
(f)
Delphi-Quelltext
1: 2: 3: 4: 5:
| constructor TFragen.Create; begin inherited Create; end; |
(g) Destroy brauchst Du erstmal nicht
(h) public Variablen sind nicht OOP-like, besser über property!
Beispiel
Delphi-Quelltext
1: 2: 3: 4: 5:
| private FFrage: String; public property Frage: String read FFrage write FFrage; |
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden!