Java 3) Create a class representing an elevator. The privatefields are: number of floors, current position of the elevator,boolean value stating whether the elevator is moving, the requestedfloor. Create a proper constructor, accessors and mutators, thetoString method.
Answer
public class Elevator { private int numFloors; private int currentFloor; private boolean isMoving; private int requestedFloor; public Elevator() { } public Elevator(int numFloors, int currentFloor, boolean isMoving, int requestedFloor) { this.numFloors = numFloors;
OR
OR