Question
Please rewrite cpp and h files as following orders. Thank you. Please use this suggested driver program for V3 testing, ElevatorV3.cpp #include #include #include using
Please rewrite cpp and h files as following orders. Thank you.
Please use this suggested driver program for V3 testing,ElevatorV3.cpp
#include #include #include using namespace std;#include #include #include "Rider.h"#include "Building.h"#include "Floor.h"#include "Panel.h"#include "Elevator.h"int main(){ cout
Progress And Status
The first three items are done. In v.3 we're adding the ability for elevators to close their doors and start moving.
- Open their door if there is a rider to disembark.DONE in v.1
- Disembark a rider if the door is open and there's a rider who wants to get off.DONE in v.2
- Board a rider if the door is open and a rider wants to board.DONE in v.2
- Hold the door open for a few seconds in case more riders show up.
- After waiting a few seconds, and there are riders on the elevator, close the door and get moving.
Visual Elevators
1.Test the source files on the console outputusing the test driver,ElevatorV3.cpp, the sample output will show the elevator riders will get off from the elevators and the floor riders will get on into the elevators. The timers will start ticking until zero, the elevator door will close then start moving (but not far ....). Refer to the sample output pictures to check your console output.
- Sangeounn: ElevatorV3 Time a Elevator at Elevator at Elevator at 1 First 2 Second 3 Third 4 Fourth 5 Fifth B riders 3 riders 3 riders Up/Down: Up/Down: Up/Down: Up/Down: Up/Down: 0/0 9/0 0/0 8/0 0/0 [2] [3] Button: Button: Button: Button: Button: Time 1 Elevator at Elevator at Elevator at 1 First 2 Second 3 Third 4 Fourth 5 Fifth door door 6/0 6/0 6/0 9/0 0/0 is OPEN|3 is OPEN|3 Button: Button: Button: Button: Button: -- Time 2 --------------------------- Elevator at Elevator at Elevator at 1 First 2 Second 3 Third 4 Fourth 5 Fifth a IDLE 100 going DOWN 200 going UP Floor at 0" Floor at 100" Floor at 200" Floor at 305" Floor at 410" a IDLE 169 going DOWN 200 going UP Floor at 9" Floor at 160" Floor at 208" Floor at 365\" Floor at 410" e IDLE 166 going DOWN 206 going UP Floor at 8" Floor at 166" Floor at 296" Floor at 365" Floor at 416" door door 6/0 6/6 6/0 9/0 0/0 is OPEN|3 is OPEN|3 Button: Button: Button: Button: Button: - Sample output: ElevatorV3 -- Time 3 --------------------------- Elevator at Elevator at Elevator at 1 First 2 Second 3 Third 4 Fourth 5 Fifth 0 IDLE 100 going DOWN 200 going UP Floor at 0\" Floor at 100\" Floor at 200\" Floor at 305\" Floor at 410\" 0 riders 1 riders 1 riders Up/Down: Up/Down: Up/Down: Up/Down: Up/Down: door door 0/0 0/0 0/0 0/0 0/0 is OPEN|3 is OPEN|3 Button: Button: Button: Button: Button: Time A Elevator at Elevator at Elevator at 1 First 2 Second 3 Third 4 Fourth 5 Fifth 0 IDLE 100 going DOWN 200 going UP Floor at 0\" Floor at 100\" Floor at 200\" Floor at 305\" Floor at 410\" door door 0/0 0/0 0/0 0/0 0/0 is OPEN|3 is OPEN|3 Button: Button: Button: Button: Button: -- Time 5 --------------------------- Elevator at Elevator at Elevator at 1 First 2 Second 3 Third 4 Fourth 5 Fifth 0 IDLE 100 going DOWN 200 going UP Floor at 0\" Floor at 100\" Floor at 200\" Floor at 305\" Floor at 410\" door door 2/0 1/1 0/1 0/4 0/4 Timer starts counting is OPEN|3 [1] is OPEN|2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started