:
This message was edited by ClaireB at 2005-5-30 13:58:50
:
This message was edited by ClaireB at 2005-5-30 13:54:49
: Hi,
:
: Helping me with this problem will literally save my life.
:
: For a part of my coursework this year i have a project which has to be coded in pascal. Ive left it too late to learn pascal from the ground up and so if anyone could provide some sort of template which i can modify it would be greatly appreciated. This is my last week of college and so i have 3, maybe 4 days to complete this task.
:
: Here is the project brief:
:
: A college campus is to introduce its own banking system into the college. so that students can easily access cash, made available from autotellers (ATM's) located at various points throughout the college.
:
: The ATM Banking system must perform the basic operations that any other regular ATM does:
:
: 1. Present a Menu Based System
: 2. Provide an admin facility to let users set up thier account.
: 3. Give the user the option of depositing the cash.
: 4. Give the user the option of withdrawing cash (in multiples of 10)
: 5. Give the user the option of viewing thier account detials (balance etc)
: 6. Give the user the option of printing a statement of thier account details.
:
: I know this is a long shot but can someone please advise where i should start or even create a template for me to work from. Even an msn address where i can contact you for guidance.
:
: Thank you in advance
:
: Claire
:
:
:
:
:
Here is a good start:
program ATM_Machine;
uses
Crt, Objects;
type
PTransfer = ^TTransfer;
TTransfer = object(TObject)
private
public
Transferred: Currency;
Date: TDateTime;
Next: PTransfer;
constructor CreateDeposit(AmountDeposited: Currency);
constructor CreateWithdrawal(AmountWithdrawn: Currency);
procedure LoadFromFile(var f: text);
procedure SaveToFile(var f: text);
procedure ScreenReport;
procedure PaperReport;
end;
PAccount = ^TAccount;
TAccount = object(TObject)
private
public
User: string;
Password: string;
Transfers: PTransfer;
Next: PAccount;
function CurrentBalance: Currency;
constructor Create(StartingAmount: Currency);
procedure LoadFromFile(var f: text);
procedure SaveToFile(var f: text);
procedure ScreenReport;
procedure PaperReport;
end;
var
Accounts: PAccount;
{
procedure/Method implementation here
}
var
i: integer;
begin
PerformLoad;
repeat
writeln('1: Deposit');
writeln('2: Withdraw');
writeln('3: Show Report');
writeln('4: Print Report');
writeln('5: Exit');
write('Make a selection');
readln(i);
case i of
1: PerformDeposit;
2: PerformWithdraw;
3: PerformShowReport;
4: PerformPrintReport;
end;
until i = 5;
PerformSave;
end.