Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Calculating total

former_member576008
Active Participant
0 Kudos
67

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

2 REPLIES 2

Former Member
0 Kudos
37

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

0 Kudos
37

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 ?