Specification | v Design | v Implementation | v Testing | v Maintenance
Specification
Start | v High-level Design
Identify a Class | v Choose a Class | v Low-level Design
Declare a Class ^ | v Implementation
Define a Class ^ | v Testing
Use a Class | v Integrate a Class | v Maintenance
Write main
Public | Elevator
ButtonsPushed MoveToNextFloor DisplayStatus floorButtons[FLOORSINBLDG+1] int currentFloor going | Create and initialize elevator
Are any floor buttons pushed? Moves the elevator Tell where the elevator is One button per floor (ON / OFF) Number of floor elevator is on Direction indicator (UP / DOWN) |
Private | ChooseMove | Determine floor to move to |
Public | Rider
GetOn GetOff PushButton SelectFloor Respond | Create a new rider
Getting on an elevator Getting off an elevator Push any of the elevator's buttons Choose a floor once on elevator Decide whether to get on or off |
Private | status
startFloor destinationFloor number | WAITING, ABOARD, or SERVED Floor from which service requested Rider's destination A rider ID |