New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

PRG 211 Week 5 Final -Calorie Management.docx

by: Topseller Notetaker

PRG 211 Week 5 Final -Calorie Management.docx PRG211

Marketplace > Ashford University > Computer Programming > PRG211 > PRG 211 Week 5 Final Calorie Management docx
Topseller Notetaker
GPA 3.9

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

PRG 211 Week 5 Final -Calorie Management.docx
Study Guide
50 ?




Popular in

Popular in Computer Programming

This 8 page Study Guide was uploaded by Topseller Notetaker on Friday November 6, 2015. The Study Guide belongs to PRG211 at Ashford University taught by in Fall 2015. Since its upload, it has received 44 views. For similar materials see in Computer Programming at Ashford University.


Reviews for PRG 211 Week 5 Final -Calorie Management.docx


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 11/06/15
Running Head: Calorie Management  1 Week 5 Final Project: Calorie Management PRG/211 Calorie Management 2 Introduction Development teams and programmers possess the knowledge of writing code to educe  the power of computers to solve problems and perform various tasks. Proper communication  with customers and organizations ensures a thorough understanding of a particular problem so a  program can be designed to meet needs and expectations of customers and organizations.  Successfully solving problems with program software requires planning and analyzing to ensure  all aspects of the problem meet the required expectations. “Planning your program using a  sequence of steps referred to as the program development cycle, will enable you to use your time efficiently and will help you design error­free programs that produce the desired output”  (INFORMATION TECHNOLOGY Focus Program). A programmer needs to first understand the problem or need to be addressed so a viable  plan can be created to solve the issue. The programmer then needs to analyze the problem using  the information given to provide the results needed. The programmer would then design a  program to solve the problem based on the needs of the organization. The program then needs to  be coded by writing statements in computer language to carry out the program design. After the  program has been implemented it needs to be tested to ensure the program solves the problem it  was intended to resolve.   Problem Statement An organization has awarded our program development team a contract to develop a  program to manage daily calorie intake. The organization wants to identify if whether a person is balancing calories consumed with those being expended. Our programmers are to take into  account the balance of calories daily by gaining knowledge of what foods and beverages contain  Calorie Management 3 what number of calories. Using this information the program will give an account if a user took  in to many calories or to little which could result in weight gained or lost.  Inputs/Outputs The input for a program is the variable information needed by the computer in order to  produce a result.  The computer produces a result in the form of an output.  In regards to a  program that performs a calculation on calories, the input needed is the caloric intake of the user, the amount of calories the user burned during exercise, and the calories the user burned while  resting or the user’s Basal Metabolic Rate (BMR) (National Heart Lung and Blood Institute).  The computer then adds the BMR to the calories expended during exercise and subtracts them  from the calories consumed.  If the number is positive then the user consumed more calories than they expended, and if the number is negative the user has a deficit of calories.  The variable  output is displayed with text as well as the result. The pseudo­code for a program provides the plain English description of the steps a  program will execute.  Pseudo­code is created before the coding begins and is used by the  programmer in order to gain a greater understanding of the steps of the program.  Below is the  pseudo­code for as calorie counter and BMI program:  Program begins.  Create an array that will house five elements for the calorie intake amounts.  Create a procedure that contains outputs that informs the user about the purpose of the  program. o Message: Hello and welcome to team A’s Calorie Management Calculator.  This  calculator is used as a screening tool to identify possible weight and calorie intake issues. Now let’s get started.  The first input is the BMR or the number of calories burned while resting. o User enters their BMR  The second input is the total number of calories the user burned during exercising. Calorie Management 4 o User enter the calories burned during exercise  The program then calls a procedure for calorie intake.  This uses a “for” statement that  asks the user to input their calories for 5 different meals or snacks they had throughout  the day.  The values are placed in the Calorie array and then totaled together. The output  is a message of their total calories consumed and the total is displayed.  Next an assignment adds the BMR input to the Exercise input and then subtracts that total from the total calories consumed and divides that total by 3,500 calories: o Total = (calories consumed – (BMR + calories burned))/3500  The output of the calculation uses an If/Then statement to tell the user how many pounds  they lost.  If the calculation returns a positive number the user gained that number in  pounds and if the user returns a negative number the user lost that number in pounds.   Following the calorie portion of the program, a Body Mass Index procedure or BMI is  called.  This procedure gives the user an opening statement regarding the next step.  The  first input is the user’s height then the user is asked for their weight.  An assignment then  calculates the BMI using the formula (weight*703)/ (height^2). The program now uses a  series of “If/Then” statements to determine which BMI category the user falls under.   o If the user’s BMI is less than 18.5 then the user is underweight. o If the user’s BMI is between 18.6 and 24.9 then the user is normal. o If the user’s BMI is between 25 and 29.9 then the user is overweight. o If the user’s BMI is greater than 30 then the user is obese. o With each statement an output displays if they fall into that range.  When the BMI procedure is complete the program ends. Pseudo­code  Begin program Write “***Hello and welcome to team A’s Write “Calorie Management Calculator***” Write “This calculator is used as a screening” Write “tool to identify possible weight and” Calorie Management 5 Write “calorie intake issues.” Write “Now let’s get started.” Declare Calorie as string Declare C as integer Declare total as float Declare bmi as float Write “How many calories did you burn” Write “today simply resting? ” Input Calories Write “How many calories did you burn” Write “exercising today? ” Input Calories Set sum = 0 For (C = 5; Calorie; C ++) Write “How many calories did you consume at meal”, + C Input Meals Set sum + calorie(C) Set total = sum End For Write “The total calories you consumed for the day is: ”, + total Set Grand = (total – (BMR + Exercise)) / 3500 IF Grand < 0 then Set Grand = Grand Write “You lost “, + Grand + ,“lbs today” Else  Set Grand = Grand Write “You gained “, + Grand +,”lbs today.” End IF Write “And now lets calculate your Body Mass Index, BMI. ” Write “Please enter your height in inches: ” Calorie Management 6 Input height Write “Please enter your weight: ” Input weight Set bmi = (weight * 703) / (height^2) If bmi < 18.5 then Write “Your BMI is: ”, + bmi + ,”and you are considered to be” Write “underweight for your height and weight.” Else IF bmi < 24.9 then  Write “Your BMI is: ” + bmi +, “and you are considered” Write “to be normal for your height and weight.” Else  IF bmi < 29.9 then  Write “Your bmi is: “, + bmi +, “and you are” Write “considered to be overweight for your” Write “height and weight” Else  Write “Your bmi is: ”, + bmi + ,” and you are” Write “considered to be obese for your height” Write “and weight.” End IF End IF End IF End program Desk Check In the chart below you will see how the process will go when individuals have imputed  their information. One example in the chart below shows a person who consumed a total of 1877  calories. The next column shows how many calories were burnt in exercise and resting. The  Calorie Management 7 amount gained/lost shows if the user lost or gained weight. The excess column shows if the user  has calories in excess or lost excess calories. The final column is the user’s body mass index  (BMI) to determine if the user is over, under, normal or obese according to their height and  weight.  Check Calories Exercise/Calories Amount Excess BMI Burnt Gained/Lost Calories Check 1 1877 1285 +.49 592 Calories 27.12 Check 2  2325 1100 +.35 1225 Calories 24.1 Check 3 1195 1400 ­.059 ­205 Calories 23.63 Conclusion To tailor a program to an organizations specific need a problem statement helps to  analyze and guide developers to reach the results the organization is expecting. Using pseudo­ code provides a roadmap to what is needed for the program to run successfully and a layout of  each part of the program that needs to be executed for a simpler understanding for modification.  Testing a program ensures that each function of the program is coded to perform its required  process. Testing also enables the programmer to have the confidence that each module is  accurate and produces its desired result.  Calorie Management 8 Reference INFORMATION TECHNOLOGY Focus Program. (n.d.). Retrieved 2011, from Advanced Programming Languages: National Heart Lung and Blood Institute. (n.d.). Retrieved 2011, from Nutrition Academic Award Program­Advancing nutrition, medical education, and clinical practice: U.S. Department of Health & Human Services. (n.d.). Retrieved 2011, from National  Heart Lung and Blood Institute:


Buy Material

Are you sure you want to buy this material for

50 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Janice Dongeun University of Washington

"I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.