CS 230 Fall 2006

Assignment 7 – Sub Procedures and Function Procedures

100 points

 

Assigned: 10/18/2006

Due: 10/25/2006 at the start of class

 

Pre-Lab (Do Before Lab):  Bring a new disk. Plan out tasks, objects, and events needed for program. Plan out major pseudocode. Put some thought into this. The more clever you are, the less code you will write on this assignment.

 

Main Assignment:

In many soccer competitions, a group of teams play each other (“round robin”), and wins, losses and ties are tallied. The teams are ordered in standings based on 3 points for each win, 1 point for each tie, and 0 points for each loss (similar but different from hockey). (This is the only knowledge of soccer that you need). We’re going to implement a simplified program that will for 4 teams in a group calculate the points for each team (the user must type in the number of wins, losses, and ties for each team).

 

Provide capabilities for 1) calculating the points for all teams, 2) clearing the wins, losses, ties, and points for all teams, 3) clearing the above plus the team names for all teams, and 4) quitting the program. 

 

This assignment is intentionally designed to reward use of procedures and functions – they will save almost 75% of the code you might write without them. You must write some sub procedures and function procedures for this assignment (and use them!)

 

Hand in:

 

Miscellaneous: