// Short client program to test the Angle class. It constructs two specific // angles and their sum and then adds 5 more angles selected at random and // sorts and prints the list. import java.util.*; public class AngleTest { public static void main(String[] args) { Angle a1 = new Angle(23, 26); Angle a2 = new Angle(15, 48); Angle a3 = a1.add(a2); ArrayList list = new ArrayList(); list.add(a1); list.add(a2); list.add(a3); System.out.println(list); Random r = new Random(); for (int i = 0; i < 5; i++) list.add(new Angle(r.nextInt(90), r.nextInt(60))); System.out.println(list); Collections.sort(list); System.out.println(list); } }