Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //BackupBot class
- import becker.robots.*;
- public class BackupBot extends RobotSE {
- public BackupBot(City city, int aStreet, int anAvenue, Direction aDirection) {
- super(city, aStreet, anAvenue, aDirection);
- }
- public void Backup() {
- this.setSpeed(5);
- this.turnAround();
- this.move();
- this.turnAround();
- }
- }
- //Main class
- import becker.robots.*;
- public class Main {
- public static void main(String[] args) {
- City Mississauga = new City();
- BackupBot Robot = new BackupBot(Mississauga,1,1,Direction.SOUTH);
- Robot.Backup();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement