Description
The Bluth family has been in trouble with the law ever since George Bluth Sr. was arrested for defrauding investors and gross spending of the company's money. The family has hired the lawyer Bob Loblaw, to represent them. Bob Loblaw charges $13 a minute for his services. The Bluth family needs to determine how much of Bob Loblaw's time they can buy in days, hours, and minutes.
Write a program that asks the Bluth family how much money they can spend for Bob Loblaw's services and then outputs the total number of days, hours, and minutes they can afford. Note: there are 1440 minutes in a day.
Compute the total number of minutes the family can afford (to the nearest minute) and then convert that to days, hours and minutes, in that order.
For example, if you calculated that the Bluths can afford 1503 minutes, the output should read:
1 days, 1 hours, and 3 minutes
It should not be output as:
0 days, 25 hours, and 3 minutes
Here's an example run (the user input is in italics):
Hello Bluth family.
How much money can you spend for Bob Loblaw's services?
20410
You can afford 1570 minutes.
That is 1 days, 2 hours, and 10 minutes.
Hint
Pay special attention to the paragraph about division on p. 63 of the textbook.
Extra Credit
Change your output to be grammatically correct for all outputs. That is, 1 hour should be singular and 2 hours should be plural. The same is true for days and minutes.
If the Bluth family can afford 1503 minutes, the output should read:
What to Do
What to Turn in
Submit via Blackboard the following:
yourlastname_prg1.jar
file (where yourlastname
is your last name),
which includes your Bluth.java
source fileRequirements
When I examine your program, it must satisfy the following requirements. The maximum point value for each is shown in brackets.