Art Show | Course Home | Homework | Labs | Programming | Schedule & Lecture Notes | Submit

Saint Louis University

Computer Science P125
Introduction to Computer Science

Michael Goldwasser

Spring 2005

Dept. of Math & Computer Science

Programming Assignment 04

Checkers

Due: Tuesday, 22 March 2005, 8pm
Monday, 28 March 2005, 8pm

Please see the general programming webpage for details about the programming environment for this course, guidelines for programming style, and details on electronic submission of assignments.

Collaboration Policy

For this assignment, you must work individually in regard to the design and implementation of your project.

Please make sure you adhere to the policies on academic integrity in this regard.


Contents:


Overview

Your goal is to use the EzWindows graphics package to create an initial checkerboard configuration such as the following:

Required appearance

In terms of the end result, you must do the following:

Required techniques

Equally important in this assignment is your technique. Given that the end result is fixed, it would be possible for someone to write code which technically works by individually drawing each of the 64 squares and each of the 24 circles. But you will not receive full credit for such an approach.

Our true goal in this assignment is to have you gain additional practice using nested control structures and user-defined function in order to minimize redundancy in your coding efforts. Therefore to receive full credit, one must use the following techniques:


Files You Will Need

We are providing the following three files for your use. You may either download from a browser or copy them directly to your current directory on turing with the command:

cp -Rp ~goldwasser/csp125/programs/checkers .

There are three files:


Files to Submit


Grading Standards

The assignment is worth 10 points.

Obviously, one important consideration will be whether your program generated the desired image. Yet reaching that level of success does not necessarily guarantee full credit on the assignment. A portion of the grade will be based upon the programming techniques which you demonstrate.


Extra Credit (1 point)

For the required portion of the assignment, we did not make any requirements about the overall size of the board. For extra credit, we want you to write your program in a way that scales your picture to a desired window size.

Specifically, when executing your program, you should first prompt the user asking for the desired width of the window, measured in centimeters or fraction thereof. Since the board is presumed to be square, you need not explicitly ask for the height of the board. Once you have received that input, create such a window and draw the checkerboard accordingly.


Michael Goldwasser
CS-P125, Spring 2005
Last modified: Friday, 04 March 2005
Art Show | Course Home | Homework | Labs | Programming | Schedule & Lecture Notes | Submit