Sample Outcomes for A05

Return to assignment description

The following are some of the possible outcomes of running the SleepGadget program for A05.

Note that input is represented by blue text with a grey at the end. The indicates a place where the user presses the enter key.


First sample:
Sleep Gadget By Somayeh Kafaie Welcome to our sleep app! It will provide you with some fun facts regarding your sleep habits! Here are available choices: 1. Find recommended hours of sleep 2. Calculate sleep statistics 0. Exit Your choice: 1 How old are you? 5 You need to sleep 10-13 hours! Press Enter ... Here are available choices: 1. Find recommended hours of sleep 2. Calculate sleep statistics 0. Exit Your choice: 1 How old are you? 38 You need to sleep at least 7 hours! Press Enter ... Here are available choices: 1. Find recommended hours of sleep 2. Calculate sleep statistics 0. Exit Your choice: 2 Enter the number of hours you slept in the last few days (when you are done enter a negative number): 7 6 8 9 5 7 -2 In the last 6 days you have slept 7.0 hours per day on average! During this time window, you have slept at most 9 hours and at least 5 hours! Press Enter ... Here are available choices: 1. Find recommended hours of sleep 2. Calculate sleep statistics 0. Exit Your choice: 0 Sleep is the best medicine; try to get enough of it! Good bye!
Second sample:
Sleep Gadget By Somayeh Kafaie Welcome to our sleep app! It will provide you with some fun facts regarding your sleep habits! Here are available choices: 1. Find recommended hours of sleep 2. Calculate sleep statistics 0. Exit Your choice: 3 Please enter a valid choice number (0-2) Here are available choices: 1. Find recommended hours of sleep 2. Calculate sleep statistics 0. Exit Your choice: 2 Enter the number of hours you slept in the last few days (when you are done enter a negative number): 10 12 14 13 12 -1 In the last 5 days you have slept 12.2 hours per day on average! During this time window, you have slept at most 14 hours and at least 10 hours! Press Enter ... Here are available choices: 1. Find recommended hours of sleep 2. Calculate sleep statistics 0. Exit Your choice: 2 Enter the number of hours you slept in the last few days (when you are done enter a negative number): 13 12 14 15 12 -2 In the last 5 days you have slept 13.2 hours per day on average! During this time window, you have slept at most 15 hours and at least 12 hours! Press Enter ... Here are available choices: 1. Find recommended hours of sleep 2. Calculate sleep statistics 0. Exit Your choice: 1 How old are you? 2 You need to sleep 11-14 hours! Press Enter ... Here are available choices: 1. Find recommended hours of sleep 2. Calculate sleep statistics 0. Exit Your choice: 0 Sleep is the best medicine; try to get enough of it! Good bye!

Return to assignment description