Click here to Skip to main content
15,895,283 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new into programming, so I found an exercise to build Rock scissors paper game as follow:

Build Tool Maven or Gradel.

Player A always chooses paper Player B makes a random choice

The game should let both players play 100x against each other. The output of the program should be the following Format (with possibly other numbers):

"Player A wins 31 out of 100 games"

"Player B wins 37 out of 100 games"

("Tie: 32 of 100 games")

The code should be thoroughly tested with JUnit (+ possibly Mockito).

Could anyone help me building the code of it? I'm really lost (oop is NOT easy but I want to learn it).

Thanks.

What I have tried:

where I have to start with this program
Posted
Updated 10-Nov-18 22:01pm

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think! Seriously - give it a try. Even if you don't get it right, (especially if you don't get it right!) you will learn something for the next iteration. Us just telling you what to do both doesn't help you in the long run, and is unfair on your classmates who have tried to do it themselves.

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!
 
Share this answer
 
Quote:
I am new into programming, so I found an exercise to build Rock scissors paper game as follow:

It is the wrong method, nobody learn to drive by winning a Formula 1 race, because it don't work. And this is knowledge because only millions of people learned programming before you.
To learn programming, you need to learn properly by following courses or tutorials, at least to get you started.
Exercises are here to apply what you have learned.
Quote:
Could anyone help me building the code of it?

The only help possible is us doing the exercise for you, and this, we are not doing, we only help you to fix your code, but you need to show your work and explain the problem you have.
 
Share this answer
 
 
Share this answer
 
You will not learn programming by getting other people to do your work. If you are serious about learning then go to The Java™ Tutorials[^] and work through them a few times.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900