CS 1101 - C-term 10

Homework 8 - Descendant Trees (variable-width trees)

Due: Tuesday, February 16 at 5pm


This assignment is due on the same date as Exam 2. It is not a long assignment, and working on this assignment is a good way to help prepare for the exam.

Remember to follow the Expectations on Homework when preparing your solutions.

Assignment Goals

To make sure you can

The Assignment

A number of towns have organized a regional children's soccer league. One person is the coordinator of the league. Each town also has its own coordinator. Within each town, there are a number of divisions (for example, some towns organize teams according to the ages of the players). Each division has its own coordinator. Within each division, there are a number of teams, each of which has a coach. Finally, each team consists of players themselves.

  1. Develop a data definition for the soccer league. The hierarchy should start with one person (the league coordinator). Each person in the hierarchy is represented by his or her name, age, role (either "league coordinator", "town coordinator", "division coordinator", "coach", or "player"), and phone number, as well as the list of all people directly below in the hierarchy.

  2. Provide an example of a soccer league. Your league should have coordinators for at least three towns, and your example should go down to the player level for at least two teams.

  3. Provide the template for a soccer league.


What to Turn In

Save a copy of your work - you will use it for Homework 9.

Using web-based turnin, turn in a single file containing all code and documentation for this assignment. Name your file according to the naming conventions for files. Make sure both partners' names and wpi login names appear in a comment at the top of the file.