unit Unit6;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Math, StdCtrls;
type
TForm6 =
class(TForm)
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Edit4: TEdit;
Label8: TLabel;
Label9: TLabel;
Edit5: TEdit;
Label10: TLabel;
Edit6: TEdit;
Label11: TLabel;
Edit7: TEdit;
Button1: TButton;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label17: TLabel;
Button2: TButton;
Label3: TLabel;
Edit8: TEdit;
Edit9: TEdit;
Edit10: TEdit;
Edit11: TEdit;
Label18: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
function Zimmer(a, b, c, d, e, f: Real):Real;
function BerechneAbluft(Baeder, Kuechen, Toiletten, HWR: Real): Real;
function BerechneZuluft(Nutzer: Real):Real;
function Innenliegend(Baeder, Kuechen, Toiletten, HWR: Real): Real;
{ Public-Deklarationen }
end;
var
Form6: TForm6;
Baeder, Kuechen, Toiletten, HWR, Schlafzimmer, Wohnzimmer, Nutzer, ZimmerG, Innen, a, b, c, d, e, f: Real;
implementation
uses Unit7;
function TForm6.Innenliegend(Baeder, Kuechen, Toiletten, HWR: Real): Real;
begin
Innenliegend := Baeder+Kuechen+Toiletten+HWR
end;
function TForm6.BerechneAbluft(Baeder, Kuechen, Toiletten, HWR: Real): Real;
begin
BerechneAbluft := (Baeder+Kuechen)*60+(Toiletten+HWR)*30;
end;
function TForm6.Zimmer(a, b, c, d, e, f: Real): Real;
begin
Zimmer := a+b+c+d+e+f;
end;
function TForm6.BerechneZuluft(Nutzer: Real):Real;
begin
BerechneZuluft := (Nutzer*30);
end;
{$R *.dfm}
procedure TForm6.Button1Click(Sender: TObject);
begin
a := StrToFloat(Edit8.Text);
b := StrToFloat(Edit9.Text);
c := StrToFloat(Edit10.Text);
d := StrToFloat(Edit11.Text);
e := StrToFloat(Edit7.Text);
f := StrToFloat(Edit6.Text);
ZimmerG := (Zimmer(a, b, c, d, e, f));
Innen := (Innenliegend(Baeder, Kuechen, Toiletten, HWR));
Nutzer := StrToFloat(Edit5.Text);
Baeder := StrToFloat(Edit1.Text);
Kuechen := StrToFloat(Edit2.Text);
Toiletten := StrToFloat(Edit3.Text);
HWR := StrToFloat(Edit4.Text);
Label16.Caption := FloatToStr(BerechneZuluft(Nutzer));
Label13.Caption := FloatToStr(BerechneAbluft(Baeder, Kuechen, Toiletten, HWR));
Label18.Caption := FloatToStr(ZimmerG);
if
Label16.Caption = '
0'
then
showmessage ('
Bitte prüfen Sie Ihre Angaben');
end;
procedure TForm6.Button2Click(Sender: TObject);
begin
Form7.Show;
end;
end.
[B]und der
Unit 8[/B]
unit Unit8;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Unit6;
type
TForm8 =
class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label14: TLabel;
Button1: TButton;
Label13: TLabel;
Label15: TLabel;
Label16: TLabel;
Label17: TLabel;
Label18: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form8: TForm8;
Bewertung, Infiltration, Feuchteschutz, Innen, ZimmerG, Nutzer: Real;
implementation
{$R *.dfm}
procedure TForm8.Button1Click(Sender: TObject);
begin
Label17.Caption := FloatToStr(ZimmerG);
Label16.Caption := FloatToStr(Nutzer);
Label18.Caption := FloatToStr(Bewertung);
if
Feuchteschutz < Infiltration
then
Label13.Caption := '
Ja'
else
Label13.Caption := '
Nein';
if
Innen > 0
then
Label15.Caption := '
Ja'
else
Label15.Caption := '
Nein'
end;
end.