package class4_1_RobotFactories;// Dr. Yoder. MSOE. 19 December 2016 /** * This robot has a bar that slides in the X direction * and a hand that moves along the bar in the Y direction */ public class RectangularRobot extends AbstractRobot{ // added after class to mirror CircularRobot's factory private RectangularRobot(){} @Override public void setTarget(double targetXMeters, double targetYMeters) { super.setTarget(targetXMeters, targetYMeters); } @Override public String toString() { return "The robot reaches the target at "+getTargetString()+ " by setting the " + "x arm to "+getTargetXMeters()+" meters and the y arm to "+getTargetYMeters()+" "; } // added after class public static class RectangularRobotFactory implements RobotFactory { @Override public AbstractRobot create() { return new RectangularRobot(); } } }