You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Boolean with "if else" condition help

edited Jan 30, 2018 8:00AM in Java


Boolean with "if else" condition help


Hey everyone, I'm having trouble with this boolean "if else" condition assignment and I was wondering if you guys could help me out?

So here's the assignment question "

The complete hand classifier for poker would be far too complicated for us to write in this course, so let’s just look at a couple of instructive special cases. First, write a method boolean hasFlush(String hand) that checks whether the five-card poker hand given as 10-character string is a flush, that is, all five cards are of the same suit. Ranks don’t matter for this problem, since for simplicity, we don’t care about the rare possibility of straight flushes. (Hint: The suits are given in the positions 1, 3, 5, 7 and 9 of the parameter string.) "

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!