subject

Java question please answer the coding question below which is number (2)PokerHandEvaluator. java. the attached picture below that is the same question. that picture is not clear that is why i updated it by sending you screen shot. just do the number 2 below. thanks
the class is PokerHandEvaluator
public class PokerHandEvaluator {
2) PokerHandEvaluator. java
This class consists of several static methods that you will write. The prototypes for the methods are:
public static boolean hasPair(Card[] cards)
public static boolean hasTwoPair(Card[] cards)
public static boolean hasThreeOfAKind(Card[] cards)
public static boolean hasStraight(Card[] cards)
public static boolean hasFlush(Card[] cards)
public static boolean hasFullHouse(Card[] cards)
public static boolean hasFourOfAKind(Card[] cards)
public static boolean hasStraightFlush(Card[] cards)
The parameter for each of these methods will be an array of exactly 5 cards. Each method will return true or false, based on whether or not the given set of cards satisfies the poker hand being evaluated in the method. For example, the hasTwoPair method will return true if the set of cards has two pairs of different values (e. g. a pair of 4's and a pair of Jacks). If you need to review the various "poker hands" being tested in the methods, please take another look at the Poker Hand Page.
Important: Each of these methods checks whether or not the set of cards satisfies the given poker hand, but it does not care if it could also satisfy a better hand. For example, if the current hand is
then the results of calling each method should be as indicated below:
hasPair -- true (there is at least one pair)
hasTwoPair -- true (there are two pairs of distinct values)
hasThreeOfAKind -- true (there are three Aces)
hasStraight -- false
hasFlush -- false
hasFullHouse -- true (there are three Aces and two Jacks -- that makes a "full house")
hasFourOfAKind -- false
hasStraightFlush -- false
Important: In order for a hand to qualify as "Two Pair", it must have two pairs of distinct values -- in particular, having four-of-a-kind does not also count as two pair. For example, if the current hand is
<2 of diamonds, 2 of spades, 2 of hearts, 2 of clubs, 9 of spades>
then the results of calling each method should be as indicated below:
hasPair -- true (there is at least one pair)
hasTwoPair -- false (there are not two pairs of distinct values)
hasThreeOfAKind -- true (there are three 2's)
hasStraight -- false
hasFlush -- false
hasFullHouse -- false
hasFourOfAKind -- true (there are four 2's)
hasStraightFlush -- false
JUnit Tests
You are required to submit JUnit tests for all of the methods in the PokerHandEvaluator class. Your tests should be as thorough as possible! Be sure that for each method you have written some tests where the method returns "true", and some tests where the method returns "false".
10% of your grade on this project will be determined by the thoroughness of the tests you write. (Note: To get any credit at all for your JUnit tests, your project must pass all of the tests you have written!) Put your tests into the file provided called "StudentTests. java". If the tests are not located in this file, you will not get credit for them.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:40
In a response of approximately 50 words, explain why it would be essential for the successful a/v technician to participate in additional coursework, presentations and seminars offered by equipment manufacturers as well as annual conferences attended by colleagues in the industry.
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
I'm taking a class on how to make a movie, and it offers some apps that would be in the process. the thing is, i don't have any of those ha. if you have any tips on some apps i could use, that would be awesome. i don't have an iphone, so don't suggest any apps like imovie. i know that this is a weird question, but it would be super for me. : )
Answers: 2
question
Computers and Technology, 22.06.2019 17:00
1. so if i wanted to build a linux server for web services(apache) with 1cpu and 2 gb of memory.-operating at 75% of memory capacity2. a windows server with 2 cpu/ 4gb memory- operating at 85% of memory capacity3. a storage server with 1 cpu/ 2gb memory- operating at 85% of memory capacityhow much memory do i have to add for each server.so that the utilization rate for both cpu and memory is at a baseline of 60%."the details for the cpu like its processor or the memory's speed isnt to be concerned" yeah i kept asking my teacher if he's even sure about the but the whole class seems to be confused and the project is due in 3 days..this is a virtualization project where i have to virtualize a typical server into an exsi hypervisor.
Answers: 2
question
Computers and Technology, 23.06.2019 20:00
Match the file formats with the types of multimedia they can store
Answers: 2
You know the right answer?
Java question please answer the coding question below which is number (2)PokerHandEvaluator. java....
Questions
question
Mathematics, 29.11.2021 20:40
question
Mathematics, 29.11.2021 20:40
question
Advanced Placement (AP), 29.11.2021 20:40
question
English, 29.11.2021 20:40
Questions on the website: 13722361