Menus for a shoes program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amal123
    New Member
    • Mar 2007
    • 3

    #1

    Menus for a shoes program

    Hey ppl....in currently studing c programming and finding it hard, i 've been asked to create a program for a shoe shop and i dont even know where to start.

    fisrt i thought i could do the main menu but i have no clue how to go about it

    i want my menu to be like this

    add shoes
    edit shoes
    display shoes
    search shoe
    and exit program

    i would like my program to display those 5 functions

    and then i would like to get those function working, like i would like to be able to add shoes to the program and so on

    the type of data i would like to add is

    name
    stlye
    department
    colour
    size
    price

    please can u help me to do this, i would be very greatfull and it would help me to understanding.
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    Originally posted by amal123
    Hey ppl....in currently studing c programming and finding it hard, i 've been asked to create a program for a shoe shop and i dont even know where to start.

    fisrt i thought i could do the main menu but i have no clue how to go about it

    i want my menu to be like this

    add shoes
    edit shoes
    display shoes
    search shoe
    and exit program

    i would like my program to display those 5 functions

    and then i would like to get those function working, like i would like to be able to add shoes to the program and so on

    the type of data i would like to add is

    name
    stlye
    department
    colour
    size
    price

    please can u help me to do this, i would be very greatfull and it would help me to understanding.
    I would recommend on getting core functionality working first. You need to develop an algorithm - a list of simple steps that you could do with or without a computer to solve your problem.

    Such as:

    Display menu
    get menu choice
    if (menu choice == 1)
    then....
    if (menu choice == 2)
    then....

    and so on.

    Comment

    • willakawill
      Top Contributor
      • Oct 2006
      • 1646

      #3
      I can promise you this. There is no shame or loss of marks in going to your teacher and asking the same question. That is what a very smart programmer would do. Your task is not to fool your teacher into thinking you are an expert programmer. You gain nothing from that. Zero.

      Comment

      • RedSon
        Recognized Expert Expert
        • Jan 2007
        • 4980

        #4
        Instead of jumping right into writing the code as suggested above, why dont you spend some time designing what your program is going to look like. Which modules are going to have what responsibilitie s? Can you picture what a real life version of your program would look like. Try creating a program that models the real phenomenon you are trying to simulate.

        Comment

        • vpascuzzi
          New Member
          • Mar 2007
          • 23

          #5
          Originally posted by sicarie
          I would recommend on getting core functionality working first. You need to develop an algorithm - a list of simple steps that you could do with or without a computer to solve your problem.
          That's the best bet. Psuedocode (an english translation of computer language) is the first step to programming any program.

          Write it out on paper first. Jumping into the problem just by sitting down and expecting the answers to come to you at your desk is foolish and most of the time non-progressive.

          ----------------
          Shoe Store
          ----------------
          What will the program do? You already know.

          What options are offered to the customer? You know that too.

          Then construct certain conditions to be met, and break it down into parts.
          ----------------

          You should not need any more knowledge than the use of for...loops, cin, cout, if/else. Just brainstorm, then attack.

          Other than that, good luck!

          Comment

          • RedSon
            Recognized Expert Expert
            • Jan 2007
            • 4980

            #6
            I like that..."Brainst orm, then attack!!" I'm going to use that line now!

            Comment

            • amal123
              New Member
              • Mar 2007
              • 3

              #7
              Yeah i alrealy know what moduals i will need and how my program would look like but really need a little help with doing it
              The modules which i will have are

              Add
              Edit
              Search
              Delete
              Print
              I would like to add, edit , search ect the shoe which are being inputted.

              Comment

              • willakawill
                Top Contributor
                • Oct 2006
                • 1646

                #8
                Talk to your professor. It is vital that you do so.

                Comment

                • Mack
                  New Member
                  • Feb 2007
                  • 11

                  #9
                  Its easy buddy.

                  design switch case statement make do while loop until option enter is none of above exit loop.
                  now getting back to do while loop once u get in 1..add
                  2..delete
                  3..edit

                  take 6as exit
                  return(0);
                  now if u get in 1 design with case statement and write appropriate function for each.

                  its not that diificult.

                  Good luck.

                  Regards,
                  Mack.

                  Comment

                  • latitude
                    New Member
                    • Nov 2006
                    • 50

                    #10
                    Sounds like you need to be studying alot harder rather than searching for easy solutions on the net ....

                    Comment

                    • amal123
                      New Member
                      • Mar 2007
                      • 3

                      #11
                      Thansks for you reply, i'm working on the program i and done quite a bit, but got stuck on validating the price in C.
                      How would i validate a price, so the user can inputs the amount it like £25.00 for example.

                      Comment

                      • sicarie
                        Recognized Expert Specialist
                        • Nov 2006
                        • 4677

                        #12
                        Originally posted by amal123
                        Thansks for you reply, i'm working on the program i and done quite a bit, but got stuck on validating the price in C.
                        How would i validate a price, so the user can inputs the amount it like £25.00 for example.
                        Use the conditional operators in a while statement (to keep the user from putting in a bad value and moving on with the program, crashing it somewhere down the line), and a sentinel boolean is_done as the while condition.

                        Comment

                        Working...