##
CS 596 OODP

Program 2

[To Course Home Page]

San Diego State University* -- This page last updated Oct 3, 1995*

**
Programming Assignment 2**

Due Oct 12

1) Create a Board class. The board is composed of n x n squares colored
alternately dark and light. "n" should be the parameter of the board's
constructor. Make each square 10 units by 10 units. The upper left hand corner
of the board starts at location ( 0, 0 ). You need two operations (besides the
constructor) on the board class. The first operation given a point with integer
coordinates, say ( 12, 15 ), returns the color of the square containing that
point. The second operation given a point with integer coordinates, returns a
label of the square containing that point.