package lectures.mvc.properties;
import util.annotations.WebDocuments;

import java.util.Scanner;

import lectures.composite.objects_shapes.CartesianPlane;
import util.annotations.Tags;
@Tags({"Controller"})
@WebDocuments({"Lectures/MvcProperties.pptx", "Lectures/MvcProperties.pdf", "Videos/MvcProperties.avi"})
public class ACartesianPlaneInputter implements PraxisConsoleController{
    static Scanner scanner = new Scanner(System.in);
    CartesianPlane model;
    public ACartesianPlaneInputter(CartesianPlane aModel) {
        model = aModel;     
    }
    public void processInput () {
        while (true) {
            System.out.println ("Please enter new positive axes length and a negative number to terminate:");
            String nextString = scanner.nextLine();
            // put break point 
            int nextInt = Integer.parseInt(nextString);
            if (nextInt < 0) {
                break;
            }
            model.setAxesLength(nextInt);
            
        }
    }
}