subject

Video Poker: Do PROGRAMMING PROJECT Project P7.9 in the 6th Edition of Big Java (Project P7.7 in 5th Edition)Implement a simulation of a popular casino game usually called video poker. The card deck contains 52 cards, 13 of each suit. At the beginning of the game, the deck is shuffled. Then the top five cards of the deck are presented to the player. The player can reject none, some, or all of the cards. The rejected cards are replaced from the top of the deck, so that the player has again five cards. The rejected cards can go in a discard pile so that they are not re-used until a new deck is initiated and shuffled, which would occur when the current deck is empty, or if you prefer, you can start with a new shuffled deck at the beginning of each new hand. Now the hand is scored. (After scoring the hand, the hand can go on the discard pile, along with the rejected cards). Your program should pronounce the hand to be one of the following:No pair: The lowest hand, containing five separate cards that do not match up to create any of the hands below. One pair: Two cards of the same value, for example two queens. Payout 1Two pairs: Two pairs, for example two queens and two 5's. Payout 2Three of a kind: Three cards of the same value, for example three queens. Payout 3Straight: Five cards with consecutive values, not necessarily of the same suit, such as 4, 5, 6, 7, and 8. The ace can either precede a 2 or follow a king. Payout 4Flush: Five cards, not necessarily in order, of the same suit. Payout 5Full House: Three of a kind and a pair, for example three queens and two 5's. Payout 6Four of a Kind: Four cards of the same value, such as four queens. Payout 25.Straight Flush: A straight and a flush: Five cards with consecutive values of the same suit. Payout 50Royal Flush: The best possible hand in poker. A 10, jack, queen, king, and ace, all of the same suit. Payout 250You must follow the instructions below to receive credit for this assignment. Instead of your player betting a single token each time, allow the player to bet 1-5 tokens. If a player bets ntokens they win n times as much. USE THE FOLLOWING CLASSES AND TEST. TEST MUST REMAIN UNCHANGED.// CARD CLASSpublic class Card implements Comparable{ private int suit; // use integers 1-4 to encode the suit private int rank; // use integers 1-13 to encode the rank public Card(int s, int r){//make a card with suit s and value v } public int compareTo(Card c){// use this method to compare cards so they// may be easily sorted } public String toString(){// use this method to easily print a Card object } // add some more methods here if needed}// DECK CLASSpublic class Deck { private Card[] cards; private int top; // the index of the top of the deck // add more instance variables if needed public Deck(){// make a 52 card deck here } public void shuffle(){// shuffle the deck here } public Card deal(){// deal the top card in the deck } // add more methods here if needed}// GAME CLASSpublic class Game { private Player p; private Deck cards; // you'll probably need some more here public Game(String[] testHand){// This constructor is to help test your code// use the contents of testHand to// make a hand for the player// use the following encoding for cards// c = clubs// d = diamonds// h = hearts// s = spades// 1-13 correspond to ace - king// example: s1 = ace of spades// example: testhand = {s1, s13, s12, s11, s10} = royal flush } public Game(){// This no-argument constructor is to actually play a normal game } public void play(){// this method should play the game } public String checkHand(ArrayList hand){// this method should take an ArrayList of cards// as input and then determine what evaluates to and// return that as a String } // you will likely want many more methods here // per discussion in class}// PLAYER CLASSpublic class Player { private ArrayList hand; // the player's cards private double bankroll;private double bet; // you may choose to use more instance variables public Player(){ // create a player here } public void addCard(Card c){ // add the card c to the player's hand } public void removeCard(Card c){ // remove the card c from the player's hand}public void bets(double amt){// player makes a bet}public void winnings(double odds){// adjust bankroll if player wins}public double getBankroll(){// return current balance of bankroll}// you may wish to use more methods here}//TEST CLASS MUST REMAIN UNCHANGEDpublic class PokerTest {//this class must remain unchanged//your code must work with this test classpublic static void main(String[] args){if (args. length<1){Game g = new Game();g. play();}else{Game g = new Game(args);g. play();}}}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 21:30
To move a file or folder in microsoft windows, you can click and hold down the left mouse button while moving your mouse pointer to the location you want the file or folder to be, which is also known as.
Answers: 3
question
Computers and Technology, 24.06.2019 02:30
How to apply the fly in effect to objects on a slide
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
(, urgent need): how do i change my username
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
Refer to the figure and match the theorem that supports the statement.1.if chords are =, then arcs are =.if bc = de, then arc bc = arc de2.if arcs are =, then chords are =.if arc bc = arc de, then bc = de3.diameters perpen
Answers: 3
You know the right answer?
Video Poker: Do PROGRAMMING PROJECT Project P7.9 in the 6th Edition of Big Java (Project P7.7 in 5th...
Questions
question
Mathematics, 23.10.2019 23:00
question
Mathematics, 23.10.2019 23:00
Questions on the website: 13722361