Can you write a better strategy one that is more efficient

Assignment Help Computer Engineering
Reference no: EM132151424

Assignment

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? 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: EM132151424

Questions Cloud

Explain how surge pricing works : Uber uses a 'surge pricing' model. The price of an Uber ride increase when it is rush hour, there is a special event, or when bad weather occurs.
Assignment-hacking the ais : In today's technology environment, hackers present a substantial risk to a firm's accounting or business system. As the result of these attacks
Data analysis and quality improvement : To display knowledge of Data Analysis and Quality Improvement materials and be able to apply theory to practice.
The difficulties in identifying the source of a packet sent : Based on your study of the upper layers of the tcp/ip architecture, what are the difficulties in identifying the source of a packet sent over the Internet?
Can you write a better strategy one that is more efficient : 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.
Self-interest in disincentivizing : In light of the news over the past several months, do you think a company/government agency has a clear self-interest in disincentivizing a whistleblower
How create a loop which gives the player instructions : How Create a loop which gives the player instructions on what to input. Then read input from the player.
What are the theoretical and practical issues : What are the theoretical and practical issues raised by the application of international humanitarian law(IHL) to outer space?
Systems analysis and design : Allsports is a multisport club which has several thousand members who take part in a diverse range of sporting activities, such as football, cricket

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