Creating a running total for one of my methods

Hello i am having trouble creating a running total of one of my methods.

public double calcProduct()

{

productTotal = price * qty * shipCost;

return productTotal;

}

the method i have listed above is supposed to calculate the total of 4 instances i have created but for some reason it is adding up the same number of "562" despite shipping cost and all the products being priced different. I also need a grand total of the 4 instances in one set price. i also have a static double called productTotal uninitialized....

Read More »

By: StackOverFlow - 7 days ago

Related Posts