Understanding Java   Chapters  01  02  03  04  05  06  07  08  09  10  11  12  13  14  15  16  17  18  19  20  21

Understanding Java: Chapter 16

These pages contain links to the programs that are developed in Chapter 16. The title of this chapter is: Decoupling the model from the user interface.
Model.javaA Model class that extends the Observable class
ViewOne.javaA viewer implements the Observer interface
MVCProg.javaUsing addObserver to register tViewOne as a viewer of tModel
ViewTwo.javaAnother class (ViewTwo) that implements the Observer interface
MVCProg.javaMVCProg registers tViewOne and tViewTwo as viewers of tModel
VCThree.javaA class (called VCThree) that acts as a controller as well as a viewer
MVCProg.javaA program which registers tViewOne, tViewTwo and tVCThree as Model viewers
PersonLinkedQueueDriver.javaThe PersonLinkedQueueProg program rewritten to use MVC
PersonQueueController.javaA class providing a controller for the PersonQueue
QueueCounter.javaA class providing a Queue viewer that outputs the size of the queue
QueueLister.javaA class providing a Queue viewer that lists the items of the queue
LinkedQueue.javaAn Observable version of the LinkedQueue class
Queue.javaAn interface for an Observable queue


© 1998-2002 Barry Cornelius
Any queries about this page should be sent to barry.cornelius@oucs.ox.ac.uk.
This page was last updated on 6 March 2001.