CSC 314: Programming in Java

Winter 2001

Inidividual Assignment 1

Drawing with Graphics Objects

Due Friday January 19 before 11:30pm

Download the following three java files: Draw.java DrawFrame.java, and Keyboard.java. Place these files in a directory. The file Draw.java is an example program that uses the DrawFrame and Graphics classes to permit a user to draw rectangles in a separate window. Make sure that it compiles (i.e. javac Draw.java) and runs (i.e. java Draw) before you make any changes.

Your assignment is to design and implement a small drawing program, which allows users to interact with a text-based interface to create drawings on a separate frame. The text-based interface should offer the user options for drawing objects, clearing the screen, and selecting new colors. The program should continue offering options until the user chooses to exit the program.

In implementing your program, you will use basic control structures, which may include if statements, switch statements, and boolean expressions. You will only need to modify code inside of the drawObject method, which currently only draws rectangles. Your program does not have to use any additional loops other than the one already present in the example program.

You are generally free to design your own drawing program. Your goal should be to create a flexible, versatile application that is yet easy to use. At minimum, the program should provide the following functions:

Designing a highly usable program is not always easy. Here are some guidelines for creating an effective application (adapted from Jakob Nielsen's Usability Engineering):

Submission

Before the due date and time, you should submit the following three files through the submission Web page:

The grader will use this sheet for evaluating the asignment.

My Instructions for getting the first assignment started on a Windows/Intel machine.