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