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 5 of 5

Thread: Help With Program

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help With Program

    Create a JApplet that plays a card game named Lucky Seven. In real life, the game can be played with seven cards, each containing a number from 1 through 7, that are shuffled and dealt number side down. To start the game, a player turns over any card. The exposed number on the card determines the position(reading from right to left) of the next card that must be turned over. For example if the player turns over the first card and its number is 7, the next card turned must be the seventh card (counting from left to right). If the player turns over a card whose number denotes a position that was already turned, the player loses the game. If the player succeeds in turning over all seven cards, the player wins.
    Instead of cards, you will use seven buttons labeled 1 through 7 from left to right . Randomly associate one of the seven values 1 through with each button.(In other words, the associated value might, or might not be the equivalent to the button’s labeled value.) When the player clicks a button, reveal the associated hidden value. If the value represents the position of a button already clicked the player loses. If the revealed number represents an available number, force the user to click it - that is, do not take any action until the user clicks the correct button. After a player clicks the button remove the button from play.(After you remove a button, you can call repaint() to ensure that the image of the button is removed.)
    For example a player might click Button 7, revealing a 4. Then the player clicks Button 4, revealing a 2. Than he player clicks button 2, revealing a 7. The player loses because Button 7 is already “used.”

    I know you guys don't like to do whole program sbut this would be a life saver!


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Help With Program

    Welcome bmann40

    You are correct, we don't like to do whole programs. So we don't.
    What we do like to do is help you write your own code.

  3. #3
    Junior Member
    Join Date
    May 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Help With Program

    IS there any way you can help me with this, becuase I have no idea what I'm doing. The teacher handed this question to us with no instruction and I am lost. Any help would be appreciated thanks!

  4. #4
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,545
    My Mood
    Grumpy
    Thanks
    0
    Thanked 167 Times in 158 Posts

    Default Re: Help With Program

    You still don't get it. You need to attempt to write some code and when you get stuck ask a specific question. "I don't know what to do" is too broad and vague for us to answer. The only advice we can give is go back and read your textbook, class notes or online tutorials.
    Improving the world one idiot at a time!

  5. #5
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Help With Program

    Quote Originally Posted by bmann40 View Post
    IS there any way you can help me with this
    I like to take my homework or instructions or assignment or job (call it what ever) and turn them into a series of steps that fulfill the needs while adhering to the rules.
    From those steps you can organize classes with fields and methods to use in pseudo code and so on.

    What problem solving method do you use to turn a problem into a solution through code? Some order of operation or organized plan?
    If you have not gone past copy-pasting your assignment to a forum, try to determine what the final outcome or goal is first. I want a program to: ...
    If you are past that, : What part of the process are you in? Where are you stuck?

Similar Threads

  1. Invoke a Java program with windows program
    By jackhard in forum Object Oriented Programming
    Replies: 1
    Last Post: February 21st, 2013, 07:16 AM
  2. Program goes into infinite compilation. University project - Library Program.
    By clarky2006 in forum What's Wrong With My Code?
    Replies: 35
    Last Post: November 10th, 2012, 03:56 PM
  3. Replies: 1
    Last Post: July 8th, 2012, 10:23 AM
  4. how to run a java program..when the program using jar
    By miriyalasrihari in forum Java Theory & Questions
    Replies: 2
    Last Post: May 17th, 2012, 10:04 AM
  5. Help with class program!!! STUCK! Program not doing what I Want!!!
    By sketch_flygirl in forum What's Wrong With My Code?
    Replies: 7
    Last Post: April 4th, 2011, 07:29 AM

Tags for this Thread