unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Unit_GeoObjekte;
type
TForm1 =
class(TForm)
E_Laenge: TEdit;
E_Breite: TEdit;
B_Rechteck: TButton;
E_Flaeche: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
E_Umfang: TEdit;
Label6: TLabel;
Label7: TLabel;
E_Radius: TEdit;
B_Kreis: TButton;
Label8: TLabel;
Label9: TLabel;
E_Quadrat: TEdit;
B_Quadrat: TButton;
procedure FormCreate(Sender: TObject);
procedure B_RechteckClick(Sender: TObject);
procedure B_KreisClick(Sender: TObject);
procedure B_QuadratClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
geo: TGeo;
rechteck: TRechteck;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
rechteck := rechteck.Create(100,100);
end;
procedure TForm1.B_RechteckClick(Sender: TObject);
var Laenge, Breite: single;
begin
Laenge:= strtofloat(E_Laenge.Text);
Breite:= strtofloat(E_Breite.Text);
rechteck.SetL(Laenge);
rechteck.SetB(Breite);
rechteck.BerechneF;
rechteck.BerechneU;
E_Flaeche.Text:=floattostr(geo.GetF);
end;
procedure TForm1.B_KreisClick(Sender: TObject);
begin
//
end;
procedure TForm1.B_QuadratClick(Sender: TObject);
begin
//
end;
end.