2008 Feb 16 6:03 AM
Hi sdns..!
My problem is calculating total in bank transactions using global class builder. I declared total as I type in attributes. When the method deposit is called the amount deposited is added to the total,thats fine. When the withdraw method is called balance checking should be done. But the problem is total is showing zero for me.And i want to display my total available balance also.
I even tried using static(class-data) didnt get the answer.
Help me...
with regards
Nandha
2008 Feb 18 7:25 AM
Hi,
Are you calling the method in the same instance? If it is the same instance, then the total will display the correct value that has been added before.
Regards,
Teddy
2008 Feb 19 5:16 AM
Hi Teddy ..!
yeah i called it in the same instance but didnt get the answer.In my class builder i have the following
methods:
deposit ( parameter deposit ),
withdraw (parameter withdraw),
display (parameter date- should display transaction details based on date).
attributes:
total as class-data.
In the deposit implementation
total = deposit.
upto this fine.
When calling withdraw the total amount is showing zero.
What to do ?