seby_stephens

Lesson 3 Activity 4 WallBuilder

Nov 25th, 2019
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.68 KB | None | 0 0
  1. package Lesson3Activity4;
  2. //Creates the WallBuilder Robot
  3. public class WallBuilder extends Constructicons{
  4.     /**
  5.      * Constructor for WallBuilder class
  6.      * @param a
  7.      * @param s
  8.      * @param d
  9.      * @param b
  10.      * @ return - none
  11.      */
  12.     public WallBuilder(int a, int s, Direction d, int b){
  13.         super(a,s,d,b);
  14.     }
  15.  
  16.     /**
  17.      * Overrides build method of Constructicons and instills the set of instructions for the WallBuilder
  18.      * @ param - none
  19.      * @ return - void
  20.      */
  21.     public void build(){
  22.         //Goes up wall while setting beepers
  23.         for(int i=0;i<4;i++){
  24.             putBeeper();
  25.             move();
  26.         }
  27.     }
  28.  
  29. }
Add Comment
Please, Sign In to add comment