Методы в Object Pascal. Семенов Н.М. - 14 стр.

UptoLike

Составители: 

14
17: procedure SetTitle(ATitle: String);
18: end;
19:
20: TTechnicalBook = class(TBook)
21: FTechEditor: Teditor;
22: constructor Create(AnAuthor: TAuthor;
23: const ATitle: String; AnEditor: TEditor);
24: function GetTechEditor: TEditor;
25: prucedure SetTechEditor(AnEditor: TEditor);
26: end;
27:
28:
29: implementation
30:
31: {TBook}
32:
33: constructor TBook.Create;
34: begin
35: inherited Create;
36: FAuthor := AnAuthor;
37: FTitle := ATitle;
38: end;
39:
40:
41: function TBook . GetAuthor;
42: begin
43: Result := FAuthor;
44: end;
45:
46:
47: procedure TBook . SetAuthor;
48: begin
49: FAuthor := AnAuthor;
50: end;
51:
52
53: function TBook . GetTitle;
54: begin
55: Result := FTitle;
56: end;
57:
58:
59: procedure TBook . SetTitle;
60: begin
61: FTitle := ATitle;
62: end;
63:
64:
65: (TTechnicalBook)
66: