Advertisement
seby_stephens

Lesson 3 Activity 4 DoorBuilder

Nov 25th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.93 KB | None | 0 0
  1. package Lesson3Activity4;
  2. //Creates the DoorBuilder Robot
  3. public class DoorBuilder extends Constructicons{
  4.     /**
  5.      * Constructor for the DoorBuilder Class
  6.      * @param a
  7.      * @param s
  8.      * @param d
  9.      * @param b
  10.      * @ return - none
  11.      */
  12.     public DoorBuilder(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 DoorBuilder
  18.      * @ param - none
  19.      * @ return - void
  20.      */
  21.     public void build(){
  22.         //Going up the door
  23.         putBeeper();
  24.         move();
  25.         putBeeper();
  26.         move();
  27.         putBeeper();
  28.         //Doing top part of door
  29.         turnRight();
  30.         move();
  31.         putBeeper();
  32.         move();
  33.         putBeeper();
  34.         //Going down door
  35.         turnRight();
  36.         move();
  37.         putBeeper();
  38.         move();
  39.         putBeeper();
  40.     }
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement