elevator c++

Write class Elevator. An elevator will know which floor they are on and which floor it is on the way to and which direction it is (Up, Down or Stagnant). The lift will “work” with another elevator and to determine who should get a person that want to go to from a particular floor according to the following principle:

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

If both elevators are standstill, the closest elevator gets the person, or if one of the elevators is in move and the other is standstill  the elevator that is standstill should go and get the person else if both elevators are in move nothing should happen. The lift should also have a function which increments the state ie. increases the floor if the direction is up and decreases when it is down. The actual main program will show the condition of the elevator and be able to simulate that people press the buttons inside and outside the elevators as well as stepping up “time.” Create a project and split into different files according to the pattern of large programs.

Examples of visualization with indication of the condition:

76

5  D

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

4

3      S

21

D(down) 

S(still)

U(up)

Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER