package edu.unca.cs.csci202;

/**
 *
 * @author brock
 */
public class Point1080 {
    private int x ;
    private int y ;
    
    public Point1080() {
        x = 0 ;
        y = 0 ;
    }
    
    public Point1080(int x, int y) throws IllegalArgumentException {
        if (x<0 || 1920<=x || y<0 || 1080<=y) {
            throw new IllegalArgumentException("out of range") ;
        }
        this.x = x ;
        this.y = y ;
    }
    
    public int getX() {
        return x ;
    }
    
    public int getY() {
        return y ;
    }
    
    public void setX(int x) throws IllegalArgumentException {
        if (x<0 || 1920<=x) {
            throw new IllegalArgumentException("out of range") ;
        }
        this.x = x ;
    }
    
   public void setY(int y) throws IllegalArgumentException {
        if (y<0 || 1080<=y) {
            throw new IllegalArgumentException("out of range") ;
        }
        this.y = y ;
    }
}
