Question: OBJECT ORIENTED PROBLEM 2 Problem 2 (20 points Craps, a game of chance. A popular game of chance frequently seen al casino is a dice

OBJECT ORIENTED
PROBLEM 2
OBJECT ORIENTED PROBLEM 2 Problem 2 (20 points Craps, a game of
chance. A popular game of chance frequently seen al casino is a
dice game known as "rap Theme is played as follows. A player

Problem 2 (20 points Craps, a game of chance. A popular game of chance frequently seen al casino is a dice game known as "rap Theme is played as follows. A player rolle two dice. Each die is the familia six-sided die with faces containing 1, 2, 3, 4, 5, and 6 dots. After the dice are rolled, the next step is determined by the sum of the dots on the two top face If them is 7 or 11 on the first threw, the player wines If the suns 2,3, or 12 on the first throw, the player les called "pe). If the sun is 4, 5, 6, 8, 9, 10 on the first throw, then that becomes the player's point"Now, the only way for the player to win by continuing to roll the dice til she makes her polit" If the player rolle before making her point, she lowe other words, the roll of the dice adds up to her point, she win if it coup to 7, obie lowest adds up to the herols the dice Note that there are two ways for player to wiar Fatherly rolling Tor 11 let the first roll of the lice, or by rolling her point in a subtroll of the dien. You are asked to write a program to play craps to allow ww The players with ini buk balance of $1000. Each game starts with which of course be 3 er than the current bank bule). Alter, the bank wated the player is allowed to play win, repeatedly, until she qui, bankle fallet You will complio all the opening the following function 1. (3 polus) Write a function called rolldice with other function collow dice and return the sum of the result. You cate the wol of bely in the Findint(a, b) fonction from the randon me rusdint) are a nu in Nuchtha SNS 2. (10 points) The cond functional play.com the robe der bow. This functie domowe li prind out windorming the player on the place in the me (see sellow your code show the who). integral of the player with singer of our the player 3. (7 points) The third feel crape dorpen. It while Joop to allow the player to play for down the lank bloce is $0. The list of the is greater to the bank le, ellypop the player to meet the way www w. The coloring the play.one for the world then ingly I walce is SO (Sorry, you're broke"), quit. As long the were than the played to play in the player puts with all the connectory wory w system A und wories Your initial bank balance 1a 81000 What is your agert 100 Okay, let's play You rolled 11 You will Your new bank balance in 81100 Do you want to play in tyy What is your par 500 Okay, let's play 7 You rolled 12 forry, you lose Your sev bank hal.ca is 1600 Deyo at to play IT / att your part 700 Cannot agar more than 100-300 Cannot more than 600. Henter w 400 Okay. to play Yos rolled Yours is You rolled You rolled You rolled 10 You rolled You rolled You rolled Sorry, you out Tour khace 100 Do y at to play it What is your agar 500 Casatore than 200 Meter E 200 Gy. let's play You rolled 10 Tourist 10 You led You led 11 Your new bank balance is $200 Do you want to play again? [y] y What is your wager? 500 Cannot wager more than $200. Re-enter wager: 200 Okay, let's play. You rolled 10 Your point is 10 You rolled 6 You rolled 11 You rolled 6 You rolled 10 You win!! Your new bank balance is $400 Do you want to play again? [y] - Sorry you lost money. Better luck next time! Problem 2 (20 points Craps, a game of chance. A popular game of chance frequently seen al casino is a dice game known as "rap Theme is played as follows. A player rolle two dice. Each die is the familia six-sided die with faces containing 1, 2, 3, 4, 5, and 6 dots. After the dice are rolled, the next step is determined by the sum of the dots on the two top face If them is 7 or 11 on the first threw, the player wines If the suns 2,3, or 12 on the first throw, the player les called "pe). If the sun is 4, 5, 6, 8, 9, 10 on the first throw, then that becomes the player's point"Now, the only way for the player to win by continuing to roll the dice til she makes her polit" If the player rolle before making her point, she lowe other words, the roll of the dice adds up to her point, she win if it coup to 7, obie lowest adds up to the herols the dice Note that there are two ways for player to wiar Fatherly rolling Tor 11 let the first roll of the lice, or by rolling her point in a subtroll of the dien. You are asked to write a program to play craps to allow ww The players with ini buk balance of $1000. Each game starts with which of course be 3 er than the current bank bule). Alter, the bank wated the player is allowed to play win, repeatedly, until she qui, bankle fallet You will complio all the opening the following function 1. (3 polus) Write a function called rolldice with other function collow dice and return the sum of the result. You cate the wol of bely in the Findint(a, b) fonction from the randon me rusdint) are a nu in Nuchtha SNS 2. (10 points) The cond functional play.com the robe der bow. This functie domowe li prind out windorming the player on the place in the me (see sellow your code show the who). integral of the player with singer of our the player 3. (7 points) The third feel crape dorpen. It while Joop to allow the player to play for down the lank bloce is $0. The list of the is greater to the bank le, ellypop the player to meet the way www w. The coloring the play.one for the world then ingly I walce is SO (Sorry, you're broke"), quit. As long the were than the played to play in the player puts with all the connectory wory w system A und wories Your initial bank balance 1a 81000 What is your agert 100 Okay, let's play You rolled 11 You will Your new bank balance in 81100 Do you want to play in tyy What is your par 500 Okay, let's play 7 You rolled 12 forry, you lose Your sev bank hal.ca is 1600 Deyo at to play IT / att your part 700 Cannot agar more than 100-300 Cannot more than 600. Henter w 400 Okay. to play Yos rolled Yours is You rolled You rolled You rolled 10 You rolled You rolled You rolled Sorry, you out Tour khace 100 Do y at to play it What is your agar 500 Casatore than 200 Meter E 200 Gy. let's play You rolled 10 Tourist 10 You led You led 11 Your new bank balance is $200 Do you want to play again? [y] y What is your wager? 500 Cannot wager more than $200. Re-enter wager: 200 Okay, let's play. You rolled 10 Your point is 10 You rolled 6 You rolled 11 You rolled 6 You rolled 10 You win!! Your new bank balance is $400 Do you want to play again? [y] - Sorry you lost money. Better luck next time

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!