Смекни!
smekni.com

Разработка технологий повторения темы Логика высказываний (стр. 24 из 24)

{ Public declarations }

end;

var

Form4: TForm4;

implementation

uses Unit1, Unit3;

{$R *.dfm}

procedure TForm4.FormShow(Sender: TObject);

var i,j:integer;

begin

Edit2.Text:=form1.Edit1.Text;

For i:=1 to (form3.StringGrid1.RowCount-1) do

If form3.StringGrid1.Cells[(form3.StringGrid1.ColCount-1),i]='1' then

begin

if Edit1.Text<>'' then

Edit1.Text:=Edit1.Text+'v';

For j:=1 to strtoint(Form1.Edit2.text)do

If form3.StringGrid1.Cells[j,i]='1'

then

Edit1.Text:=Edit1.Text+form3.StringGrid1.Cells[j,0]

else

Edit1.Text:=Edit1.Text+'г'+form3.StringGrid1.Cells[j,0];

end ;

end;

end.

unit Unit5;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, ComCtrls, StdCtrls, ExtCtrls, Buttons, jpeg;

type

TForm5 = class(TForm)

Panel2: TPanel;

Panel1: TPanel;

Label1: TLabel;

Edit1: TEdit;

Image1: TImage;

Edit3: TEdit;

Image2: TImage;

RadioGroup1: TRadioGroup;

Image3: TImage;

RadioGroup2: TRadioGroup;

Image5: TImage;

RadioGroup3: TRadioGroup;

Image4: TImage;

Edit4: TEdit;

Image6: TImage;

RadioGroup4: TRadioGroup;

Image7: TImage;

Edit5: TEdit;

Image8: TImage;

RadioGroup5: TRadioGroup;

Image9: TImage;

RadioGroup6: TRadioGroup;

Image10: TImage;

Edit6: TEdit;

Image11: TImage;

Image12: TImage;

Image13: TImage;

Image14: TImage;

Image15: TImage;

Image16: TImage;

ListBox1: TListBox;

ListBox2: TListBox;

ListBox3: TListBox;

ListBox4: TListBox;

ListBox5: TListBox;

ListBox6: TListBox;

ListBox7: TListBox;

ListBox8: TListBox;

ListBox9: TListBox;

ListBox10: TListBox;

ListBox11: TListBox;

BitBtn1: TBitBtn;

Label2: TLabel;

Label3: TLabel;

Label4: TLabel;

Label5: TLabel;

Label6: TLabel;

Label7: TLabel;

Label8: TLabel;

Image17: TImage;

Image18: TImage;

Image19: TImage;

Image20: TImage;

Image21: TImage;

Image22: TImage;

Image23: TImage;

Image24: TImage;

procedure BitBtn1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form5: TForm5;

implementation

uses Unit6;

{$R *.dfm}

procedure TForm5.BitBtn1Click(Sender: TObject);

var k,ball:integer;

begin

Form6.Show;

Form6.Label1.Caption:=Edit1.text;

k:=0;

Ball:=0;

If Edit3.Text='таблицы истинности' then begin k:=k+1; Ball:=Ball+2 end;

If RadioGroup1.ItemIndex=0 then begin k:=k+1; Ball:=Ball+2 end;

If RadioGroup2.ItemIndex=3 then begin k:=k+1; Ball:=Ball+3 end;

If RadioGroup3.ItemIndex=1 then begin k:=k+1; Ball:=Ball+2 end;

If Edit4.Text='КНФ' then begin k:=k+1; Ball:=Ball+3 end;

If RadioGroup4.ItemIndex=0 then begin k:=k+1; Ball:=Ball+2 end;

If Edit5.Text='СДНФ' then begin k:=k+1; Ball:=Ball+4 end;

If RadioGroup5.ItemIndex=0 then begin k:=k+1; Ball:=Ball+3 end;

If RadioGroup6.ItemIndex=2 then begin k:=k+1; Ball:=Ball+4 end;

If Edit6.Text='аналитический и табличный' then begin k:=k+1; Ball:=Ball+3 end;

If ((Listbox1.ItemIndex=2)and(Listbox2.ItemIndex=1)and(Listbox3.ItemIndex=4)and(Listbox4.ItemIndex=3))

then begin k:=k+1; Ball:=Ball+5 end;

If ((Listbox5.ItemIndex=4)

and(Listbox6.ItemIndex=3)

and(Listbox7.ItemIndex=8)

and(Listbox8.ItemIndex=1)

and(Listbox9.ItemIndex=6)

and(Listbox10.ItemIndex=2)

and(Listbox11.ItemIndex=5))

then begin k:=k+1; Ball:=Ball+1 end;

Ball:=round( 2.94*Ball);

Form6.Label2.Caption:='Количество правильных ответов'+' '+inttostr(k);

Form6.Label3.Caption:='Количество неправильных ответов'+' '+inttostr(12-k);

Form6.Label4.Caption:='Количество баллов'+' '+inttostr(Ball);

end;

end.

unit Unit6;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, ExtCtrls, Buttons;

type

TForm6 = class(TForm)

Panel1: TPanel;

Panel2: TPanel;

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

Label4: TLabel;

BitBtn1: TBitBtn;

procedure BitBtn1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form6: TForm6;

implementation

uses Unit7;

{$R *.dfm}

procedure TForm6.BitBtn1Click(Sender: TObject);

begin

Form7.Show

end;

end.

unit Unit7;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, jpeg, ExtCtrls;

type

TForm7 = class(TForm)

Image1: TImage;

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form7: TForm7;

implementation

{$R *.dfm}

end.