Course Level
CS1
Knowledge Unit
Fundamental Programming Concepts
Collection Item Type
Assignment
Synopsis

In this activity, students exercise their understanding of classes and objects in order to build a class that stores a set of cards. The set of cards is backed by an array, and students implement methods to add and discard cards, check the high and low ranks of the hand, and check if the hand contains a pair, a flush, or a straight. This activity is good for students that are being introduced to classes.

Recommendations

For more information on how this homework fits within the scope of the course, please see the following course schedule and syllabus here: (http://mathcs.pugetsound.edu/~aasmith/cs261/). Search "CardSet Object".

 

Engagement Highlights

By putting the implementation of classes in the context of cards, with many possible applications into card games, the activity has Meaningful and Relevant Context.

Engagement Practices Employed

Computer Science Details

Programming Language
Java

Material Format and Licensing Information

Creative Commons License
CC BY-NC-SA