// A program that uses the Angle interface and the AngleImpl class.
// Barry Cornelius, 12th January 2000
import java.io. BufferedReader;
import java.io. InputStreamReader;
import java.io. IOException;
public class AngleImplProg
{
   public static void main(final String[] pArgs) throws IOException
   {
      final BufferedReader tKeyboard =
            new BufferedReader(new InputStreamReader(System.in));
      System.out.println("Type in an angle, e.g., 64-50-0-E");
      final String tLine = tKeyboard.readLine();
      final Angle tAngle = new AngleImpl(tLine);
      System.out.println("The angle is: " + tAngle);
      final int tDegrees = tAngle.getDegrees();
      System.out.println("Its degrees is: " + tDegrees);
      final int tMinutes = tAngle.getMinutes();
      System.out.println("Its minutes is is: " + tMinutes);
      final int tSeconds = tAngle.getSeconds();
      System.out.println("Its seconds is: " + tSeconds);
      final char tDirection = tAngle.getDirection();
      System.out.println("Its direction is: " + tDirection);
      final int tDistance = tAngle.getDistance();
      System.out.println("Its distance is: " + tDistance);
      tAngle.setDirection('W');
      System.out.println("The angle is now: " + tAngle);
      final Angle tCloneAngle = new AngleImpl(tAngle);
      System.out.println("tCloneAngle is: " + tCloneAngle);
      final Angle tAnotherAngle = new AngleImpl(64, 50, 0, 'W');
      System.out.println("tAnotherAngle is: " + tAnotherAngle);
      System.out.println(tCloneAngle.equals(tAnotherAngle));
   }
}
