Java Reference
In-Depth Information
You can also calculate the unpaid loan balance after making certain pay-
ments. For example, the unpaid balance after making k payments is:
"
#
L 0 ¼ R 1 ð 1 þ iÞ ðmtkÞ
i
;
where R is the periodic payment. (Note that if the payments are monthly,
then m ¼ 12.)
18. During the tax season, every Friday, J&J accounting firm provides assistance
to people who prepare their own tax returns. Their charges are as follows:
a. If a person has low income ( 25,000) and the consulting time is less than or
equal to 30 minutes, there are no charges; otherwise the service charges
are 40% of the regular hourly rate for the time over 30 minutes.
b. For others, if the consulting time is less than or equal to 20 minutes, there are no
service charges; otherwise, service charges are 70% of the regular hourly
rate for the time over 20 minutes.
(For example, suppose that a person has low income, spent 1 hour and 15
minutes, and the hourly rate is $70.00. Then the billing amount is 70.00
0.40 (45 / 60) ¼ $21.00.)
Write a program that prompt the user to enter the hourly rate, the total
consulting time, and if the person has low income. The program should
output the billing amount. Your program must contain a method that takes
as input the hourly rate, the total consulting time, and a value indicating if
the person has low income. The method should return the billing amount.
Your program may prompt the user to enter the consulting time in minutes.
19. The cost to become a member of a fitness center is as follows: (a) the Senior
citizens discount is 30%; (b) if the membership is bought and paid for 12 or
more months in advance, the discount is 15%; or (c) if more than 5 personal
training sessions are purchased, the discount on each session is 20%.
Write a menu driven program that determines the cost of a new membership.
Your programmust contain a method that displays the general information about
the fitness center and its charges, a method to get all the necessary information
to determine the membership cost, and a method to determine the membership
cost. Use appropriate parameters to pass information in and out of a method.
20. Write a program that outputs inflation rates for two successive years and
whether the inflation rates are increasing or decreasing. Ask the user to input
the current price of an item and its price one year and two years ago. To
calculate the inflation rate for a year, subtract the price of the item for that year
from the price of the item one year ago and then divide the result by the price
a year ago. Your program must contain a method to calculate the results. Use
appropriate parameters to pass the information in and out of the method. Do
not use any global variables.
Search WWH ::




Custom Search