/// <summary> /// Constructor for this base class that consumes and sets /// this types <see cref="IRobotOutputter"/> object for /// handling how a robot pushes out messages. /// </summary> /// <param name="outputter">The <see cref="IRobotOutputter"/> object for the robot to use for messaging.</param> public Robot(IRobotOutputter outputter) { // Robots must be able to output, no exceptions (i.e. throw an exception! Probably bad comment wording ahem) if (outputter == null) { throw new ArgumentNullException(nameof(outputter)); } MessageOutputter = outputter; }
/// <summary> /// Constructor for a SmallRobotV1, which passes /// a <see cref="IRobotOutputter"/> object to the /// <seealso cref="Robot"/> base class for future use. /// </summary> /// <param name="outputter">The <see cref="IRobotOutputter"/> object to determine how this robot outputs command details.</param> public SmallRobotV1(IRobotOutputter outputter) : base(outputter) { }
/// <summary> /// Constructor for a LargeRobotV2, which passes /// a <see cref="IRobotOutputter"/> object to the /// <seealso cref="Robot"/> base class for future use. /// </summary> /// <param name="outputter">The <see cref="IRobotOutputter"/> object to determine how this robot outputs command details.</param> public LargeRobotV2(IRobotOutputter outputter) : base(outputter) { }