| Lexington High School Mathematics | Math Dept. Front Page | Student Links | Family Links |
| Introduction to C++, Kevin Kelly | Kelly Front Page | C++ Course Guide | C++ Assignments | C++ Info |
Each function assignment is described on a separate page. For each function, there is a description of its basic purpose: the minimum capability necessary for the function to serve its role in the larger program. Then, there is a list of potential improvements that will make your function work better, and you may also have some of your own ideas about how to improve your function. (Of course, you should not make any changes that will prevent your function from working together properly with the rest of the program.) It is expected that every student will write a function that fulfills the basic purpose and incorporates at least some of the improvements. The extension part of the assignment will be to go further in improving your own function, and/or to perform additional tasks related to the program at the teacher's request.
Many real-world programming projects are performed for clients that make additional requests as the project progresses. Accordingly, you should anticipate being asked to add additional features to your function, when requested at a later date. At least one added requirement will be announced next week, which will necessitate some adjustments in every function.
Because of the size of this task and the extra work involved in programming as part of a team, this project will count as three programming assignments.
A preliminary version of the main program has already been written for you. Here is the C++ code for the main program. The main program presents the user with a menu of several choices; the choices correspond to functions that are each being written by a different student. The code also defines a data structure for storing information that will be used by all of the functions: the variable league is defined as an array of several teams, where each team is a structure variable of type TEAM. Here is an example of a typical way to refer to one piece of information in the structure: league[teamnumber].wins .
You should compile and run the main program in its present form to see how it operates. However, the program won't accomplish anything until the various functions have been written by students. You can start writing your own function inside a copy of this main program file. Later, your team will assemble everyone's functions together into a completely functional program.
| function | Team 1 | Team 2 | Team 3 |
|---|---|---|---|
| newleague | Shir | Allison | Nate |
| entergame | Shir | Allison | Leo |
| printrecords | Soyoung | Kiruba | Antonette |
| printstandings | Andrew | Ian | Nate |
| writeleague | Andrew | Allison | Leo |
| loadleague | Shir | Ian | Nate |
| addteam | Tarek | Kiruba | Antonette |