P
Paul Roche
Hi. I want to create the following class.......
Client
attributes
name, amount_wealth, loans, lender, bankrupt (a boolean)
methods
is_client_solvent? (I declare the client bankrupt if total amount of
loans is greater than wealth)
amount_owed (amount owed to the lender)
lender_owed (the amount owed to the lender)
I have a few questions about this....
it's possible for a client to have more than one lenders. Do I just
create muliple instances eg..
client1 = new Client("Joe Bloggs", 50000, 1000, "USA Bank", nil)
client2 = new Client("Joe Bloggs", 50000, 3000, "Chicago Bank", nil)
or do I use arrays?
Is it correct to use 2 different instance names for client "Joe Bloggs"?
i.e client1 and client2
If I use many instances, how do I get the aggregate of loans of each
bank for a specific client?
Client
attributes
name, amount_wealth, loans, lender, bankrupt (a boolean)
methods
is_client_solvent? (I declare the client bankrupt if total amount of
loans is greater than wealth)
amount_owed (amount owed to the lender)
lender_owed (the amount owed to the lender)
I have a few questions about this....
it's possible for a client to have more than one lenders. Do I just
create muliple instances eg..
client1 = new Client("Joe Bloggs", 50000, 1000, "USA Bank", nil)
client2 = new Client("Joe Bloggs", 50000, 3000, "Chicago Bank", nil)
or do I use arrays?
Is it correct to use 2 different instance names for client "Joe Bloggs"?
i.e client1 and client2
If I use many instances, how do I get the aggregate of loans of each
bank for a specific client?