School Work

Planning, Pseudocode, Deskcheck

Description
A planning to compile a bowling score program in C#
Categories
Published
of 8
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Transcript
  ******************************** 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 promptsthe 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 bowleras well as the average, high and low bowling scores.Step Two: (Input)Prompt the bowler to input five bowling game scores, the entrymust 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 entrymust 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 errorand re-prompt the user to enter again the bowling game score.if the bowler inputs a game score outside the establishedrange 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, thenproceed 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 necessary validation then store the bowling game scores into an array,the array must be large enough to hold the five values and it  must be declared as an integer.Repeat until all five bowling game score have been saved correctly.clear the screen of the C# application using console.clear() methoddisplay an output message Bowler Scores display an underline ================== Repeat this:display one-by-one the array that holds the bowling scoresrepeat until the loop iterates up to the length of the array.Repeat this:if bowlingScores (integer array variable) is greater than highBowlingScore (variable that will be declared as an integer and with a default value of zero) then:save the bowlingScores value into highBowlingScore if bowlingScores is less than lowBowlingScore (variable that will be declared as an integer and with a default value of 500) then:save the bowlingScores value into lowBowlingScore Sum the average bowling score by declaring an accumulator,variable type integer that would add up all the values of the array into theaccumulator.repeat until the loop iterates up to the length of the array.display an underline ================== calculate the average bowling score by dividing the accumulator variableby the length of the bowlingScores array.display the average bowling scoredisplay the high bowling scoredisplay the low bowling scorerepeat this:  display a message would you like to process another set ofbowler scores? Prompt the user Please enter Y to continue or N to exit: save the value into a string variable continueTheProgram (variablethat will be declared as a string and will hold the answer of the bowler)convert continueTheProgram value to an upper caseif continueTheProgram == affirmativeAnswer (variable that will bedeclared as a constant string holding the character Y ). then:re-start the program and await for new bowling games scores forfurther calculations.else if continueTheProgram == NegativeAnswer (variable that will bedeclared as a constant string holding the character N ). then:step out of the loop and close the C# application without displaying any message or further instructions.elsere-display a message would you like to process another set of bowler scores? re-prompt the user Please enter Y to continue or N to exit:repeat until the user enters Y or N for an answerclear the screen using console.clear()repeat until the user enters N for an answer (in other words keep this loop true)************************** PSEUDOCODE******************************************** CONSTANTS******************   declare SCORE_INPUT_LIMIT as integer with a default value 5 //Integer variable that will be used a //default value of the array of bowling scores //if the bowler wants to continue or not.declare NEGATIVE_ANSWER as string with a default value N //string variable that will be used to evaluate //if the bowler wants to continue or not.declare AFFIRMATIVE_ANSWER as string with a default value Y //string variable that will be used to evaluate //if the bowler wants to continue or not. declare MINIMUN_BOWLING_SCORE as integer with a default value 0 //integer variable that will be used to determine //if each bowling scores in the array is greater or //equal to the minimum rangedeclare MAXIMUM_BOWLING_SCORE as integer with a default value 300 //integer variable that will be used to determine //if each bowling scores in the array is less than or //equal to the maximum range****************** VARIABLES******************declare keepRunning as boolean //boolean variable that it is used to keep the C# application running//it will always be true UNTIL the bowler does not want to continue with //the C# application.declare bowlingScores as an integer array with a size of SCORE_INPUT_LIMIT //integer variable array that will be used to hold all the //bowling game scores that the bowler will enter.declare scoreInput as an integer //integer variable that will temporarily hold the bowling game score //of the bowler so it can pass through all the validation, if it passes //all the validations then the score will saved in the array, else the application //will ask the bowler to enter again the score.declare scoreIterator as an integer with a default value 1 //integer variable that will used as an iterator
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks