You have decided that you need to start eating better and getting some exercise. Since you like ridingyour bike when the weather is nice and you have access to stationary bike when the weather is not good,you decide to start cycling every day. Also you want to keep better track of the calories you haveconsumed throughout the day. At the end of the week you want to know the following:
What is the total calories consumed and burned for each day? Assume that for every minute you
are cycling you burn 10 calories.What is the deficit or difference between the number of calories you consume and burn?What is the average calories that you burn and consume?What day did you consume the highest amount of calories? What day did you burn the highestcalories?What day did you consume the least amount of calories? What day did you burn the least calories?
Every day you plan on logging in a notebook the total number of calories you consume(approximately) and how many minutes you spend on either or both bikes. At the end of the week youplan on loading all of these numbers into a program so that you can analyze the data.
Program Requirements
Your program will need to do the following:
Your program will need to do the following:
Feature a menu so that all you need to do is enter a letter and the program will perform thenecessary task. Use the following letters to correspond to what the program needs to do:
Menu Option Operation
T Get Total Calories Consumed and Burned. This will also print out
T Get Total Calories Consumed and Burned. This will also print out
calories consumed and burned per day
D Get the deficit or difference between the calories consumed and burned
for each day.A Get the averagesH Get the highest calories consumed and burned and the corresponding
days in which this happened
L Get the lowest calories consumed and burned and the corresponding
days in which this happenedE Exit or exits the program
Make sure that whatever choice you make from the menu that it is validated and will not cause theprogram to stop prematurelyAllow you to pick numerous tasks before you are done with the program. HINT: you will need aloop here.Load both Cycling and Eating amounts when the program loads. In other words, you will not getprompted to load these values separately. Instead you will initialize your arrays with thesenumbers at the beginning of the program.Nice clean output.Utilization of modular programming. At the minimum you should have 5 modules.
Some Help with the Logic
This program will need to use numerous modules. After you code each module, run it to test it anddebug it, if necessary. Do not move on to your next module until you have successfully tested the moduleyou are currently working on.
This program will need to use numerous modules. After you code each module, run it to test it anddebug it, if necessary. Do not move on to your next module until you have successfully tested the moduleyou are currently working on.
It is all in the Planning
Open up Notepad++ and start to figure out what this program needs to do, the inputs, the outputs,the variables, the 30,000 foot view and your pseudocode.
Time to Test the Logic
Now that you have planned out your attack, test your logic using Raptor. Use the following test datato te
Now that you have planned out your attack, test your logic using Raptor. Use the following test datato te
No comments:
Post a Comment