im no good at java but have to hand some assigments in
How would i go about doing this.
I have to model a roulette game and my starting amount is £2000 and i have to enter a lucky number at the start.
in each round the system will generate a random number between 0 and 40 and the stake in each round is £2 . if the random number and your number coincide you will win £40 if not nothing happens and the stake is lost.
What is the remaining amount after having played 100 rounds? and how many rounds can you play before losing all the money!!
thanks for any help!!
This should help you:
The Java™ Tutorials
You need a design/algorithm before you start coding.
Write down the simple steps that need to be taken to do the job.
0) initialize values
1) get lucky number
2) start loop (for 100 times)
3) generate random number in range ...
You have to put an attempt first. Since you have a little experience on Java, start work on what you know. Once you stuck post your question with what you have done.