I am trying to write an elevator test program in java.
It is suppose to execute the following steps using the methods in the class:
1: Starting from the first-floor.
2: Go to 2nd (update bool GoingUp)
3: Go to 3rd
4: Back to second floor
This is what I have!
public class method {
public static void main(String[] args) {
direction currentfloor = new direction();
currentfloor.down();
}
It's calling the class direction:
public class direction {
public void goDown()
{
System.out.println("Elevator is going down");
}
Now this part works good, but I am stuck with the second step where the new method GoingDown() is suppose to be a bool which i am not sure how to update or set it up, at least not in java :-/?