;[i].Lim:=VL[i];;;SLO.Get_SLO:TArrLo;(result,length(fSys));:=fSys;;
//---------------------------------------------------------SLO.Check(SG:TStringGrid):boolean;:integer;:TIVector;(VS, SG.ColCount); i:=0 to SG.ColCount - 1 do [i]:=StrToInt (SG.Cells [i, 1]);:=true; i:=0 to high (fSys) doNot fSys [i ] .Check_Solution (VS) then:=false ;;;; SLO.Into_text: TSVector;: integer; (result, length (fSys)); i:=0 to high (result) do [i]:=fSys [i ] .Lo_IntoString ;;
//---------------------------------------------------------SLO.Sort_SLO;,j:integer;length(fSys)gt;1 then (fSys, length (fSys) +1); i:=1 to high (fSys) do:=i - 1; [high (fSys)]:=fSys [i]; (j gt; - 1) and (fSys [high (fSys)]. fSort lt; fSys [j] .fSort) do [j + 1]:=fSys [j];:=j - 1 ;; [j + 1]:=fSys [high (fSys) ] ;; (fSys, length (fSys) - 1) ;;;.
delphi об'єктній орієнтований програмування
Текст модуля Form1
Class_Form1 ;, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ,, StdCtrls, Spin, Grids, _Lin_Obmezh, ExtCtrls;=array of integer;=array of String;=array of TIVector ;=class (TForm): TStringGrid ;: TSpinEdit ;: TSpinEdit ;: TLabel ;: TLabel ;: TButton ;: TButton ;: TButton ;: TRadioGroup ;: TStringGrid ;: TLabel ;: TMemo ;: TButton ;: TOpenDialog ;: TSaveDialog ;: TButton ;: TButton ;: TButton; SpinEdit1Change (Sender: TObject); Button1Click (Sender: TObject); SpinEdit2Change (Sender: TObject); Button2Click (Sender: TObject); FormCreate (Sender: TObject); Button3Click (Sender: TObject ); RadioGroup1Click (Sender: TObject); Button4Click (Sender: TObject); Button5Click (Sender: TObject); Button6Click (Sender: TObject); FormClose (Sender: TObject); Button7Click (Sender: TObject); IsEmpty1 (Sender: TObject):boolean; IsEmpty2 (Sender: TObject): boolean ;;: TForm1; _1: SLO;
{$ R * .dfm} TForm1.FormCreate (Sender: TObject);.ColCount:=3;.RowCount:=2;.Cells[0,0]:=laquo;a1raquo;;.Cells[1,0]:=laquo;=,lt;=,gt;=raquo;;.Cells[2,0]:=laquo;Limitraquo;;.Cells[0,0]:=laquo;x1raquo;;;TForm1.FormClose(Sender: TObject); _ 1.Free ;;
//----------------- IsEmpty1,2 ------------------------------ TForm1.IsEmpty1 (Sender: TObject): boolean;:=StringGrid1.Cells [0,1]= raquo ;;; TForm1.IsEmpty2 (Sender: TObject): boolean ;: =StringGrid2.Cells [0,1]= raquo ;;;
//-----------------Button_Exit-----------------------------TForm1.Button1Click(Sender: TObject) ;;;
//----------------- ввід к-сті елементів ЛО та к-сті ЛО -----
procedure TForm1.SpinEdit1Change (Sender: TObject) ;, i, j: byte; .Enabled:=True;:=SpinEdit1.Value; .ColCount:=n + 2; .ColCount:=n ; i:=0 to SpinEdit1.Value doj:=1 to SpinEdit2.Value do.Cells [i, j]:= raquo ;;. Cells [i, j]:= raquo ;;; i:= 0 to n - 1 do.Cells[i,0]:=laquo;araquo;+IntToStr(i+1);.Cells[i,0]:=laquo;xraquo;+IntToStr(i+1);;.Cells[n,0]:=laquo;=,lt;=,gt;=raquo;;.Cells[n+1,0]:=laquo;Limitraquo;;Click(Sender);;TForm1.SpinEdit2Change(Sender: TObject) ;: byte; .Enabled:=True;:=SpinEdit2.Value; .RowCount:=n + 1; Click (Sender) ;;
//----------------- Button Reset ---------------------------- TForm1.Button2Click (Sender: TObject) ;, j: integer; .Value:=1; .Value:=1; .ColCount:=3; .RowCount:=2; .ItemIndex:=0 ; i:=0 to 2 doj:=1 to 1 do.Cells [i, j]:= raquo ;; i:=Memo1.Lines.Count downto 0 do.Lines.Delete (i) ;. Cells [ 0,1]:= raquo ;;. Enabled:=False; SLO_1 lt; gt; nil then_1.Free; _1:=nil ;;
end;
//----------------- Вибір способу введення ---------------------
procedure TForm1.RadioGroup1Click (Sender: TObject) ;, j, k: byte ;; RadioGroup1.ItemIndex=1 theni:=0 to StringGrid1.ColCount - 3 doj:=1 to StringGrid1.RowCount -1 do.Cells [i, j]:=IntToStr (random (10) - 5); i:=1 to StringGrid1.RowCount - 1 do.Cells [SpinEdit1.Value + 1, i]:=IntToStr (random (10 ));:=random (3); k=0 then.Cells [SpinEdit1.Value, i]:= lt;= k=1 then.Cells [SpinEdit1.Value, i]:= gt ;= k=2 then.Cells [SpinEdit1.Value, i]:== raquo ;; i:=0 to StringGrid1.ColCount - 1 doj:=1 to StringGrid1.RowCount - 1 do.Cells [i , j]:= raquo ;;;
//----------------- Вивід ЛО в Memo та стврення класу -------
procedure TForm1.Button3Click (Sender: TObject) ;: integer; SLO_1 lt; gt; nil then_1.Free; _1:=nil ;; i:=Memo1.Lines.Count downto 0 do.Lines. Delete (i); IsEmpty1 (Sender) then ( Заповніть таблицю значень ) ;;; _ 1:=SLO.Create (SpinEdit2.Value);
//-----------------_ 1.Set_Sys (StringGrid1);
//----------------- i:=0 to high (SLO_1.Into_text) do.Lines.Add (SLO_1.Into_text [i] ) ;;
//----------------- Button Check Solution ------------------- TForm1.Button4Click (Sender: TObject); IsEmpty1 (Sender) ...