@@ -0,0 +1,1852 @@
+import java.util.Scanner;%0A%0Apublic class PointsInsideFigure %7B%0A%0A    public static final double INSIDE_X1 = 12.5;%0A    public static final double INSIDE_Y1 = 6;%0A    public static final double INSIDE_X2 = 22.5;%0A    public static final double INSIDE_Y2 = 13.5;%0A    public static final double OUTSIDE_X1 = 17.5;%0A    public static final double OUTSIDE_Y1 = 8.5;%0A    public static final double OUTSIDE_X2 = 20;%0A    public static final double OUTSIDE_Y2 = 13.5;%0A%0A    public static void main(String%5B%5D args) %7B%0A        double pointX, pointY;%0A%0A        Scanner scan = new Scanner(System.in);%0A        pointX = scan.nextDouble();%0A        pointY = scan.nextDouble();%0A        System.out.println(checkInsideOutside(pointX, pointY));%0A    %7D%0A%0A    /**%0A     * Check if the point is inside the big rectangle and outside the small rectangle%0A     * @param  pointX double%0A     * @param  pointY double%0A     * @return String %22Inside%22 or %22Outside%22%0A     */%0A    public static String checkInsideOutside(double pointX, double pointY) %7B%0A        if (!checkPointInsideRectangle(pointX, pointY, INSIDE_X1, INSIDE_Y1, INSIDE_X2, INSIDE_Y2, true)) %7B%0A            return %22Outside%22;%0A        %7D%0A%0A        if (checkPointInsideRectangle(pointX, pointY, OUTSIDE_X1, OUTSIDE_Y1, OUTSIDE_X2, OUTSIDE_Y2, false)) %7B%0A            return %22Outside%22;%0A        %7D%0A%0A        return %22Inside%22;%0A    %7D%0A%0A    private static boolean checkPointInsideRectangle(double pointX, double pointY, double rectX1, double rectY1, double rectX2, double rectY2, boolean includeBorder) %7B%0A        if (includeBorder) %7B%0A            return pointX %3E= rectX1%0A                && pointX %3C= rectX2%0A                && pointY %3E= rectY1%0A                && pointY %3C= rectY2;%0A        %7D else %7B%0A            return pointX %3E rectX1%0A                && pointX %3C rectX2%0A                && pointY %3E rectX1%0A                && pointY %3C rectY2;%0A        %7D%0A    %7D%0A%7D%0A

Solve homework2-problem3: PointsInsideFigure