JMU
logoDukeDash.png
Going Further on Programming Assignment 3


These questions/problems/tasks allow you to go further on Programming Assignment 3. They are neither required nor for extra credit. They will, however, help you gain a deeper understanding of the material.
1 ETAPrinter: People often want to know their estimated time of arrival (ETA). To that end, write a main class named ETAPrinter that is passed the current hour as command-line argument 0, the current minute as command-line argument 1, and the remaining number of hours in the trip as command-line argument 2, and calculates and prints the ETA in hours and minutes.

The current hour and minute must be String representations of int values and the remaining number of hours in the trip must be a String representation of a double value. Both components of the ETA must be int values.

Both the current time and the ETA must use a 24-hour clock.

For example, if the main class is passed a current time of 10:20 (i.e., command-line arguments 0 and 1 are 10 and 20, respectively) and a remaining number of hours in the trip of 3.5 (i.e., command-line argument 2 is 3.5), it should print out the time 13:50.

Copyright 2013