plzzzzz help me on this java programming question?
hello people.. can u plzzzzzzzzzzzzzzzzzzz help me out with this java programm. its due tmrw....... and i havent even get started on this program. i dont want to cheat .... actually some hints of how to do this program and a brief skelton of this would be really great......

and i dont mind if u can give me the whole code for this program

by the way u are not supposed to use arrays in this question

This program represents the peg jumping puzzle.

The board starts out with a single blank position, represented by
the 'O'. To make a move, select the letter of the peg to be moved,
then the letter of the destination position. (e.g. the first move
might be: d a, meaning we move peg ‘d’ into blank position ‘a’.)
A peg must be able to jump over an adjacent peg into a blank for a
move to be valid. The jumped peg is then removed from the board.
The game is over when there are no valid moves left to be made, or
when there is a single peg left.

At any point enter 'x' to exit the program.
-----------------------
Board Positions
o A
+ + B C
+ + + D E F
+ + + + G H I J
+ + + + + K L M N O

1. Enter your move: D a


-----------------------
Board Positions
+ A
o + B C
o + + D E F
+ + + + G H I J
+ + + + + K L M N O

2. Enter your move: K D


-----------------------
Board Positions
+ A
o + B C
+ + + D E F
o + + + G H I J
o + + + + K L M N O

3. Enter your move: i g


-----------------------
Board Positions
+ A
o + B C
+ + + D E F
+ o o + G H I J
o + + + + K L M N O

4. Enter your move: n p
*** Invalid destination. Please retry ****
4. Enter your move: q n
*** Invalid source. Please retry ****
4. Enter your move: j h
*** Must jump a piece. Please retry. ***
4. Enter your move: b i
*** Source must have a piece. Please retry. ***
4. Enter your move: l n
*** Destination must be empty. Please retry. ***
4. Enter your move: g b

-----------------------
Board Positions
+ A
+ + B C
o + + D E F
o o o + G H I J
o + + + + K L M N O

5. Enter your move: a d


-----------------------
Board Positions
o A
o + B C
+ + + D E F
o o o + G H I J
o + + + + K L M N O

6. Enter your move: c h


-----------------------
Board Positions
o A
o o B C
+ o + D E F
o + o + G H I J
o + + + + K L M N O

7. Enter your move: l e


-----------------------
Board Positions
o A
o o B C
+ + + D E F
o o o + G H I J
o o + + + K L M N O

8. Enter your move: j c


-----------------------
Board Positions
o A
o + B C
+ + o D E F
o o o o G H I J
o o + + + K L M N O

9. Enter your move: c h


-----------------------
Board Positions
o A
o o B C
+ o o D E F
o + o o G H I J
o o + + + K L M N O

10. Enter your move: n l


-----------------------
Board Positions
o A
o o B C
+ o o D E F
o + o o G H I J
o + o o + K L M N O

11. Enter your move: d m


-----------------------
Board Positions
o A
o o B C
o o o D E F
o o o o G H I J
o + + o + K L M N O

12. Enter your move: l n


-----------------------
Board Positions
o A
o o B C
o o o D E F
o o o o G H I J
o o o + + K L M N O

13. Enter your move: o m


-----------------------
Board Positions
o A
o o B C
o o o D E F
o o o o G H I J
o o + o o K L M N O


# left Rating
------ ---------------
>4 Dufus
4 Poor
3 Mediocre
2 Good Job
1 Awesome Genius!

You had 1 left. Awesome Genius!

Thanks for playing. Exiting...


Notes:

1. Giving input of 'x' as the first input for every move must result in displaying the ratings table and then exiting the program.
2. As illustrated above, either lower case or upper case should be accepted for input. You may assume that the user gives exactly one character, one space, then a second character on each input line (unless they enter 'x' for exit).

Recommended Answers

All 2 Replies

>and i dont mind if u can give me the whole code for this program

So, actually you are perfectly ok with cheating, even though you claim you don't want to.
Read your class notes, get a program outline or at least a decent amount of pseudo code together on your own, and post that back here with specific questions or errors.

No one here is going to complete this for you. Better get started soon, you don't have a lot of time left.

commented: Caught him !!! +2
commented: lol +6

plzzzzz help me on this java programming question?
hello people.. can u plzzzzzzzzzzzzzzzzzzz help me out with this java programm. its due tmrw....... and i havent even get started on this program. i dont want to cheat .... actually some hints of how to do this program and a brief skelton of this would be really great......

and i dont mind if u can give me the whole code for this program

just some thoughts...
1. unless you plan to use a bit more vowels in your Java code, I'm quite sure it won't compile
2. if it's due 'tmrw', you should 've started on it earlier
3. I was a lazy student too, the first year, but there's nothing like a bit of pressure to motivate someone, that means if that someone wants to complete the assignment. I'd say, start coding and we'll help you sort out the errors (if any). since it is a fixed assignment, I doubt it requires any skill you haven't been thought in class

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.