Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA - In a recent episode of a popular TV show, a body was discovered lying at the bottom of some basement stairs. If the

JAVA - In a recent episode of a popular TV show, a body was discovered lying at the bottom of some basement stairs. If the temperature of the body upon discovery was 78 degrees and the basement was at a constant temperature of 65 degrees, how long has the person been dead? Write a program that uses Newton's Law of Cooling to determine how many hours a person has been dead: t = time in hours T = temperature of the body upon discovery (Fahrenheit) S = surrounding temperature (Fahrenheit) D = 98.6 - S (normal body temperature - surrounding temperature) Prompt the user to enter values for T, the temperature of the body upon discovery (Fahrenheit), and S, the surrounding temperature. Display the estimated time, t, to two decimal places. For example: Enter the temperature of the body upon discovery: 78 Enter the surrounding temperature: 65 The person has been dead for 4.87 hours Please note that there is no ln() method in the Math class, but there is a method that will calculate the natural logarithm (see Table 4.2 in Section 4.2.2 Exponent Methods for more info).

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

Object Oriented Databases Prentice Hall International Series In Computer Science

Authors: John G. Hughes

1st Edition

0136298745, 978-0136298748

More Books

Students also viewed these Databases questions

Question

What is empathy? Describe how it is related to prejudice.

Answered: 1 week ago