package com.telus.training.ex1;

public class ClockNeedles {

	public double calculateAngle(int hours, int minutes) {
		double hoursAngle = hours*30;
		double minutesAngle = minutes*6;
		
		double angle = Math.abs(hoursAngle - minutesAngle);
		if(angle > 180.0) angle = angle - 180.0;
		return angle;
	}
}

@@ -84,16 +84,23 @@
 ateAngle
+Between
 (int hou
@@ -144,16 +144,34 @@
 e = 
+convertHoursToAngle(
 hours
-*30
+)
 ;%0A%09%09
@@ -196,17 +196,38 @@
 e = 
+convertMinutesToAngle(
 minutes
-*6
+)
 ;%0A%09%09
@@ -287,10 +287,15 @@
 ;%0A%09%09
-if
+return 
 (ang
@@ -310,45 +310,401 @@
 .0) 
+? (
 angle 
-= angle - 180.0;%0A%09%09return angle
+- 180.0) : angle;%0A%09%7D%0A%0A%09private int convertMinutesToAngle(int minutes) %7B%0A%09%09if (minutes %3C 0 %7C%7C minutes %3E 60) %7B%0A%09%09%09throw new IllegalArgumentException(%22Minutes must be between 0 and 60%22);%0A%09%09%7D%0A%09%09return minutes*6;%0A%09%7D%0A%0A%09private int convertHoursToAngle(int hours) %7B%0A%09%09if(hours %3C 0 %7C%7C hours %3E 12) %7B%0A%09%09%09throw new IllegalArgumentException(%22Hours must be between 0 and 12%22);%0A%09%09%7D%0A%09%09return hours*30
 ;%0A%09%7D

Add checks for hours and minutes