Free Essay

Dbm 380 Ltwk2

In:

Submitted By Rony61
Words 500
Pages 2
Learning Team X - Week 2 Assignment
The first phase of our team’s project is to develop a program that calculates the user’s daily caloric balance. The first phase of the program development cycle is to identify the tasks or requirements needed for the program. Below is a list of those activities that we have identified: 1. Get Name 2. Get Gender 3. Get Weight 4. Get Calories Consumed for Breakfast 5. Get Calories Consumed for Lunch 6. Get Calories Consumed for Dinner 7. Get Calories Consumed for Snacks 8. Get Time spent doing Heavy Activities 9. Get Time spent doing Moderate Activities 10. Get Time spent doing Light Activities 11. Get Time spent at Rest 12. 12. Define heavy activity Heart Rate 13. Define moderate activity Heart Rate 14. Define light activity Heart Rate 15. Define Heart Rate when at rest 16. Calculate Total Calories Consumed 17. Calculate Total Calories Expended 18. Calculate Calorie Balance 19. Convert Calorie Balance to Weight Gain/Loss 20. Display Total Calories Consumed (the result of the calculation in step 16) 21. Display Total Calories Expended (the result of the calculation in step 17) 22. Display Calorie Balance (the result of the calculation in step 18)
23. Display Weight Gain/Loss (the result of the calculation in step 19)

Next, from the list of activities, we can now determine the modules that will be used in the program: 1. Get Personal Information 2. Get Calories Consumed 3. Get Calories Expended 4. Define Constants (Heart Rates) 5. Calculate Total Calories Consumed 6. Calculate Total Calories Expended 7. Calculated Calorie Balance 8. Convert Calorie Balance to Weight Gain/Loss 9. Display Results

From this information we can then design a top-level algorithm for each of the modules: 1. GetPersonal = (name, age, gender) 2. GetCalConsumed = (Breakfast, Lunch, Dinner, Snack) 3. GetCalExpended = (time spend doing activities?) 4. GetHeartRate = (Heavy Activity, Moderate Activity, Light Activity) 5. CalTotalCalCons = (xxxx) 6. CalTotalCalExpen = (xxxx) 7. CalCalBalance = (xxx) 8. ConvertCalBal = (xxx) 9. DisplayResults = (displayed resuts lbs/oz) 10. GetHeartRate = To me these would be a constant. We will define one for each level of activity heavy, moderate, light/daily and rest/sleep for each gender. I will research this and get an average for each for each gender by the beginning of next week. I figured this would simplify the formula a bit. 11. GetCalExpended = To me this is gotten from the formula for which we need their gender, weight, age, heart rate (which we are defining as a constant to simplify) and time of each level of activity. I figured we could ask how long they did heavy activities, moderate activities and slept in a 24 hours, and the left over would be the light/daily activity level. We would add all four levels of activity and that would give us the total calories expended for 24 hours.
Finally after the algorithm has been identified, we can now write a simple pseudocode that lists the programs input, output and processing components:

Similar Documents