WASIM AKBER Engineering Department ENGR 334
Programmable Systems WASIM AKBER Engineering Department 2
Time! WASIM AKBER Engineering Department 3
(Not All Of It) As part of an ace team,
WASIM AKBER Engineering Department 4
Programmable Systems WASIM AKBER Engineering Department 5
As part of an ace team,
working for an on-line casino, you have been
selected to write a software module to recognize
certain winning hands for the automated poker-
playing system. WASIM AKBER Engineering Department 6
There are a range of winning
hands at poker – you only
need to consider two:
? The Flush
? The Straight
A special case of these two is
the Straight Flush, and an
even more special case is the
Royal Flush. WASIM AKBER Engineering Department 7
The module is to be called
the hands your
software is required to
recognize are those
shown on the right →
WASIM AKBER Engineering Department 8
The specified number of inputs and outputs are:
INPUTS: standard five-card poker hand, randomly dealt.
1 hand consists of five cards of the same suit
0 hand consists of cards of different suits
1 hand consists of five cards of any suit in sequence
0 hand consists of cards which are not in sequence
Highest Ranked Card 3 – A the highest ranked card in the hand WASIM AKBER Engineering Department 9
Your module should automatically produce flags of 1 and
1 for a straight flush.
Under house rules, there are no jokers
Aces ALWAYS high, so A,2,3,4,5 is NOT a straight.
Your assignment is: (1) to prepare a preliminary design of
the module required using any programming language or
pseudocode that takes your fancy. WASIM AKBER Engineering Department 10
Your assignment is: (2) to specify test protocols to show
that it does the job it is supposed to do.
TEST PROTOCOLS –
1. Can a winning hand be misread and marked as a loser?
2. Can a losing hand be misread and marked as a winner?
CHEATS AND DOWNLOADS –
You may incorporate proprietary or downloaded program
components – but ONLY IF you describe how they work. WASIM AKBER Engineering Department 11
You are to submit a report consisting of:
1. A cover sheet, including name, course, title, etc.
2. A description of your design, how you intend the
module to work, with flowcharts, etc.
3. A program, in any language of your choice (including
pseudocode). Assume the reader does not know your
programming language and add sufficient commentary
to indicate how the program works.
4. A list of the tests that will show the module works. WASIM AKBER Engineering Department 12
WASIM AKBER Engineering Department 13
via the Moodle VLE. Deadline is 12h00, 8/12/14.
The rules governing coursework submission can be
found in the UNDERGRADUATE ASSESSMENT
REGULATIONS available for download from:
essmentRegs/UG_Assessment_Regs.pdf WASIM AKBER Engineering Department 14
Specifically Appendix 1: Late penalties for quantitatively
assessed work (page 19), and section 2C5 (page 5):
“Failure to submit by the published deadline without
securing an agreed extension will result in an automatic
reduction of one full grade for up to three days late
(unless the assignment has already been assessed and
returned in which case the grade will be F4). Work
submitted after three days will receive a grade of F4 (non-
submission), subject to any consideration of mitigating
circumstance.” WASIM AKBER Engineering Department ENGR 334
Programmable Systems WASIM AKBER Engineering Department ENGR 334