R. Clayton (rclayton@monmouth.edu)
(no date)
Pa3's specs state that if the first line doesn't contain 52 cards
Ah, no; it says if the first non-blank line doesn't contain 52 cards.
it's syntactically invalid and an error message should be printed. If
the following lines representing piles don't have 52 card should a
message also be written to std-error or should this be considered
"impossible" and "impossible" written to std-out? (I would think cout
<< "impossible" but want to confirm)
Either one is fine, although I suppose, because there's no syntactic
requirements that there be 52 cards total in the piles, technically it can't be
a syntax error and so must be impossible.
The deal contains 52 valid cards but they aren't unique (ie. 2 twice) (cerr
<< "Syntax error" or cout << "impossible")? This question would apply to both
the dealt cards and the resulting piles that are input.
Same answer here. There is no syntactic requirement that all 52 cards be
unique; that's a semantic requirement. Not having 52 unique cards is not a
syntax error, but a semantics error and so should be impossible.
This archive was generated by hypermail 2.0b3 on Fri May 09 2003 - 15:30:05 EDT