Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSIT 575-Programming Fundamentals for Computer Science Lab #4D Objectives To learn to code, compile and run a program containing REPETITION structures Assignment Plan and code

image text in transcribed

CSIT 575-Programming Fundamentals for Computer Science Lab #4D Objectives To learn to code, compile and run a program containing REPETITION structures Assignment Plan and code a program utilizing one or more repetition structures to solve the following problem After caffeine is absorbed into the body, 13% is eliminated from the body each hour. Assume a person drinks an 8-oz cup of brewed coffee containing 130 mg of caffeine, and that the caffeine is absorbed immediately into the body. Write a program to calculate the following values (a) The number of hours required until 65 mg (one-half the original amount) remain in the body. (b) The amount of caffeine in the body X hours after the person drinks the coffee. Input Person's name and how many hours they want to see the output for. Output For (a) above, just the number of hours required until 65 mg remain in the body. For (b) above, a listing of caffeine remaining after each hour until the user's limit is reached Note Adequately check entered data for validity. Use adequate test data to process all valid data and representative data to show how your program handles invalid data Label all output clearly. Be sure your output file contains user prompts and what was entered by the user in addition to the results of your program processing BE SURE TO INCLUDE ADEQUATE ERROR HANDLING IN YOUR PROGRAM AND ERROR DATA WHEN YOU RUN THE PROGRAM TO DEMONSTRATE ERROR HANDLING. Turn in Program listing and program output. Program documentation and first lines in the output file should include //Last Name, First Name //Class Section Number, Day, Time //Lab Number and Assignment Due Date CSIT 575-Programming Fundamentals for Computer Science Lab #4D Objectives To learn to code, compile and run a program containing REPETITION structures Assignment Plan and code a program utilizing one or more repetition structures to solve the following problem After caffeine is absorbed into the body, 13% is eliminated from the body each hour. Assume a person drinks an 8-oz cup of brewed coffee containing 130 mg of caffeine, and that the caffeine is absorbed immediately into the body. Write a program to calculate the following values (a) The number of hours required until 65 mg (one-half the original amount) remain in the body. (b) The amount of caffeine in the body X hours after the person drinks the coffee. Input Person's name and how many hours they want to see the output for. Output For (a) above, just the number of hours required until 65 mg remain in the body. For (b) above, a listing of caffeine remaining after each hour until the user's limit is reached Note Adequately check entered data for validity. Use adequate test data to process all valid data and representative data to show how your program handles invalid data Label all output clearly. Be sure your output file contains user prompts and what was entered by the user in addition to the results of your program processing BE SURE TO INCLUDE ADEQUATE ERROR HANDLING IN YOUR PROGRAM AND ERROR DATA WHEN YOU RUN THE PROGRAM TO DEMONSTRATE ERROR HANDLING. Turn in Program listing and program output. Program documentation and first lines in the output file should include //Last Name, First Name //Class Section Number, Day, Time //Lab Number and Assignment Due Date

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

Step: 3

blur-text-image

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

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions

Question

2. What potential barriers would you encourage Samuel to avoid?

Answered: 1 week ago