Comp 212 Lab 10: Tournament Tree MVC


Introduction

This tutorial will lead you through the process of putting together an MVC design for the Tournament tree in  milestone 1 for programming project #3.  Most of the effort should be spent on implementing the algorithm for inserting a known team into the Tournament tree.  In the end, you should come up with an appropriate MVC design for the Tournament tree GUI application and a (perhaps partial) implementation of each of the components of the MVC design.   You are allowed to work in teams of two or three during the lab session and share the code with your lab partners.  After the lab session, you are to take your lab code and work alone to complete milestone 1  for programming project #3.  


Tournament View

From the demo applet, we see that the view frame has the following required GUI components.

  1. What it looks like.
  2. What it behaves like.
  3. How it is created and initialized.

Tournament Model

Again, we are going to focus only a model that allows us to insert teams into a tournament tree.

  1. What it looks like- The tournament model comprises of
  2. What it behaves like
  3. How it is created and initialized.

Tournament Tree Controller

The Tournament controller instantiates the model and the view, and set up the "wiring" between the two using appropriate adapter.

  1. What it looks like - The controller maintains
  2. What it behaves like.
  3. How is it created and initialized.

A viable alternative is to have the controller construct the system when a method is called, rather than in its constructor.

 
D. X. Nguyen, Nov. 04, 2001
dxnguyen@cs.rice.edu