# Help With Program

• May 20th, 2013, 05:58 PM
bmann40
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!
• May 20th, 2013, 07:59 PM
jps
Re: Help With Program
Welcome bmann40

You are correct, we don't like to do whole programs. So we don't.
• May 21st, 2013, 10:39 AM
bmann40
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!
• May 21st, 2013, 07:02 PM
Junky
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.
• May 22nd, 2013, 06:42 PM
jps
Re: Help With Program
Quote:

Originally Posted by bmann40
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?