dilanthas / AnalogClockProblem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AnalogClockProblem

Write a program that, given a valid 24 hour clock time; computes the angle between the hour and minute hand of an analog clock. Assume that the hour hand does not move at all until it need to shift to the next hour (hour hand stays at 6 from 0600 to 0659)

Examples: 1200 - 0 degrees, 1800 - 180 degrees, 0900 - 90 degrees, 1500 - 90 degrees

Provide an enhanced solution, assuming that the hour hand moves in proportion to the minutes within an hour. For instance, at 0600 - the hour hand is pointed directly at 6. By 0630, the hour hand has moved an additional 15 degrees, by 0645 an additional 22.5 degrees

Provide any modifications required to compute the angle between a minute hand and a second hand of an analog watch; assuming the minute hand moves proportional to the seconds expended

About


Languages

Language:Java 100.0%