*
DESCRIPTION
*
*******************************
A C# application that allows a bowler to enter five
bowling scores, then proceed on doing the necessary
calculations in order to display the average, high and
low scores of the bowler, the C# application also prompts
the bowler to re-run the program if the bowler wishes to.
*******************************
* STEP-BY-STEP PLANNING
*
*******************************
Step One: (Output)
display the bowling scores in putted by the bowler
as well as the average, high and low bowling scores.
Step Two: (Input)
Prompt the bowler to input five bowling game scores, the entry
must be numeric and in a range of 0 to 300 inclusive.
Step Three: (Process)
Repeat this:
Repeat this:
Prompt the bowler to input five bowling game scores, the
entry
must be numeric and in a range of 0 to 300 inclusive.
Using Int.TryParse()method verify if each bowling game
score is an integer.
if the bowler inputs a non-numeric value then display an
entry error
and re-prompt the user to enter again the bowling game s
core.
if the bowler inputs a game score outside the establishe
d
range then display an range error message and re-prompt
the
bowler to enter again the game score.
Once it's confirmed that the entries are integer, then
proceed to verify if the bowling game score is within
the range of 0 to 300 inclusive.
once all five bowling game score passes all the necessar
y
validation then store the bowling game scores into an ar
ray,
the array must be large enough to hold the five values a
nd it
//string variable
//if the bowler wa
e validation, if it passes
//all the validations then the score will sav
ed in the array, else the application
//will ask the bowler to enter again the scor
e.
declare scoreIterator as an integer with a default value 1 //integer variable t
hat will used as an iterator
//integer variab
//the average bo
do this
display a message " would you like to process another set of bow
ler scores?"
prompt the user "Please enter "Y" to continue or "N" to exit: "
convert the variable "continueTheProgram" to an upper case using
.ToUpper()
continueTheProgram <-- console.ReadLine().ToUpper()
if continueTheProgram is == AFFIRMATIVE_ANSWER
scoreIterator <-- 1
else if continueTheProgram is == NEGATIVE_ANSWER
keepRunning <-- False
while "continueTheProgram" is != "AFFIRMATIVE_ANSWER" AND "continueThePr
ogram" is != "NEGATIVE_ANSWER"
clear the screen using console.clear()
loop until "keepRunning" variable is false.
*****************
* DESKCHECK
*
*****************
Input:
Output:
---------------------------------------------------------------------45
67
250
300
265
---------------------------------------------------------------------600
Gandalf
decimals.
300
200
147
209
439
219
----------------------------------------------------------------------