package lectures.graphics;
import util.annotations.WebDocuments;
import java.util.Scanner;
import bus.uigen.OEFrame;
import bus.uigen.ObjectEditor;
import lectures.inheritance.extra.MutablePoint;
import lectures.inheritance.is_a.extra.AMutablePoint;
@WebDocuments({"Lectures/Graphics.pptx", "Lectures/Graphics.pdf", "Videos/Graphics.avi"})
public class PointUIs {
static Scanner scanner = new Scanner(System.in);
static int readX () {
System.out.println ("Please enter x:");
return (Integer.parseInt(scanner.nextLine())); }
static int readY () {
System.out.println ("Please enter y:");
return (Integer.parseInt(scanner.nextLine())); }
static void printRadius(double aRadius) {
System.out.println ("The Radius is:" + aRadius);
}
static void printAngle(double anAngle) {
System.out.println ("The Angle is:" + anAngle);
}
public static void main(String[] args) {
MutablePoint aPoint = new AMutablePoint();
OEFrame anOEFrame = ObjectEditor.edit(aPoint);
while (true) { aPoint.setX(readX());
aPoint.setY(readY());
anOEFrame.refresh();
printRadius(aPoint.getRadius());
printAngle(aPoint.getAngle());
}
}
}