Updating price information and displaying previous price for restaurant menu

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • changwl8888
    New Member
    • Mar 2010
    • 11

    Updating price information and displaying previous price for restaurant menu

    I have a program with restaurant menu and 3 food items..
    in the program i can choose the food and update the price for multiple times..
    And at the same time, i have sales report reporting price of each units and total..

    But the program allow to update price at any time, i need the program to show previous price and show recent price...How is it? What functions should i use?

    the sales report should look like this..
    Total Sales:
    Muffin: 16 $32.00
    Muffin: 2 $10.00
    Muffin: 3 $30.00
    Shake: 0 $0.00
    Coffee: 0 $0.00
    -----------------------
    16 $32.00

    for now i have already finished the coding..but i need to produce something can update price and previous price is keep...like example above...anyone ideas?
  • pbrockway2
    Recognized Expert New Member
    • Nov 2007
    • 151

    #2
    One way would be to have a class representing a Price. That class could have an accessor method getPrice() returning a double value for use in arithmetic by the caller. But it could also offer getPreviousPric e() returning the value before the most recent change.

    Comment

    Working...