Package unl.cusack.estimator

The package unl.cusack.estimator is a group of files that demonstrates the basics of a model-view-controller applet.

See:
          Description

Interface Summary
EstimatorListener The interface that must be implemented to listen for events associated with the EstimatorModel.
 

Class Summary
EstimatorController The controller class for use with an EstimatorModel class, and any associated view(s).
EstimatorEvent The class which represents events in the Estimator Model.
EstimatorModel The EstimatorModel is the model of an estimator.
EstimatorView1 A text view to go along with an EstimatorModel and EstimatorController.
EstimatorView2 A graphical view to be used with EstimatorModel and EstimatorController.
PiEstimator The PiEstimator, which brings the model, view, and controller together to form the final applet.
PiEstimatorModel A subclass of EstimatorModel that estimates the value of PI by using the formula pi=4-(4/3)+(4/5)-(4/7)+...
 

Package unl.cusack.estimator Description

The package unl.cusack.estimator is a group of files that demonstrates the basics of a model-view-controller applet.

There are 3 major components of a model-view-controller application-- The model, the view, and the controller. Breifly, they can be described as

The other components of the package are the event the listener which work together to allow event-handling between the various components, and the final application.

You will notice that I have included 2 different views in the package. The main reason I have done this is to demonstrate how easy it is to create additional views when one uses the MVC architecture. One could just as easily define multiple controllers.

I have also defined the main model (EstimatorModel) as abstract. This is because it does not define what kind of data is being estimated. I can now easily extend this class to display, for example, estimates of e, or anything else I want, just be declaring a few methods. I can use the views and controllers as is, because they have no knowledge of the inner workings of the model at this level.