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.
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.
Uses a well-known game (Connect 4) as a way to Employ Meaningful and Relevant Content.