Question: This is C++ question Please make 2 class and a main function using copy constructor This lab implements classes that may be used to simulate

This is C++ question

This is C++ question Please make 2 class and a main function

using copy constructor This lab implements classes that may be used to

Please make 2 class and a main function using copy constructor

This lab implements classes that may be used to simulate the operation of an elevator in a building as people request to move between floors. The classes use randomized numbers to determine the times that people arrive, which floor they want to go to, etc. In this lab you will write two classes and a main program that demonstrates the use of the classes. This lab does NOT include the complete simulation of the elevator. The building has ten floors, numbered 0..9. Each person will arrive at the buildinglobby, which is floor 0. The person will have a definite floor that she wishes to visit for a definite amount of time. Using documentation such as your textbook Ch. 3.9 and www.cplusplus.com, review C++ pseudo-random number functions, especially the seed function. 1. 2. Write a function named timeVisiting that accepts two integer parameters, a and b. The range of a and b are 0a,bINT_MAX. returns a random integer uniformly distributed between a and b inclusive.. (You will need to scale and shift the value returned by rand().). . 3. Write a class named Person The class contains data members for o time of arrival at the building. o destination floor that the person will visit, uniformly distributed in the range 0.9 o time that the person will spend at the destination floor, uniformly distributed in a sensible range time the person arrives back at the lobby to leave the building. O

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!