Java Reference
In-Depth Information
PP 2.3 Write an application that prompts for and reads a person's name,
age, college, and pet's name. Then print the following paragraph,
inserting the appropriate data:
Hello, my name is name and I am age years
old. I'm enjoying my time at college , though
I miss my pet petname very much!
PP 2.4 Write an application that reads two floating point numbers and
prints their sum, difference, and product.
PP 2.5 Create a version of the TempConverter application to convert
from Fahrenheit to Celsius. Read the Fahrenheit temperature
from the user.
PP 2.6 Write an application that converts miles to kilometers. (One mile
equals 1.60935 kilometers.) Read the miles value from the user
as a floating point value.
PP 2.7 Write an application that prompts for and reads integer values
for speed and distance traveled, then prints the time required for
the trip as a floating point result.
PP 2.8 Write an application that reads values representing a time dura-
tion in hours, minutes, and seconds and then prints the equiva-
lent total number of seconds. (For example, 1 hour, 28 minutes,
and 42 seconds is equivalent to 5322 seconds.)
PP 2.9 Create a version of the previous project that reverses the
computation. That is, read a value representing a number of sec-
onds, then print the equivalent amount of time as a combination
of hours, minutes, and seconds. (For example, 9999 seconds is
equivalent to 2 hours, 46 minutes, and 39 seconds.)
PP 2.10 Write an application that determines the value of the coins in a jar
and prints the total in dollars and cents. Read integer values that
represent the number of quarters, dimes, nickels, and pennies.
PP 2.11 Write an application that prompts for and reads a double value
representing a monetary amount. Then determine the fewest
number of each bill and coin needed to represent that amount,
starting with the highest (assume that a ten-dollar bill is the max-
imum size needed). For example, if the value entered is 47.63
(forty-seven dollars and sixty-three cents), then the program
should print the equivalent amount as:
4 ten dollar bills
1 five dollar bills
2 one dollar bills
VideoNote
Developing a solution of
PP 2.10.
Search WWH ::




Custom Search