Results 1 to 2 of 2
Thread: Problems with my Assignment
- 03-10-2011, 08:10 AM #1
Member
- Join Date
- Mar 2011
- Posts
- 1
- Rep Power
- 0
Problems with my Assignment
Users task is to guess 4 digits generated by my program. Those digits should be unique. My program should give a hint to users based on their guess.
No. of Green – Right digit at the right place
No. of Red – Right digit but at the wrong place
For example :
Number generated is 4589
User guess is 4810
Hint: 1 Green 1 Red
Actually..I really doesnt understand the question..can someone explain it to me?:D
- 03-10-2011, 08:15 AM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
Have you started anything yet? The goal is for the user to continually guess numbers until they have guessed every number. After each guess you need to compare there choice to the data they are guessing.
If they make a guess that is the right number in the right spot increment green. If they guess a number that is correct, but in the wrong spot, increment red, then display them.
Try storing the targets in a 4 item array. Give it a shot and see how you do, you can also start small with 2 targets digits at a time.
Similar Threads
-
Can somebody help me in this assignment?
By lulzim in forum New To JavaReplies: 25Last Post: 03-01-2011, 11:02 PM -
Need Help With Assignment
By zeo in forum New To JavaReplies: 10Last Post: 02-25-2011, 12:09 AM -
Recursion assignment problems
By tfitz666 in forum New To JavaReplies: 11Last Post: 01-24-2010, 09:18 PM -
GUI First Assignment-DUE 8/1/08
By ljk8950 in forum AWT / SwingReplies: 2Last Post: 08-01-2008, 04:23 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks