Preview

Programming - Example of a Selection Structure

Satisfactory Essays
Open Document
Open Document
537 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Programming - Example of a Selection Structure
Programming – Selection Structure
John Doe
PRG/211
June 25, 2013
GUILLERMO HERNANDEZ

Introduction: The purpose of this paper is to provide a simple example of a selection structure that is contained as part of the Programming Solution Proposal I am developing throughout the course of this programming class. The selection structure I chose to make an example of isn’t really inclusive as part of my original programming proposal due in week 5, however, I devised a very simple “If-Then-Else” structure that uses somewhat of the same information and calculation as what I may use in my final proposal. I’ve written the pseudocode for a section that at this time appears to make sense to use, given the selection structure I chose, and I also paralleled that with a Visual Logic flowchart. The visual logic flowchart was executed correctly with specific values that are to be used in order for others to properly test it. These values will change as the program gets fine-tuned, however, for now there are specific values that must be used to obtain the correct percentages. Purpose of the structure The reason I chose the “If-Then-Else” structure is because it seemed to make the most sense for my program and it didn’t appear to be too complicated a structure to master. Even though this structure may not be included as part of my final proposal paper, I thought it would be good to work with and verify if I could somehow make it work. The program I’ll ultimately be creating is one where seasonal stats will be entered in by an assistant coach, for athletes on any given basketball team. Through this they will be able to determine a players overall field goal average, free throw percentage, rebound average, etc. However, for now, I’ve decided to simply use an If-Then-Else structure that displays a friendly output message of what the user might see if he/she entered their “field goals attempted” value and “field goals made” value. The

You May Also Find These Documents Helpful