Java Reference
In-Depth Information
service was used, and the amount due from the user. For the premium
service, the customer may be using the service during the day and the night.
Therefore, to calculate the bill, you must ask the user to input the number of
minutes the service was used during the day and the number of minutes the
service was used during the night.
16. You have several pictures of different sizes that you would like to frame.
A local picture framing store offers two types of frames—regular and
fancy. The frames are available in white and can be ordered in any color
the customer desires. Suppose that each frame is 1 inch wide. The cost
of coloring the frame is $0.10 per inch. The cost of a regular frame is
$0.15 per inch and the cost of a fancy frame is $0.25 per inch. The cost
of putting a cardboard paper behind the picture is $0.02 per square inch
and the cost of putting glass on top of the picture is $0.07 per square
inch. The customer can also choose to put crowns on the corners,
which costs $0.35 per crown. Write a program that prompts the user
to input the following information and then output the cost of framing
the picture:
a. The length and width, in inches, of the picture.
b. The type of the frame.
c. Customer's choice of color to color the frame.
d. If the user wants to add the crowns, then the number of crowns.
17. Samantha and Vikas are looking to buy a house in a new development.
After looking at various models the three models they like are colonial,
split-entry, and single-story. The builder gave them the base price and the
finished area in square feet of the three models. They want to know the
price per square foot of the three models and the model with the least price
per square foot. Write a program that accepts as input the base price and the
finished area in square feet of the three models. The program outputs the
price per square foot of the three models and the model with the least price
per square foot.
18. One way to determine how healthy a person is by measuring the body fat of
the person. The formulas to determine the body fat for female and male are
as follows:
Body fat formula for women:
A1 ¼ (Body weight 0.732) + 8.987
A2 ¼ Wrist measurement (at fullest point) / 3.140
A3 ¼ Waist measurement (at navel) 0.157
A4 ¼ Hip measurement (at fullest point) 0.249
A5 ¼ Forearm measurement (at fullest point) 0.434
B ¼ A1 + A2 - A3 - A4 + A5
Search WWH ::




Custom Search