Форум: "Основная";
Текущий архив: 2002.04.22;
Скачать: [xml.tar.bz2];
Внизobject pascal Найти похожие ветки
← →
danik (2002-04-08 21:47) [11]Each of following programs has one missed keyword at one or some places. If we add this keyword we"ll see corresponding text "TA" in a message box on program execution. One and only one message box will be shown. Please write down the keyword and line number(s) where it should be for each program.
A01 program Project10;
A02
A03 uses
A04 Unit10 in "Unit10.pas",
A05 Unit11 in "Unit11.pas";
A06
A07 type
A08 TC = class (TB)
A09 public
A10 procedure f1; override;
A11 end;
A12
A13 procedure TC.f1;
A14 begin
A15 inherited;
A16 end;
A17
A18 var q : TA;
A19 begin
A20 q := TC.Create;
A21 try
A22 q.f1;
A23 finally
A24 q.Free;
A25 end;
A26 end.
--------------------------------------------------------------------------------
B01 unit Unit10;
B02 interface
B03 type
B04 TA = class
B05 public
B06 procedure f1; virtual;
B07 end;
B08
B09 implementation
B10 uses Dialogs;
B11
B12 procedure TA.f1;
B13 begin
B14 ShowMessage("TA");
B15 end;
B16
B17 end.
--------------------------------------------------------------------------------
C01 unit Unit11;
C02 interface
C03 uses Unit10;
C04 type
C05 TB = class (TA)
C06 public
C07 procedure f1; override;
C08 end;
C09
C10 implementation
C11 uses Dialogs;
C12
C13 procedure TB.f1;
C14 begin
C15 ShowMessage("TB");
C16 end;
C17
C18 end.
Страницы: 1 вся ветка
Форум: "Основная";
Текущий архив: 2002.04.22;
Скачать: [xml.tar.bz2];
Память: 0.44 MB
Время: 0.007 c