Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This lab implements classes that may be used to simulate the operation of an elevator in a buildingas people request to move between floors. The

This lab implements classes that may be used to simulate the operation of an elevator in a buildingas 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 building lobby, which is floor O. The person will have a definite floor that she wishes to visit for a definite amount of time.


1. Using documentation such as your textbook Ch. 3.9 and www.cplusplus.com, review C++ pseudo-random numberfunctions, especiallythe seed function...


2. Write a function named time Visiting that, • accepts two integer parameters, a and b. The range of a and b are 0 <= a b <= INT_MAX.. • returns a random integer uniformly distributed between a and b inclusive.. • (You will need to scale and shift the value returned by ranc10.),


3. Write a class named Persona • The class contains data members fore 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 o time the person arrives back at the lobby to leave the building

Step by Step Solution

3.47 Rating (147 Votes )

There are 3 Steps involved in it

Step: 1

Online C Compiler Code Compile Run and Debug C program online Write your code i... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Document Format ( 2 attachments)

PDF file Icon
6090d2aed1978_21955.pdf

180 KBs PDF File

Word file Icon
6090d2aed1978_21955.docx

120 KBs Word File

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials Of Business Statistics Communicating With Numbers

Authors: Sanjiv Jaggia, Alison Kelly

1st Edition

78020549, 978-0078020544

More Books

Students also viewed these Programming questions