Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Hydration app Your goal is to drink half a gallon or 64fl oz every day but you aren't great at remembering to do it!

image text in transcribed

3. Hydration app Your goal is to drink half a gallon or 64fl oz every day but you aren't great at remembering to do it! So you decide to create a hydration app that tracks your water intake every day and will alert you based on how much you drank for the day. The program first asks how much water you drank for the day, which is in fl oz and then displays a message based on whether you have hit your goal for the day. Next, it will also tell you how much water you have left to drink. The following are the possible messages you will get based on your intake: 1. If you're drinking 32floz or less, then you get "You're very, very dehydrated! Get that water in! You have X fl oz left to drink." 2. If you're drinking more than 32flooz but less than 64floz, then you get "You're doing great, but you're still halfway to your goal! Get that water in! You have xfl oz left to drink" 3. If you're drinking 64fl oz or more, then you get "You've hit your goal for the day! Great job getting hydrated!" Note that X is the amount of water left after subtracting your intake. Example output ( bold indicates user input) How much water did you drink today?(in floz ) 37 You're doing great, but you're still halfway to your goal! Get that water in! You have 27fl oz left to drink. 3a. Write an algorithm in pseudocode for the program above. 3b. Let's draw a flowchart of the solution 3c. Imagine what a sample run of your program would look like. Think of at least two examples. Sample run 1: Sample run 2 : Sample run 3 : 3d. Identify the values that you must test for. We call these values "boundary conditions". 3e. Implement your solution in C++ using VS Code. Revise your solution, save, compile and run it again. Are you getting the expected result and output? Keep revising until you do. Make you sure you test for the values used in your sample runs, and for the boundary conditions

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications Dexa 2023 Workshops 34th International Conference Dexa 2023 Penang Malaysia August 28 30 2023 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Maqbool Khan

1st Edition

303139688X, 978-3031396885

More Books

Students also viewed these Databases questions

Question

10. What is meant by a feed rate?

Answered: 1 week ago