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

In this assignment students work individually or in pairs to write a class that represents the board in the game Connect 4. Students must use a two-dimensional array to represent the board and write methods that initialize the board, check whether a move is allowed, check if the board is full, place a marker in a column, undo a move, check whether a player has won, and run a loop that plays the game. This assignment requires students to write a class and work with multidimensional arrays. It is particularly useful for students who need additional practice designing classes and performing operations on multidimensional arrays.

Recommendations

Incorporate pair programming when it is appropriate for students to collaborate on a lab. In pair programming two students work side-by-side at the same computer. The “driver” controls the mouse and the keyboard, while the “navigator” makes suggestions, points out errors, and asks questions.

Engagement Highlights

Uses a well-known game (Connect 4) as a way to Employ Meaningful and Relevant Content.

Engagement Practices Employed

Materials and Links

Computer Science Details

Programming Language
Python

Material Format and Licensing Information

Creative Commons License
CC BY-NC