CS 330 Lecture 18 – Types
Agenda
- what ?s
- program this
- a definition of types
- static vs. dynamic
- weak vs. strong
Program This
Write pseudocode to calculate a score for a given hand in Black Jack. In this game, jacks, queens, and kings are worth 10, numeric cards (2-9) are worth their numeric value, and aces are worth either 1 or 11. The score should be maximized, without exceeding 21.
What sort of data structure(s) would you use in C to implement this scoring routine?
Code
…
Haiku
on human typing
Don’t give in to types
An X is more like a Y
Than either’s like U
Don’t give in to types
An X is more like a Y
Than either’s like U