User Profile
Collapse
-
Works perfectly, thank you. -
How would I use it to display the total number of orders on say Monday. I don't want the total for that day just the total number of orders.
For example (using your code):
...Code:orders.Add(new PizzaOrder("Customer A", new DateTime(2010, 7, 1, 12, 5, 0), (decimal)19.95d)); orders.Add(new PizzaOrder("Customer B", new DateTime(2010, 7, 1, 13, 30, 0), (decimal)6.99d)); orders.Add(new PizzaOrder("CustomerLeave a comment:
-
How to calculate total in arrayList
I have a problem in that I have an arrayList called pizzaOrders which contains a number of pizza orders. The pizza orders contain information like names, addresses, total price for orders and the dates of orders.
The date is selected through a dateTimePicker. Basically what I need to do is count the orders on a particular day and produce a graph for this.
So I need, for example, to search the arrayList and calculate... -
-
How do I find the total in an object?
I am building a music store example in python. I am trying to find a way of displaying the total of all of the sales of all of the music.
Everything is stored in objects in a list trackList. Track is the object so track.sales returns the sales of particular track.
This is what I have so far:
...Code:def totalSales(trackList): for track in trackList: total = sum(track.sales)
No activity results to display
Show More
Leave a comment: