Implement the simple elevator in python using classes

Assignment Help Computer Engineering
Reference no: EM132150474

Your task is to implement the simple elevator in Python using classes. The default strategy is the simple "start at the bottom, go to the top, then go to the bottom".

Can you write a better strategy one that is more efficient? Project Description/Specification Create three classes:

Building, Elevator and Customer. Equip the building with an elevator. Ask user to customize the number of floors and the number of customers.

Program should have error checking to make sure the user inputs are valid. For example, if a user gives non-integer inputs, notify the user that the inputs are incorrect and prompt again. Each customer starts from a random floor, and has a random destination floor.

Each customer will use the elevator only once, i.e., when a customer moves out of the elevator, he/she will never use it again.

When all customers have reached their destination floor, the simulation is finished. Part of the grade on this assignment will be the appropriateness of your classes, methods, and any functions you use.

The quality of the code will matter as well as the performance. All class methods require a docstring for a general description of the method.

Implement both your own strategy and the default strategy and compare.

Your strategy does not have to be better but the comparison is required. Don't use any global variables.

Reference no: EM132150474

Questions Cloud

Create a method that takes three number : Create a method that takes three number as parameters and returns the maximum of three to the calling method.
Allocation and deallocation of mono-dimensional : Declare and implement a function DisplayMatrix(...) that displays the address of the matrix of floats in the memory and all its elements.
Liquidity transformation and maturity transformation : Please explain "liquidity transformation and maturity transformation leads to bank collapse" . please support your discussion with examples and literature
Expected return and standard deviation of returns : If the expected return and standard deviation of returns for Stock A are 10 percent and 30 percent, respectively, and the expected return and standard deviation
Implement the simple elevator in python using classes : Building, Elevator and Customer. Equip the building with an elevator. Ask user to customize the number of floors and the number of customers.
What average annual return : What average annual return would have been earned on this investment? (Round answer to 2 decimal places, e.g. 52.75.)
What is the envisioned system : In a few sentences, tell what is the envisioned system? the most important functions of the system, and the most significant effects of the system?
You know that the price of sunland : You know that the price of Sunland, Inc., stock will be $36 exactly one year from today. Today the price of the stock is $34. Determine what must happen
Which stock should you choose : Stocks A, B, and C have expected returns of 12 percent, 12 percent, and 10 percent, respectively, while their standard deviations are 42 percent

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd