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

  Suggest a way to find web servers for the department

Can you suggest a way to roughly find out the web servers (outside your department) which are not popular among the users in the department? Describe.

  Calculate and display height and cost of container

Compute and display the height and cost of the container. Use the following formulas, where V is the volume, r is the radius, h is the height, and C is the cost.

  What is the standard iana-registered higher-level

How could you determine whether or not a TCP service is running at port 13 of a given Internet host? Test this for the host(s) assigned by your instructor. What is the standard IANA-registered higher-level protocol associated with this port?

  What would happen if a later sent 200 bytes of data to b

Suppose the third party sends each end such a forged 100-byte data packet ostensibly from the other end. What happens now? What would happen if A later sent 200 bytes of data to B?

  Define the tf-idf scheme of determining the weight

Define the TF-IDF scheme of determining the weight of a keyword in a document.

  Elastic and inelastic

Elastic and Inelastic

  Rewrite the snake eyes program using a pair of dice object

Rewrite the Snake Eyes program using a Pair Of Dice object.

  How would the export demand change

a. Suppose that the PST appreciates relative to the EUR. For the following parts, you will not receive anycredit without providing an explanation.(i) In the UK:  How would the export demand change? Why?-

  What are the values of the normal project completion time

What are the values of the normal project completion time, the total work time using the normal times, and the critical path

  Requirements and assumptions for new interface design

You are to prepare the project scope and initial requirements and assumptions for a new Interface Design project for the Museum Guided Exhibition as outlined in the Museum Guided Exhibition problem case study.

  Packet-switched and circuit-switched

Packet-switched and circuit-switched are two standards utilized by wide area networks. In your Discussion Board posting of 4-6 paragraphs, address the following:

  The role of information security policy

The Role of Information Security Policy

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