Академический Документы
Профессиональный Документы
Культура Документы
Nugent
Table of Contents
Contents Pages
Acknowledgements 2
Description of Organization 3
Data Collection Methodology 4
Problem Statement 56
Program Description 79
Context Level Diagram 10
Level 1 Data Flow Diagram 11
Entity Relationship Diagram 12
System Requirements 13
Functional requirements
Non-Functional requirements
System Architecture 14 16
General Description
System Structure
Physical Architecture System Hardware
Justification of Technical Choices
System Requirements and Architecture Linkage
Data Structure Design 17 19
Data Dictionary
HIPO Diagram
Algorithmic Design 20 23
Source Code 24 49
Output Screens 50 54
Test Plan 55
Appendix 56
Interview questions
1 | Page
Jevoun Tyrell Teacher: Ms. Nugent
Acknowledgements
I thank GOD for his unfailing help, support, strength and guidance in doing this Computer
Science SBA. Without him it would have not been done and I would not have been able to thank my
mother, despite lack of wide experience in computer she has proven to be a tremendous contributor to the
development of this stellar system, teachers such as Ms. Nugent a great teacher that has been provided by
GOD to help in the development of this system and Mr. Nixon that has given some guidance along the
way that has contributed much to this system. Also with the help of classmates such as Nickolas
Matthews, Tai-Vaughn White, Bradford Coore, Kino Porteous, Kevaughn Campbell, Kevaughn Facey,
Skillarchie Davis, Kimani Munn, Shaquile Crosse and friends like Tanya-lee Lawrence and many others
have helped from day one. I thank all for your help and support.
2 | Page
Jevoun Tyrell Teacher: Ms. Nugent
Description of Organization
The Calabar High School Basketball Team first entered the Inter-School Basketball
Competition for the modern furnishing trophy in 1972. From then till now, the school has risen to
the top of the table, in the under 16 and 19 age groups and topped the island for both. They have
a stellar team of management and coaches that look to improve each fundamental ability of their
boys. To do this each match and during training, statistics are taken to measure the frequentness
of their efforts to help the team to victory and also the frequentness of mistakes made by each
player and as a group. These statistics are also required by ISSA to keep track of performance to
Each official match, a broad sheet is given to a representative of each team fixed to play,
with a list of specific statistical data to be collected on each player during play and produce the
results on the sheet to the officiating referee from ISSA. Now when this sheet is given up, the
team may never see it again, unless a picture of it is taken. With this picture, the teams coaches
use the data to enhance the players weaknesses and work to strengthen the team for the next
match.
3 | Page
Jevoun Tyrell Teacher: Ms. Nugent
Problem Statement
Now, the team does not receive the statistical broadsheets after being written up as they
go to the Inter- Secondary Sports Association (ISSA). Due to this, the coaches find it challenging
to work with photos when working with the team. This is time consuming and frustrating as the
coach will have to manually go through photos to view statistics. They have now requested a
program that would work alongside the traditional manual statistical recording at the official
table. The program is to calculate each statistical data record for each player and show a broad
sheet of whatever is entered, at any time of asking. The program should also be able to write to a
text file the tabular data collected much like the broadsheet which the team will have a hard copy
4 | Page
Jevoun Tyrell Teacher: Ms. Nugent
The data collected on how to proceed in developing this software was partly pooled by
conducting web-based and text-based research on statistical data that would be necessary to be
collected during a match to be later used to help in the development and tuning of player skill.
Interviews
Interviews with the coaches were conducted to clarify what they would need to see in the
An interview was conducted with Head coach of the Calabar High School Basketball
team, Ludlow Barker, which was scheduled and performed on August 16, 2016. This method was
utilised to ensure full input and detail outline by the potential end-user, hence the data was
collected in such a manner that allowed for open ended responses to questions to be given. This
proved effective by permitting the interviewee some amount of freedom to give intensive detail
on the subject. It also assured the elimination of any sort misconceptions in understanding the
issue that the coach and his assistant would have faced and the manner in which it is to be
addressed from a legitimate and functional perspective, to bring about the sought-after end-goal.
In employing the interview method, the prospect of delving into every aspect and the level of
detail needed by the coaches, as well as the ability to tailor the questions in no static format but
with a general idea in mind unveiled the problem faced by the coaches and allowed us to design
and create the appropriate software to calculate the scores and statistical points of value to the
team (such as number of blocks, steals, rebounds etc.) of each player and the total points by the
team.
5 | Page
Jevoun Tyrell Teacher: Ms. Nugent
Observation
In addition to conducting the interviews, a few matches were observed, where the use of
the regular paper based system of collecting stats to record player performance and recording of
the data itself was lacking in efficiency, as pages were always given back to officials of ISSA and
pictures of the data collected on the sheets can be taken by the coaches to attempt to cross
reference player performance data. The coaches have made it known that they would like their
own system which would effectively support progress and help the coaches guide their champion
6 | Page
Jevoun Tyrell Teacher: Ms. Nugent
Program Description
Once the program initially loads it presents the user with a confirmation screen that is
used to ensure the user would like to continue before even opening the program, if the user enters
the letters Y or y the welcome animation screen will be displayed and the user will proceed
automatically to the top level menu. If the user however enters N or n the user will greeted
Upon getting to the top level menu (the menu function), the user is presented with
options, to either 1, start entering player data, 2, to display a broadsheet of the any entered
Provided the user chooses option 1 to start entering player data, the user will begin to
enter basic game information (in the Teaminfo function), this will be used to title each
broadsheet produced, basic information such as the opposing team name, the amount of players
on the Calabar team at the game being recorded, it will then check if the amount entered is above
the league limit of twelve players. After continuing out of the Teaminfo function into the
statcol function, the user is promoted to enter the jersey number of the player that data will be
entered about in that single instance. After this, the user is presented with thirteen options to
choose from to enter player data, with entering 0 resulting to an exit to the top menu (the
menu function) if the user chooses an option 1 12 the program goes to the collector
function.
The first option in the collector function with the corresponding key entry being the
number 1, allows the user to add field goal (the regular two point given to a shot during main
play) points to the players score slot and to the teams main point score. Option 2 allows the
7 | Page
Jevoun Tyrell Teacher: Ms. Nugent
user to add the amount of attempts at field goals in each play instance (the play instance is a 30
second time period in which the team with the ball has to make a shot and is reset each time the
ball hits the rim, backboard or goes out of bounds). Option 3 will allow the user to add free
throw point (the regular one point given to a successful free throw shot during main play) to the
players score slot and to the teams total point score. Option 4 will track free-throw attempts
according to afore entered player jersey number. Option 5 permits the user to enter the amount
of successful three point shot made by the corresponding player in the regulation shot time while
option 6 lets the user track the amount of attempts overall by each player.
Option 7 lets the user tally the amount of rebounds made by each player indexed by the
players jersey number. If option 8 is chosen, the user will use this sub-function to tally assists
made by the players. In the event the user chooses option 9 this will allow the user to tally the
blocks made by the player chosen by his jersey number. Option 10 will add tally data for the
steals made by each player indexed by his jersey number. Option 11 is for tallying the fouls
made by players and finally option 12 is to add data on turnovers (a turnover is the resulting
penalty of handing over the ball to the next team as directed by the referee) made by each player.
Option 0 is to exit to the main menu of the menu function. Every option is preceded by the
prompt to enter the jersey number of the player that data is to be entered on, before choosing one
After all the options are carried out at the end of request the score of the tea, is displayed
in a message. At the end of each situation in the statcol menu, the user is brought to the jersey
number prompt screen where if one would rather go to the top main menu, menu function, the
user enters 0.
8 | Page
Jevoun Tyrell Teacher: Ms. Nugent
In the main menu, the menu function, option 2 allows the user the print to a text file
and display on screen the complete simulated broadsheet of all the statistical data on each player
indexed by their jersey number and data on the team itself. At the end of each of the completed
menu situations (in the section of the broadsheet population) the user is brought back to the top
level menu, the menu function to choose what further actions they would want or to exit the
program.
9 | Page
Jevoun Tyrell Teacher: Ms. Nugent
10 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
11 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
12 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
System Requirements
Functional requirements
Must be able to calculate scores for each player and the total score for the team without
error in real time.
Must be able to index each tabulated data entry under the entered player jersey numbers.
Must be able to independently tally the total score of the team on each of the three point
calculation sub-functions in real time.
Must be able to collect all relevant data on each players performance in real time.
Must be able to produce a broadsheet of the collected data at end of match.
Must be able to run on any Microsoft Windows device (windows 7 and up).
Non-Functional requirements
Can show the score of the team after every data entry.
Can display a welcome screen at the start of use.
Can ensure the user will want to continue use once the program has first booted.
All players must be logged at match start for stats collection
All players must have a unique jersey number
Regular officials from ISSA must be able to use the software.
13 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
System Architecture
General Description
The system is designed to address the issue of the coaches dissatisfaction and
inefficiency in their ability to track and develop their players along the lines of strengths and
weaknesses in previous games, done by the use of the tabulated data collected in each match and
System Structure
The system consist of a team score collector and or coach/es (the coaches dont mainly
enter the information because this is to be collected in game), and by regulations it is legal for
this to be a representative from the school, who records to the system, players and team data
including jersey numbers, successful field goals, free throws and three point shots, the total
attempts to score made by each individual player on the team, the number of rebounds, blocks,
steals, assists, fouls and turnovers made by each player where all is also indexed by each players
jersey number , the team score collector whom collects all this data and stores it to the texts files
14 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
A moderately supply of storage is necessary to log the data at statistics of the numerous
It is necessary for the system to be able to withstand the continuous strenuous workload
that is constantly needed to be in operation at high speeds, as in keeping with the fact that
The Operating System limitations were given to a minimal capacity of Windows 7 as any
Microsoft OS previous to this would lack the necessary features to run the program.
15 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
for the system to handle the myriad of complex calculations in real time. This means
incorporating player statistical data on each player along with indexing that data under each
players jersey, a collective team point standing and the respective calculations involved in
collating the data for the coaches to use. With the architecture proposed it is believed that the
system will perform its duties with remarkable speed and reliably.
16 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
Data Dictionary
17 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
display the
correspondin
g menu of
choice in the
menu
function
18 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
Algorithmic Design
19 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
Narrative
Program loads to int main, contd function starts.
Prompt user to continue the use of the program in the contd function.
If input would equals N or n program will go to end and notuse function and display
message Ok bye I hope we can work together some day!!! =-), Goodbye thanks for using the
Calabar High School Basketball Statistics Collector
Program ends and closes
If input would equals Y or y the program will move to Welcome display welcome
message WELCOME
Hello, Welcome to the Calabar Basketball Statistics Collector in the Welcome function and
them goes to the menu function (main menu function).
If the choice is greater 2 the following message will be displayed Please choose from the
options listed... "
Continue to display error message once entry is over 2.
If user choice is 0 the program goes to end function and displays message Goodbye
thanks for using the Calabar High School Basketball Statistics Collector and then closes.
20 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
User is prompted to enter opposing team name, variable Visitors[viz] is read and name stored,
user is prompted to enter number of home team members at game, reads input homenum, if
homenum is greater than twelve, display message More than league regulations else
continue and clear screen to statcol function menu.
In statcol function, user enters option under variable stat after entering player jersey number
read jersey number input Home_playernum, Read input stat, If stat equal 1 to 12 program
goes to collector function.
statcol function pauses
if [stat] equals 1, if (FGM[Pnum] = 0) add two points to player score else add two points to
player score, add an attempt to score, and team score, display team score Calabar now has 2
points.
If [stat] equals 2, if (FGA[Pnum] = 0), program will prompt to enter amount of attempts just
now, multiply the number of attempts by one and add to player attempts (FGA[Pnum]), else, add
one attempt to player attempt and display team score Calabar still has 2 points.
If [stat] equal 3 add one free throw point to player score, to team score and display score
Calabar now has 3 points.
If [stat] equal 4, if (FTA[Pnum] = 0), program will prompt to enter amount of attempts just
now, multiply the number of attempts by one and add to player attempts, else, add one attempt to
player attempts and display team score Calabar still has 3 points.
If [stat] equal 5, if (TM[Pnum] = 0), program will add three points to player score, add to team
total score and display team score Calabar now has 6 points.
If [stat] equal 6, program will prompt to enter amount of attempts just now, multiply the
number of attempts by one and add to player attempts, else, add one attempt to player attempts
and display team score and display team score Calabar still has 6 points.
If [stat] equal 7, if (REBnum[Pnum] = 0), program will prompt to enter amount of rebounds
just now, multiply the number of rebounds by one and add to player rebounds, else, add one
rebound to player rebounds and display team score Calabar still has 6 points.
21 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
If [stat] equal 8, if (AST [Pnum] = 0), program will prompt to enter amount of assists just
now, multiply the number of assists by one and add to player assists, else, add one assist to
player assists and display team score Calabar still has 6 points.
If [stat] equal 9, if (BLK[Pnum] = 0), program will prompt to enter amount of blocks just
now, multiply the number of blocks by one and add to player blocks, else, add one block to
player blocks and display team score Calabar still has 6 points.
If [stat] equal 10, if (STL[Pnum] = 0), program will prompt to enter amount of steals just
now, multiply the number of steals by one and add to player steals, else, add one steal to player
steals and display team score Calabar still has 6 points.
If [stat] equal 11, if (PF[Pnum] = 0), program will prompt to enter amount of fouls just now,
multiply the number of fouls by one and add to player fouls, else, add one foul to player fouls
and display team score Calabar still has 6 points.
If [stat] equal 11, if (PF[Pnum] = 3), program will display message Player 23 needs to cool
off them fouls or he's in line for the bench!!!
If [stat] equal 11, if (PF[Pnum] = 4), program will display message One more of those and
player 23 is OFF!!!
If [stat] equal 11, if (PF[Pnum] = 5), program will display message Player 23 has to now
come OFF court, poor dude...
If [stat] equal 12, if (TO[Pnum] = 0), program will prompt to enter amount of turnovers just
now, multiply the number of turnovers by one and add to player turnovers, else, add one turnover
to player fouls and display team score Calabar still has 6 points.
22 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
| Player # | Points | Rebounds | Assists | Blocks | Steals | Fouls | Turnovers | shots made |
shots attempted | FTM | FTA | TM | TA
______________________________________________________________
| 23 | 4 | 3 | 3 | 4 | 7 | 3 | 3 | 7 | 5 | 8 | 2 | 3 | 3 |
Source Code
23 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
/*This programme was created and finished by Jevoun Benjamin Tyrell aka JBT. Sage aka
Giggles
on the 10th of March 2017*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <time.h>
#include <assert.h>
#include <windows.h>
#define TEAMmaxnum 12
int Welcome();
void end();
void hi();
int menu();
int menu2();
int notuse();
int Teaminfo();
int statcol();
int collector();
searcher ();
STACKER ();
int main();
//MAIN VARIABLES
int arr[10], num, i, n , pos =-1, beg, end, middle, found =0;
// MAIN FUNCTIONS
int contd(){
time_t(CurrentTime);
time(&CurrentTime);
int Welcome()
{
system("cls");
for ( c = 1 ; c <= 6 ; c++ ){
printf(" ** ** \n");
printf(" ** * ** \n");
printf(" ** ** ** ** \n");
printf(" ** ** \n");
printf(" ** ** \n");
system("cls");
}
26 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
system("cls");
}
printf(" ** \n");
printf(" ** \n");
printf(" ** \n");
printf(" ** \n");
printf(" ** \n");
printf(" ******* \n");
printf(" ******* \n");
system("cls");
}
system("cls");
27 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
system("cls");
}
printf(" * * \n");
printf(" **** **** \n");
printf(" ** ** ** ** \n");
printf(" ** * ** \n");
printf(" ** ** \n");
printf(" ** ** \n");
printf(" ** ** \n");
system("cls");
}
system("cls");
}
printf (" WWWW WWWW EEEEEEEE LL CCCCC OOO M M
EEEEEEE \n");
printf (" WW W ww EEE LL C O O MM MM MM MM EEE
\n");
printf (" WW WW WW WW EEEEE LL C O O
MM M MM EEEEE \n");
printf (" WW WW EEE LL C O O MM
MM EEE \n");
printf (" W W EEEEEEEE LLLLLLLL CCCCC OOO
MM MM EEEEEEE \n");
system ("color 2e");
printf ("\n\n The %s Basketball Statistics Collector\n",&Home[Ho]);
}
int menu(){
if (choice > 2 ){
printf ("Please choose from the options listed... ");
}
system ("cls");
}
int menu2(){
29 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
system ("cls");
if (choice > 2 ){
printf ("Please choose from the options listed... ");
}
system ("cls");
}
void end(){
printf ("\n\n\n\nGoodbye thanks for using the Calabar High School Basketball Statistics
Collector\n");
}
int notuse(){
printf ("\n\n\n Ok bye I hope we can work together some day!!! =-)");
system ("color 5a");
return 0;
}
void hi(){
30 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
int Teaminfo(){
time_t(CurrentTime);
time(&CurrentTime);
FILE * Team;
Team = fopen("Team.txt","a+");
do{
system ("cls");
system ("color 2e");
printf ("************************************************************\n");
printf ("* Good day!!! *\n");
printf ("* Enter player jersey number *\n");
printf ("************************************************************\n");
scanf ("%d",&Home_Playernum[Pnum]);
31 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
system ("cls");
int collector(){
Teaminfo();
statcol();
do {
//continue stats collection
switch (stat){
32 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
case 1:
if (FGM/*goals made*/[Pnum]==0)
{
FGM/*goals made*/[Pnum] = FGM/*goals made*/[Pnum] + 2; FGA/*goals attempted*/[Pnum]
= FGA/*goals attempted*/[Pnum] + 1;
tFGM/*goals made*/ =tFGM/*goals made*/ + 2;
system ("pause");
}
else{
FGM/*goals made*/[Pnum] = FGM/*goals made*/[Pnum] + 2;
FGA/*goals attempted*/[Pnum] = FGA/*goals attempted*/[Pnum] + 1;
tFGM/*goals made*/ =tFGM/*goals made*/ + 2;
}
case 2:
if (FGA/*goals attempted*/[Pnum]==0){
printf ("\n Enter number of attemps just now...");
scanf ("%d",&FGAnum[Pnum]);
FGA/*goals attempted*/[Pnum] = FGAnum[Pnum] + FGA[Pnum];
printf ("\n%s is still at %d points.\n",hshort,totpoints);
system ("pause");
}
else {
printf ("\n Enter number of attemps just now...");
scanf ("%d",&FGAnum[Pnum]);
FGA/*goals attempted*/[Pnum] = FGA/*goals attempted*/[Pnum] + FGAnum[Pnum];
FGA/*goals attempted*/[Pnum] = FGA/*goals attempted*/[Pnum];
printf ("\n%s is still at %d points.\n",hshort,totpoints);
system ("pause");
}
break;
33 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
case 3:
if (FTM/*frees made*/[Pnum]==0)
{
printf ("\n Enter number of free throws just now...\n");
scanf ("%d",&FTMnum/*frees made counter to stop zero error*/[Pnum]);
FTM/*frees made*/[Pnum] = (FTMnum[Pnum] * 1);
FTA[Pnum]=FTA/*frees attempted*/[Pnum] + 1;
tFTM/*frees made*/ = tFTM/*frees made*/ + 1;
system ("pause");
}
break ;
case 4:
if (FTA/*frees attempted*/[Pnum]==0)
{
printf ("\n Enter number of free throws attempted just now ");
scanf ("%d",&FTAjm/*frees attempted counter to stop zero error*/[Pnum]);
FTA[Pnum]=FTA/*frees attempted*/[Pnum] + FTAjm[Pnum];
printf ("\n%s is still at %d points.\n",hshort,totpoints);
system ("pause");
}
else {
printf ("\n Enter number of free throws attempted just now...\n");
scanf ("%d",&FTAjm/*frees attempted counter to stop zero error*/[Pnum]);
FTA[Pnum]=FTA/*frees attempted*/[Pnum] + FTAjm[Pnum];
printf ("\n%s is still at %d points.\n",hshort,totpoints);
system ("pause");
34 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
}
break;
case 5:
if ((tTM/*total threes made*/==0) && (TM/*threes made*/[Pnum]==0))
{
printf ("\n Enter number of three pointers made just now...\n");
scanf ("%d",&TMnum /* three made counter to stop zero error*/[Pnum]);
TM/*threes made*/[Pnum] = (TMnum[Pnum]* 3);
TA/*threes attempted*/[Pnum]= TA/*threes attempted*/[Pnum] + 1;
tTM/*goals made*/ =tTM/*goals made*/ + 3;
system ("pause");
}
else {
printf ("\n Enter number of three made just now...\n");
scanf ("%d",&TMnum /* three made counter to stop zero error*/[Pnum]);
TM/*threes made*/[Pnum] = (TMnum[Pnum]* 3);
TA/*threes attempted*/[Pnum]= TA/*threes attempted*/[Pnum] + 1;
tTM/*goals made*/ =tTM/*goals made*/ + 3;
}
case 6:
if (TA/*threes attempted*/[Pnum]==0)
{
printf ("\n Enter number of threes attempted just now...\n");
scanf ("%d",&TAnum /* three attempted counter to stop zero error*/[Pnum]);
TA/*threes attempted*/[Pnum]= TA/*threes attempted*/[Pnum] + TAnum[Pnum];
printf ("\n%s is still at %d points.\n",hshort,totpoints);
system ("pause");
}
else {
35 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
case 7:
if (REB/*rebounds made*/[Pnum]==0)
{
printf ("\n Enter the number of rebounds just now...\n");
scanf ("%d",&REBnum/* rebound counter to stop zero error*/);
REB/*rebounds made*/[Pnum] = REB/*rebounds made*/[Pnum] + REBnum[Pnum];
printf ("\n%s is still at %d points.\n",hshort,totpoints);
system ("pause");
}
else {
printf ("\n Enter the number of rebounds just now...\n");
scanf ("%d",&REBnum/* rebound counter to stop zero error*/);
REB/*rebounds made*/[Pnum] = REB/*rebounds made*/[Pnum] + REBnum[Pnum];
printf ("\n%s is still at %d points.\n",hshort,totpoints);
system ("pause");
}
case 8:
if (AST/*assists made*/[Pnum]==0){
printf ("\n Enter the number of assists made by player just now...\n");
scanf ("%d",&ASTnum/*assists counter to stop zero errors*/[Pnum]);
AST/*assists made*/[Pnum] = AST[Pnum] + ASTnum[Pnum];
printf ("\n%s is at %d points.\n",hshort,totpoints);
system ("pause");
}
else {
printf ("\n Enter the number of assists made by player just now...\n");
scanf ("%d",&ASTnum/*assists counter to stop zero errors*/[Pnum]);
AST/*assists made*/[Pnum] = AST[Pnum] + ASTnum[Pnum];
36 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
case 9:
if (BLK/*blocks made*/[Pnum]==0)
{
printf ("\n Enter the number of blocks made by player just now...\n");
scanf ("%d",&BLKnum /*block counter*/[Pnum]);
BLK/*blocks made*/[Pnum] = BLKnum [Pnum] + BLK[Pnum];
printf ("\n%s is at %d points.\n",hshort,totpoints);
system ("pause");
}
else {
printf ("\n Enter the number of blocks made by player just now...\n");
scanf ("%d",&BLKnum /*block counter*/[Pnum]);
BLK/*blocks made*/[Pnum] = BLKnum [Pnum] + BLK[Pnum];
printf ("\n%s is at %d points.\n",hshort,totpoints);
system ("pause");
}
break;
case 10:
if (STL/*steals made*/[Pnum] == 0){
printf ("\n Enter the number of steals made by player just now...\n");
scanf ("%d",&STLnum /*steals counter*/[Pnum]);
STL/*steals made*/[Pnum] = STLnum [Pnum] + STL[Pnum];
printf ("\n%s is still at %d points.\n",hshort,totpoints);
system ("pause");
}
else{
printf ("\n Enter the number of steals made by player just now...\n");
scanf ("%d",&STLnum /*steals counter*/[Pnum]);
STL/*steals made*/[Pnum] = STLnum [Pnum] + STL[Pnum];
printf ("\n%s is still at %d points.\n",hshort,totpoints);
system ("pause");
}
37 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
break;
case 11:
if(PF/*fouls made*/[Pnum]==0)
{
printf ("\n Enter the number of fouls made by player just now...\n");
scanf ("%d",&PFnum /*foul counter*/[Pnum]);
PF/*fouls made*/[Pnum] = PFnum [Pnum] + PF[Pnum];
printf ("\n%s is still at %d points.\n",hshort,totpoints);
system ("pause");
}
else {
printf ("\n Enter the number of fouls made by player just now...\n");
scanf ("%d",&PFnum /*foul counter*/[Pnum]);
PF/*fouls made*/[Pnum] = PFnum [Pnum] + PF[Pnum];
printf ("\n%s is still at %d points.\n",hshort,totpoints);
system ("pause");
}
break;
case 12:
38 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
if (TO/*turnovers made*/[Pnum]==0){
printf ("\n Enter the number of fouls made by player just now...\n");
scanf ("%d",&TCnum /*turnover counter*/[Pnum]);
TO/*turnovers made*/[Pnum] = TCnum [Pnum] + TO[Pnum];
printf ("\n%s is still at %d points.\n",hshort,totpoints);
system ("pause");
}
else{printf ("\n Enter the number of fouls made by player just now...\n");
scanf ("%d",&TCnum /*turnover counter*/[Pnum]);
TO/*turnovers made*/[Pnum] = TCnum [Pnum] + TO[Pnum];
printf ("\n%s is still at %d points.\n",hshort,totpoints);
system ("pause");
}
case 0:
{
system ("clr");
menu();
}
else
{
system ("cls");
}
39 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
int broadsheet(){
switch (options)
{
case 1:{ // case to display broadsheet
,Home_Playernum[Pnum]
,PTS/*points made*/[Pnum]
,REB/*rebounds made*/[Pnum]
,AST/*assists made*/[Pnum]
,BLK/*blocks made*/[Pnum]
,STL/*steals made*/[Pnum]
,PF/*fouls made*/[Pnum]
,TO/*turnovers made*/[Pnum]
,FGM/*goals made*/[Pnum]
,FGA/*goals attempted*/[Pnum]
,FTM/*frees made*/[Pnum]
,FTA/*frees attempted*/[Pnum]
,TM/*3s made*/[Pnum]
,TA/*3s attempted*/[Pnum]);
40 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
time_t(CurrentTime);
time(&CurrentTime);
FILE * Team;
Team = fopen("Team.txt","a+");
,Home_Playernum[Pnum]
,PTS/*points made*/ [Pnum]
,REB/*rebounds made*/[Pnum]
,AST/*assists made*/[Pnum]
,BLK/*blocks made*/[Pnum]
,STL/*steals made*/[Pnum]
,PF/*fouls made*/[Pnum]
,TO/*turnovers made*/[Pnum]
,FGM/*goals made*/[Pnum]
,FGA/*goals attempted*/[Pnum]
,FTM/*frees made*/[Pnum]
,FTA/*frees attempted*/[Pnum]
,TM/*3s made*/[Pnum]
,TA/*3s attempted*/[Pnum] );
}
41 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
}
break; //options #1 breaker
case 2:
{
searcher ();
STACKER ();
}
break;// options #2 breaker
void searcher () {
42 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
end = middle-1;
}
else if (arr[middle] < num)
beg = mid+1;
}
if ( beg > end &&found == 0)
{
printf("\n %d DOES NOT EXIST IN THE ARRAY",num);
}
getch();
return 0;
}
struct stack
{
int stk[MAXSIZE];
int top;
};
typedef struct stack STACKUP;
STACKUP s;
void push(void);
int pop(void);
void display(void);
void STACKER ()
{
int stkchoice;
int option = 1;
s.top = -1;
43 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
int num;
if (s.top == - 1)
{
printf ("Stack is Empty\n");
return (s.top);
}
else
{
num = s.stk[s.top];
printf ("poped element is = %dn", s.stk[s.top]);
s.top = s.top - 1;
}
return(num);
}
/* Function to display the status of the stack */
void display ()
{
int i;
if (s.top == -1)
{
printf ("Stack is empty\n");
return;
}
else
{
printf ("\n The status of the stack is \n");
for (i = s.top; i >= 0; i--)
{
printf ("%d\n", s.stk[i]);
}
}
printf ("\n");
}
// MAIN PROGRAM
int main()
{
45 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
time_t(CurrentTime);
time(&CurrentTime);
do{
contd();
switch (would){
case 'Y':
{ // case for "yes" if userwishes to continue use.
Welcome();
hi();
menu();
switch (choice){
case 1: /*When choice 1 is entered, this should go the collector function outlined above*/
{
collector();
} // collector case locking brace
break;
case 0:
{
end();
} break;
}
}
while (choice!= 0);
if (choice!= 0 ){
end ();
46 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
}
break;
} //would use case close
hi();
menu();
switch (choice){
case 1: /*When choice 1 is entered, this should go the collector function outlined above*/
{
collector();
} // collector case locking brace
break;
case 0:
{
end();
} break;
}
}
while (choice!= 0);
if (choice!= 0 ){
end ();
}
break;
} //would use case close
47 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
case'N':
{
notuse();
end ();
return 0;
}
case'n':
{
notuse();
end ();
return 0;
}
}
}while ((would = 'Y') || (would = 'y') || (would = 'N') || (would = 'n'));
} //end of main function/program
48 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
Output Screens
Figure 1: When program has started
49 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
50 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
51 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
52 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
53 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
Test Plan
Error
Variable Name Variable Type Accepted Data Purpose
statement
Enter a
To store and display VALID value,
Home_Playernum integer 23 the players jersey the data input
number is
inappropriate.
(If more than
Stores number of
12) more than
homenum integer 1 12 players for home
league
team
regulations
Will continue
To store the users to display
options integer 1,2 choice in broadsheet options until
function correctly
input.
To store and display Please choose
the corresponding from the
choice integer 1 or 2 or 0
menu of choice in options
the menu function listed...
ERROR!!!
54 | P a g e
Jevoun Tyrell Teacher: Ms. Nugent
Appendix
Interview questions
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Is an output similar to the broadsheet better suited for you or a list format of the data?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Is there any special feature that you would like to see in the system, to either brand it as yours or
make it unique?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
55 | P a g e