unit u_Bank;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
u_Konto;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
Edit2: TEdit;
Label1: TLabel;
Label2: TLabel;
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
type
{ TBank }
TBank = class(TObject)
public
Name: String;
Standort: String;
Geld: real;
// procedure einzahlen(Betrag:real);
//procedure auszahlen(Betarg:real);
//procedure ueberweisen;
//function gibtKontostand:String;
constructor create(FName, FStandort: String);
destructor destroy;
end;
// type
{ TKonto = class(TBank)
public
Kontostand: real;
Besitzer: String;
end; }
var
Form1: TForm1;
HBank : TBank;
Konto1: TKonto;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
HBank := TBank.Create('Hansa Bank HH', 'Hamburg');
Label2.Caption:= HBank.Name;
Konto1 := TKonto.Create(1234, 1000, 'Niklas', 'Osbahr');
end;
constructor TBank.Create(FName, FStandort: String);
begin
inherited create;
Name := FName;
Standort := FStandort;
end;
destructor TBank.destroy;
begin
inherited destroy;
end;
end.