Discussion:
I need help with a program asap
(too old to reply)
bulitpruf
2010-01-18 03:09:16 UTC
Permalink
I want to create a housing development program, this program will
accept information for a prospective home owner stored in an array
with out the used of files. for exampke the person name, address,
salary, expenses, tax, housing community you applied for etc.

if however they qualifying income is greater than a certain amount
they get to choose housing development A, else B or else C. accoring
to their net income. however it is is below either A B or C then they
are flag as not qualified.

The problem is that I can write a straight program b ut I need to do
it with an array can some one help me
Markus Humm
2010-01-18 19:55:55 UTC
Permalink
Hello,

you know how arrays work?

You should first define a record type like this:

TProspectiveOwner = record
name:String;
street:String;
city:String;
income:Integer; {or whatever suits you}
end;

then make a array out of it:

var prospectiveowners:array[1..10] of TProspectiveOwner;
singleowner:TProspectiveOwner;

Now you could store the data of 10 owners in a array.

You can do this:

singleowner:=prospectiveowners[1]; {fetch the first owner}
singleowner.name:='John Doe';
singleowner.income:=30000;
prospectiveowners[1]:=singleowner; {store the data back}

I hope this gives you some ideas how to do this.

Greetings

Markus

Loading...