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:
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:
7
6
5 D
4
3 S
2
1
D(down)
S(still)
U(up)
12 years ago
20
- Using the Internet, encyclopedia, and/other reference material for research, write a 1,000-word report on feudalism in the history in one...
- Describe and analyze the wartime experiences of the Revolution and the effects on women, slaves and natives.
- I am working on my senior seminar and I am in need of help writing my paper.
- Metropolis Health System has received a wellness grant from the charitable arm of an area electronics company. The grant will...
- who was a founder of fire insurance in the United States?
- Homework Question
- Two lines are represented by the equations x+2y=4 and 4y-2x=12. Determine whether these lines are parallel, perpendicular, or neither. Justify...
- Which property is illustrated by the equation (a+b)+c=c(a+b)
- what does the abbreviation CC stand for
- Consider a firm that produces two commodities x and y. The profit function for the firm given as follows 11=64X-2x2+4xy2+32y-14