Define the following events: arrive sign in

Assignment Help Basic Computer Science
Reference no: EM131076714

The people who run the Motor Vehicle Department (MVD) have a problem. They are concerned that people do not spend enough time waiting in lines to appreciate the privilege of owning and driving an automobile. The current arrangement is as follows:

• When people walk in the door, they must wait in a line to sign in.

• Once they have signed in, they are told either to stand in line for registration renewal or to wait until they are called for license renewal.

• Once they have completed their desired transaction, they must go and wait in line for the cashier.

• When they finally get to the front of the cashier's line, if they expect to pay by check, they are told that all checks must get approved. To do this, it is necessary to go to the check-approver's table and then reenter the cashier's line at the end.
Write an event-driven simulation to help the MVD gather statistics. Each line of input will contain

• A desired transaction code ( L for license renewal, R for registration renewal)

• A method-of-payment code ( $ for cash, C for check)

• An arrival time (integer)

• A name Write out the specifics of each event (when, who, what, and so on). Then display these final statistics:

• The total number of license renewals and the average time spent in MVD (arrival until completion of payment) to renew a license

• The total number of registration renewals and the average time spent in MVD (arrival until completion of payment) to renew a registration Incorporate the following details into your program:

• Define the following events: arrive, sign in, renew license, renew registration, and cope with the cashier (make a payment or fi nd out about check approval).

• In the case of a tie, let the order of events be determined by the list of events just given-that is, arrivals have the highest priority.

• Assume that the various transactions take the following amounts of time:

839_a65d7cc7-d266-4d89-b04f-08a1cf00efac.png

• As ridiculous as it may seem, the people waiting for license renewal are called in alphabetical order. Note, however, that people are not pushed back once their transactions have started.

• For the sake of this simulation, you can assume that checks are approved instantly. Therefore, the rule for arriving at the front of the cashier's line with a check that has not been approved is to go to the back of the cashier's line with a check that has been approved.

Reference no: EM131076714

Questions Cloud

How can social darwinism lead to repressive policies : President Lincoln stated that "I hold it a paramount duty of us in the Free States, due to the Union of the states and perhaps to liberty itself to let the slavery of the other states alone."
State and prove the squeeze theorem for sequences : State and prove the Squeeze Theorem for sequences. Use it to prove that limn→∞(n2 + n + 48769504 + sin(n)/n4 + πn2 - 2) = 0
Fundamental steps in the risk assessment : How would summarize the fundamental steps in the risk assessment and reduction process. How would you recommend establishing the level of acceptable risk?
Paragraphs of five sentences summarizing the article : After reading one of the articles chosen, write five paragraphs of five sentences summarizing the article: Use the following headings:
Define the following events: arrive sign in : When people walk in the door, they must wait in a line to sign in.
Describe types of communication techniques : Describe the techniques and strategies that health care providers need to have in place when working with the identified population. What types of policies need to be implemented to enhance quality patient outcomes with this particular population..
The complete expression for the lowest-order tem : The complete expression for the lowest-order TEMo.o mode can be obtained by solving the paraxial wave equation.
Problem regarding the native americans : Write a short essay (up to 500 words) addressing some of the Puritan beliefs revealed by the works we have covered that led to tensions, conflicts, and concerns among the colonists and/or the Native Americans.
Discussion of integrity and ethics at the cia : What sort of conclusion did Kent Pekel come to in his discussion of integrity and ethics at the CIA? What are his recommendations?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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