Java Reference
In-Depth Information
J
The PaintBox Project
In this appendix we examine a software development project that is larger than
any other described in this text. Our example program allows the user to create
drawings with various shapes and colors. This type of project encompasses a
variety of issues that are commonly found in large-scale software development
and provides a good basis for exploring our development model. We call this
example the PaintBox project.
PaintBox Requirements
Suppose the client provides the following set of initial requirements. The program
will:
Present a graphical user interface that is primarily mouse driven for all user
actions.
Allow the user to draw lines, ovals, circles, rectangles, and squares.
Allow the user to change the drawing color.
Display the current drawing color.
Allow the user to fill a shape, except for a line, with a color.
Allow the user to select a shape in order to move it, modify its color, or
reshape it.
Allow the user to cut, copy, and paste individual shapes in a drawing.
Allow the user to save a drawing in a file and load a previously stored
drawing from a file for further editing.
Allow the user to begin a new drawing at any time.
After examining these general requirements, we might sit down with the client
and discuss some of the details to ensure that there are no misunderstandings. We
might create a new requirements document that is much more specific about the
issues involved.
During these interactions with the client, we might create a sketch, such as the
one shown in Figure J.1, of a user interface for the system. This sketch serves as
a basic prototype of the interface, and gives us something to refer to in our discussions
703
 
 
Search WWH ::




Custom Search