Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How do I do this?

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How do I do this?

    Create a menu which asks the user:

    a. Which drink do you like the best?"
    b. Coffee(1)
    c. Tea (2)
    d. Coke(3)
    e. Orange Juice(4)
    f. (-1 to exit)
    g. Create a bar graph next to choice indicating the number of votes using *s after each vote
    h. Keep asking this question until the user enters -1
    (HINT: Declare integer variables for each type of drink, and use them as control variables)

    For example:
    a. Coffee(1) **
    b. Tea (2) *
    c. Coke(3) *****
    d. Orange Juice(4) **
    Would indicate 2 votes for coffee, 1 for tea, 5 for code, and 2 for Orange Juice

  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: How do I do this?

    You posted this in the "What's Wrong with My Code?" forum, but you haven't actually posted any code.

    Please follow the directions here: http://www.javaprogrammingforums.com...e-posting.html
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!