Question: Hi can someone PLEASE help me with this java program asap!!! I am so confused!! This problem is adopted from an ACM programming contest question.

Hi can someone PLEASE help me with this java program asap!!! I am so confused!!

Hi can someone PLEASE help me with this java program asap!!! I

This problem is adopted from an ACM programming contest question. It is also a question that has come up in programmer interviews in the past. Given a time in hh:mm format, calculate the angle one would find on an analog clock between the minute and hour hands. Note that hh may be a single digit or double digit integer, 1-9 or 10-12, but mm is always a double digit integer, 00-59 You can assume that 'up', or 12 o'clock, corresponds to zero degrees, and that angles increase in the clockwise direction. You may use String . Split () , Integer .parseInt ( ) , but no other predefined methods or classes inside the actual conversion. The program's input will be a string that encodes the time. For example, "10:54", "9:10" "12:01". The program has to prompt the user to enter a time, and then calculate and output the angle. You may assume the input is valid with the expected format. 1. The output displays the smallest positive angle in degrees between the hands for each time. The answer should be between 0 degrees and 180 degrees for all input times. The output should be rounded to the nearest 1/1000, i.e. three places after the decimal point. 2. Examples: entering the time "12:00" must print the angle as 0.000, "9:00" as 90.000, "8:10" as 175.000, "12:34" as 173.000, etc. Your design must use OOP concepts with the core functionality implemented inside a class, perhaps called Clock. The latter must provide the necessary method(s) for calculating the angle. Think about what design makes the most sense for you. It could include getters and setters, overriding toString , and so on. 3. Write a second class that includes main () to test your class. The user should enter a time, and the result should print nicely formatted, e.g. 4. The time 9:00 has an angle of 90.000 degrees between the clock' s This problem is adopted from an ACM programming contest question. It is also a question that has come up in programmer interviews in the past. Given a time in hh:mm format, calculate the angle one would find on an analog clock between the minute and hour hands. Note that hh may be a single digit or double digit integer, 1-9 or 10-12, but mm is always a double digit integer, 00-59 You can assume that 'up', or 12 o'clock, corresponds to zero degrees, and that angles increase in the clockwise direction. You may use String . Split () , Integer .parseInt ( ) , but no other predefined methods or classes inside the actual conversion. The program's input will be a string that encodes the time. For example, "10:54", "9:10" "12:01". The program has to prompt the user to enter a time, and then calculate and output the angle. You may assume the input is valid with the expected format. 1. The output displays the smallest positive angle in degrees between the hands for each time. The answer should be between 0 degrees and 180 degrees for all input times. The output should be rounded to the nearest 1/1000, i.e. three places after the decimal point. 2. Examples: entering the time "12:00" must print the angle as 0.000, "9:00" as 90.000, "8:10" as 175.000, "12:34" as 173.000, etc. Your design must use OOP concepts with the core functionality implemented inside a class, perhaps called Clock. The latter must provide the necessary method(s) for calculating the angle. Think about what design makes the most sense for you. It could include getters and setters, overriding toString , and so on. 3. Write a second class that includes main () to test your class. The user should enter a time, and the result should print nicely formatted, e.g. 4. The time 9:00 has an angle of 90.000 degrees between the clock' s

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!