WriterBot - Sheet1 Page 2 this.writeMove() this.writeMove()...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 /** * */ /** * @author Rocky * */ import becker.robots.* public class WriterBot extends RobotSE { //creating a WriterBot class to extend RobotSE public WriterBot (City aCity, int aStreet, int anAvenue, Direction aDirection, int numthings) {super(aCity, aStreet, anAvenue, aDirection, numthings) } //Creating a method for WriterBots to leave a message as they move public void writeMove() {this.putThing() super.move() } //method to move the robot to position to start next line //from bottom public void nextLineBottom() {this.turnLeft() super.move() this.turnLeft() } //method to start next line from top public void nextLineTop() {this.turnRight() super.move() this.turnRight() } //creating methods for multiple bots to each //write one letter / public void writeMoveH() {this.writeMove() this.writeMove() this.writeMove() this.writeMove() this.writeMove() this.nextLineBottom() super.move() super.move() super.move() this.writeMove() super.move() this.nextLineTop() this.writeMove() this.writeMove()
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Sheet1 Page 2 this.writeMove() this.writeMove() this.writeMove() } public void writeMoveE() {this.writeMove() this.writeMove() this.writeMove() this.writeMove() this.writeMove() this.nextLineTop() super.move() this.writeMove() super.move() this.writeMove() super.move() this.writeMove() this.nextLineBottom() super.move() this.writeMove() super.move() this.writeMove() super.move() this.writeMove() } public void writeMoveL() {this.writeMove() this.writeMove() this.writeMove() this.writeMove() this.writeMove() this.nextLineBottom() super.move() this.turnRight() this.writeMove() this.writeMove() } public void writeMoveO() {this.writeMove() this.writeMove() this.writeMove() this.writeMove() super.turnRight() this.writeMove() this.writeMove() super.turnRight() this.writeMove() this.writeMove() this.writeMove() Sheet1 Page 3 this.writeMove() super.turnRight() this.writeMove() this.writeMove() } }...
View Full Document

Page1 / 3

WriterBot - Sheet1 Page 2 this.writeMove() this.writeMove()...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online