Thread: help on logic

  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    11

    help on logic

    I have a program that is supposed to first display a restraunt menu. Then it takes orders... the limitation to this is that you can only take up to 8 orders and only one order per item (there are 8 items to choose from too)... After it takes the orders it will then display an invoice of the items selected add the tax to the item then display an amount due....

    my question is... would using a Record (structs) be too much or is an array a simplier way to do it...

    If my explanation is too confusing I'll post the instructions then...


    Heres the Logic I'm thinking about:
    Code:
    --*Program Start*--
    
    Display Welcome         }   These three are part 
    Display Menu            }   of a function called
    Display Instructions    }   "showMenu" (Required)
    
    
    Ask User to Choose an Item Number
    Ask User if they would like another Item
    REPEAT Until No is received
    
    When No is received Run function Print Check
    
    Print Check--
      Display Item(s) selected
      Display Tax
      Display Amount Due
    
    --*Program End*--

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > my question is... would using a Record (structs) be too much or is an array a simplier way to do it...
    No idea - but choosing one and doing it will tell you something
    Doing both and comparing your experience will tell you even more.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    /*enjoy*/
    Join Date
    Apr 2004
    Posts
    159
    I advice you to use them (*first-object-array) because you have a menu that can be open all day and never know how much of no one are going to consult the slim (" in even time sometimes ")
    then them (*first-object-array) assure an economy at the level of the memory and facilitate it of management in the program
    if you have any question for using (*) write to me ?
    /* exucuse me for mistakes because i use a translator (writing english) */

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Digital Logic
    By strokebow in forum Tech Board
    Replies: 3
    Last Post: 12-09-2006, 01:05 PM
  2. Logic
    By LordBronz in forum C++ Programming
    Replies: 6
    Last Post: 05-23-2006, 05:41 PM
  3. Actors, cues, event based logic.
    By Shamino in forum Game Programming
    Replies: 2
    Last Post: 04-27-2006, 10:58 PM
  4. Circular Logic
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 10-15-2001, 08:10 PM