Advertisement
FaisalJamil

Homework 2.9

Feb 20th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. //Trailbot class
  2. import becker.robots.*;
  3. public class TrailBot extends RobotSE {
  4.     public TrailBot(City city, int aStreet, int anAvenue, Direction aDirection, int numThings) {
  5.         super(city, aStreet, anAvenue, aDirection, 100);
  6.     }
  7.     /*public void trailMove() {
  8.         this.putThing();
  9.         this.move();*/
  10.     public void move() {
  11.         this.putThing();
  12.         super.move();
  13.     }
  14. }
  15. //Main class
  16. import becker.robots.*;
  17. public class Main {
  18.  
  19.     public static void main(String[] args) {
  20.         City Mississauga = new City();
  21.         TrailBot Robot = new TrailBot(Mississauga,1,1,Direction.SOUTH,0);
  22.         Robot.move();
  23.         Robot.move();
  24.     }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement