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:50
You have just been hired as an information security engineer for a large, multi-international corporation. unfortunately, your company has suffered multiple security breaches that have threatened customers' trust in the fact that their confidential data and financial assets are private and secured. credit-card information was compromised by an attack that infiltrated the network through a vulnerable wireless connection within the organization. the other breach was an inside job where personal data was stolen because of weak access-control policies within the organization that allowed an unauthorized individual access to valuable data. your job is to develop a risk-management policy that addresses the two security breaches and how to mitigate these risks.requirementswrite a brief description of the case study. it requires two to three pages, based upon the apa style of writing. use transition words; a thesis statement; an introduction, body, and conclusion; and a reference page with at least two references. use a double-spaced, arial font, size 12.
Answers: 1
question
Computers and Technology, 23.06.2019 03:00
What are the different parts of computer
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
To become an audio technician, the most successful tactics might include the following. (select all that apply). learning how to persuade other people gaining different types of experience in audio technology learning as much as possible about art history establishing a reputation as a reliable professional
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a,b] se pot scrie ca produs de două numere prime? “.
Answers: 3
You know the right answer?
Java question please answer the coding question below which is number (2)PokerHandEvaluator. java....
Questions
question
English, 14.10.2019 01:10
question
Social Studies, 14.10.2019 01:10
Questions on the website: 13722363