FAQs on Homework Assignment 3
-
Can I call
one method from WITHIN another method? For example, in the Flush() method,
to check if the hand is not already a royal flush, can I call RoyalFlush()
from within Flush()?
Because I feel that we will be typing code similar to RoyalFlush(), inside Flush(), if we're not allowed to call from within.Answer: Yes, you can call one method from within another method, as you are defining them. But, in the main() part of the program, these methods should behave independently.
Remember - encapsulation is the guiding idea. The end user should use the methods in the most natural way. -
In the description it says:
The allowable suits are: C, D, H, S (again, this is their order).
but the example has them in C, H, S, D order. Which order is correct?The correct order is C, D, H, S (alphabetical) for suits.
-
Should we make our code for pokerhand.cpp work for both uppercase and lowercase inputs?
It should reject lower case . just upper case, as in the working example provided.