1 to (length (a )) do begin.cells [1, j]:=inttostr (a [i] .nom) ;. cells [2, j]:=a [i] .grup; .cells [3, j]:=a [ i] .predmet; .cells [4, j]:=a [i] .data; .cells [5, j]:=inttostr (a [i] .ocenka) ;. cells [6, j]:=a [i] .famp; (i) ;;
;
TForm1.Button16Click (Sender: TObject) ;: arr;, j: integer;: string;: boolean; .setarr (a) ;. dvoechniki (h, g) ;. getarr (a);:=0; j:=1 to (length (h)) do.cells [0, j]:=inttostr (h [i] .nom) ;. cells [1, j]:=h [i] .grup; .cells [ 2, j]:=h [i] .predmet; .cells [3, j]:=h [i] .famp; (i) ;;;
.
Додаток 2
Модуль Unit_def.
unit Unit_Def; sysutils, zapisi;=class: integer;:String ;: string;:String;:Integer;:String; Create; Destroy (var msg: string); nom: integer read inom write inom; grup: string read igrup write igrup; predmet: string read ipredmet write ipredmet; data: string read idata write idata; ocenka: integer read iocenka write iocenka; famp: string read ifamp write ifamp;
;
Tstudent.Create;:=0;:= raquo ;;:= raquo ;;:= raquo ;;:=0;:= raquo ;;;
Tstudent.Destroy (var msg: string);
msg:= Об'єкт був видалений! raquo ;;
end;.
Додаток 2
Модуль Unit_operation.
unit Unit_Operation;
SysUtils, unit_def, massiv;=class (tstudent): arr; create (n: integer); add_stud (s: tstudent); sort_vstavka (var g: tgruppa); getarr (var a: arr ); setarr (a: arr); statement (var s: arr; s1, s2: string); sredn (s: arr; s1, s2: string): real; dvoechniki (var s: arr; var g: tgruppa) ;;
Tgruppa.getarr (var a: arr);:=gruppa ;;
tgruppa.setarr (a: arr); i: integer; (gruppa, length (a)); i:=0 to (length (gruppa) - 1) do [i]:=tstudent.Create; [i]:=a [i] ;;;
tgruppa.sort_vstavka (var g: tgruppa); i, j, k: integer;: boolean;: tstudent;: string [50]; i:=0 to (length (gruppa) - 2 ) do:=false; j:=i + 1 to ((length (gruppa)) - 1) dog.gruppa [i] .predmet gt; g.gruppa [j] .predmet then:=g.gruppa [j]. predmet;:=j;:=true ;; flag=true then:=g.gruppa [i] ;. gruppa [i]:=g.gruppa [k] ;. gruppa [k]:=buf ;;;; ;
tgruppa.sredn (s: arr; s1, s2: string): real;, u, m, q: integer;: real;:=0;:=0; i:=0 to high (s) do ((s [i] .grup)=s1) and ((s [i] .predmet)=s2) then:=s [i] .ocenka;:=u + q;:=m + 1 ;;:=u/m;:=sr ;;
Tgruppa.create (n: integer); i: integer; (gruppa, n); i:=0 to (n - 1) do [i]:=tstudent.Create ;;
Tgruppa.add_stud (s: tstudent); (gruppa, length (gruppa) +1); [length (gruppa) - 1]:=s ;;
Tgruppa.statement (var s: arr; s1, s2: string) ;: integer; i:=0 to high (gruppa) do ((gruppa [i] .grup)=s1) and ((gruppa [i] .predmet)=s2) then (s, length (s) +1); [length (s) - 1]:=gruppa [i] ;;;;
Tgruppa.dvoechniki (var s: arr; var g: tgruppa); i: integer; i:=0 to (high (gruppa)) do (gruppa [i] .ocenka=2) and (gruppa [i] .nom=gruppa [i] .nom) then (s, length (s) +1); [length (s) - 1]:=gruppa [i] ;;;;
.
Додаток 4
Модуль massiv.
unit massiv; sysutils, unit_def, zapisi;=array of tstudent;=array of rstudent;.
Додаток 5
Модуль zapisizapisi;
sysutils;=record: integer;:String [255] ;: string [255];:String [255];:Integer;:String [255] ;;.
Додаток 3
Модуль bukvabukva;
SysUtils; Tur (const s: string): string; Tur (const s: string): string;, s2: string;:=s;:=ansiuppercase (s1);:=copy ( s1,2, length (s1) - 1);:=ansilowercase (s2); (s2, s1,2);:=copy (s1,1, length (s));:=s1 ;;
.