Decision Structure

captdmn85
DecisionStructure.docx

Write the pseudocode using If-Then-Else statements and create a flowchart with a dual alternative decision structure for the following example:

A normal resting heart rate for an adult usually ranges from 60 to 100 beats a minute. Generally, a lower heart rate at rest implies more efficient heart function and better cardiovascular fitness.

Write a program that displays "Heart rate is normal" if the heart rate variable a user enters is within the "normal" range. If the heart rate is outside this range, then display "Heart rate is abnormal."

Your document must include:

· Pseudo code for the entire program.

· You may use Microsoft Visio or http://draw.io/ to create your flowchart and export the drawing as a JPG. Paste your image in your Word document with your pseudo code. Use File >> Export As >> Image.

https://content.learntoday.info/Learn/CDA1202fw_Summer_16/site/Media/images/mod02/mod02_pg5_1.png

· Internal documentation, using block and/or line comments.

· You must declare all variables before using them in your pseudo code. Don't forget that variables are just names. You need to assign values to variables. For example: Set price = 20 Or Set dollars = 2.75

· Your pseudo code must illustrate all calculations.

· Your flowchart must depict each step in the program.

· Your flowchart must use 3 types of symbols: ovals (start and end terminal symbols), parallelograms (input and output symbols), and rectangles (processing symbols).

· All symbols must be connected by arrows that represent the flow of the program. The flow must make logical sense.