Absolute Java (6th Edition)
Absolute Java (6th Edition)
6th Edition
ISBN: 9780134041674
Author: Walter Savitch, Kenrick Mock
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 1, Problem 10PP

Scientists estimate that roughly 10 grams of caffeine consumed at one time is a lethal overdose. Write a program with a variable that holds the number of milli grams of caffeine in a drink and outputs how many drinks it takes to kill a person. A 12-ounce can of cola has approximately 34 mg of caffeine, while a l6-ounce cup of coffee has approximately 160 mg of caffeine.

Blurred answer
Students have asked these similar questions
Scientists estimate that roughly 10 grams of caffeine consumed at one time is a lethal overdose. Write a program with a variable that holds the number of milli-grams of caffeine in a drink and outputs how many drinks it takes to kill a person. A 12-ounce can of cola has approximately 34 mg of caffeine, while a 16-ounce cupof coffee has approximately 160 mg of caffeine.
Write a program using inputs age (years), weight (pounds), heart rate (beats per minute), and time (minutes), respectively. Output calories burned for women and men.
Write a program that computes the amount of calories burned when you run. Your program should ask for the duration of the run in minutes the speed of the run in mph and your weight in pounds. Compute the amount of calories burned and print it. The calories burned is computed using the expression below: \n", "\n", "$$ calories/minute = (MET*weight*1.6)/200 $$\n", "\n", "MET is a value given below:\n", " - if speed is 5mph or less - MET = 8\n", "- if speed is greater than 5 and less or equal 8 mph - MET = 11.5 \n", "- if speed is greater than 8 and less or equal 10 mph - MET = 14 \n", "- if speed is greater than 10 mph - MET = 20\n", "\n", "Remeber to multiply this result by the time running to show the total amount of calories burned.\n"

Chapter 1 Solutions

Absolute Java (6th Edition)

Ch. 1 - Can a Java program have two different variables...Ch. 1 - Give the declaration for two variables called feet...Ch. 1 - Give the declaration for two variables called...Ch. 1 - Prob. 14STECh. 1 - Prob. 15STECh. 1 - Prob. 16STECh. 1 - Convert each of the following mathematical...Ch. 1 - What is the output of the following program...Ch. 1 - What is the output produced by the following lines...Ch. 1 - Prob. 20STECh. 1 - Given the following fragment that purports to...Ch. 1 - What is the output produced by the following lines...Ch. 1 - What is the output produced by the following lines...Ch. 1 - What is the output produced by the following? Ch. 1 - What is the output produced by the following?...Ch. 1 - What is the output produced by the following?...Ch. 1 - What is the output produced by the following? Ch. 1 - Prob. 28STECh. 1 - Prob. 29STECh. 1 - What is the output of the following two lines of...Ch. 1 - Suppose sam is an object of a class named Person...Ch. 1 - The following code is supposed to output the...Ch. 1 - Prob. 33STECh. 1 - What is the output produced by the following Java...Ch. 1 - What is the normal spelling convention for named...Ch. 1 - Write a line of Java code that will give the name...Ch. 1 - Body Mass Index (BMI) helps in specifying the...Ch. 1 - The video game machines at your local arcade...Ch. 1 - Write a program that starts with the string...Ch. 1 - A government research lab has concluded that an...Ch. 1 - Write a program that starts with a line of text...Ch. 1 - Write a program for calculating the simple...Ch. 1 - Write a program that outputs the number of hours,...Ch. 1 - The following program will compile and run, but it...Ch. 1 - A simple rule to estimate your ideal body weight...Ch. 1 - Scientists estimate that roughly 10 grams of...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Constants, Variables, Data types, Keywords in C Programming Language Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=d7tdL-ZEWdE;License: Standard YouTube License, CC-BY