©2010 Felleisen, Proulx, et. al.
In this lab you will learn a little about programming user interactions using the Model-View-Control pattern for organizing the responsibilities.
The JPT library allows you to concentrate on the key concepts and avoid the pitfalls of multitude of details, typically associated with GUI programming.
The diagram below (on the next page) describes the classes already included in this application:
Here is a brief description of the role these files play in the application.
The program deals with balloons (for now just three of them).
class Balloon This class represents one balloon object, allows the user to move it, paint it, and to compare two balloons for closeness to the top of the graphics window.
We could have other classes here, such as a list of balloons, or a list of tied-up balloons and a list of floating balloons, etc.
We can view the information about a particular Balloon object in several different ways.
To display the information about a Balloon object, we can print a String that represents the Balloon object in the console, or paint it in the given window, or display the values of its fields in a GUI.
To get the data from the user that is needed to instantiate a new
Balloon we can read from the console, or from a GUI.