User Profile

Collapse

Profile Sidebar

Collapse
Jackwaters
Jackwaters
Last Activity: Jul 7 '10, 11:13 AM
Joined: Jul 1 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Jackwaters
    replied to How to calculate total in arrayList
    Works perfectly, thank you.
    See more | Go to post

    Leave a comment:


  • Jackwaters
    replied to How to calculate total in arrayList
    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("Customer
    ...
    See more | Go to post

    Leave a comment:


  • Jackwaters
    started a topic How to calculate total in arrayList

    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...
    See more | Go to post

  • Jackwaters
    replied to How do I find the total in an object?
    Thanks, works perfectly.
    See more | Go to post

    Leave a comment:


  • Jackwaters
    started a topic How do I find the total in an object?

    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)
    ...
    See more | Go to post
No activity results to display
Show More
Working...