Develop a java program that simulates the queues in a bank

Assignment Help JAVA Programming
Reference no: EM13781790

Objective

· Create and use queues

Instructions

Develop a java program that simulates the queues in a bank.

Bank Queue Simulation Problem

Implement the event-driven simulation of a bank that this chapter described on pages 434 through 444. A queue of arrival events will represent the line of customers in the bank. Maintain the arrival events and departure events in an ADT event list, sorted by the time of the event.

The input is a text file of arrival and transaction times. Each line of the file contains the arrival time and required transaction time for a customer. The arrival times are ordered by increasing time.

Your program must count customers and keep track of their cumulative waiting time. These statistics are sufficient to compute the average waiting time after the last event has been processed.

Display trace of the events executed and a summary of the computed statistics (total number of arrivals and average time spent waiting in line). For example, the input file shown in the left columns of the following table should produce the output shown in the right column.

Input   File   Output
1          5        Simulation Begins
2          5        Processing an arrival event at time: 1
4          5        Processing an arrival event at time: 2
20        5        Processing an arrival event at time: 4
22        5        Processing a departure event at time: 6
24        5        Processing a departure event at time: 11
26        5        Processing a departure event at time: 16
28        5        Processing an arrival event at time: 20
30        5        Processing an arrival event at time: 22
88        3        Processing an arrival event at time: 24

Processing a departure event at time: 25

Submit

Submit the following

· UML diagram for the application

· Text file(s) containing the classes and methods

· Text file containing the results

Reference no: EM13781790

Questions Cloud

No prerequisites and no opportunity for advancement : Wendy Swan is asked to fill two new positions at her company. The first requires complicated engineering knowledge; the second has no prerequisites and no opportunity for advancement without a college degree. Wendy wants to hire younger workers so th..
Prejudice-discrimination-racism-sexism and homophobia : Create definitions for prejudice, discrimination, racism, sexism, and homophobia. Definitions for each word should come from your existing understanding of the term.
Traits and behaviors and outcome-based measures : Describe the strengths and weaknesses of traits, behaviors and outcome-based measures. For what kinds of positions is each appropriate?
Current rate of success : Based on the video fast forward to current day and give your opinion on whether or not Apple's product strategy should change given its current rate of success
Develop a java program that simulates the queues in a bank : Develop a java program that simulates the queues in a bank. Implement the event-driven simulation of a bank. A queue of arrival events will represent the line of customers in the bank.
Relationship between training and organizational development : Explain the relationship between training and organizational development. How might each contribute to strategic HR management?
How best labor agreements can be written to offer some : The grievance process-which typically is comprised of labor agreements negotiated by organized labor-has been severely criticized by many analysts for providing unwarranted protection for workers, and for making many types of workers virtually incapa..
Blends regular and premium products from two types : The Carrington Oil Company blends regular and premium products from two types of crude oil, heptane (H) and octane (O). Each liter of regular is composed of at least 50% H. Each liter of premium is composed of at least 40% H. During this planning per..
Assignment on proactive planning : Assignment on Proactive Planning.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Design your own three-stage explicit runge-kutta method

Design your own three-stage explicit Runge-Kutta method with one-step error O(h^4) - Confirm that the global error in your numerical solution is O(h^3).

  Requirementspig is a folk jeopardy dice game with simple

requirementspig is a folk jeopardy dice game with simple rules two players race to reach 100 points. each turn a player

  Can linear search algorithm be encoded using recursion

Determine the average amount of time people spend waiting for tables and provide examples from the "real world" of unsorted lists, sorted lists, indexed lists, lists that permit duplicate elements, and lists that do not permit duplicate elements

  Create a japplet

Create a JApplet that contains a JLabel and JButton. You'll create a JButton that will automatically change font typeface, style, and size when clicked by the user.

  Write a program that creates an apartment object and prompts

Create a structure named Apartment that contains data fields to hold the number of bedrooms, the number of bathrooms, and the monthly rent for the apartment.

  Write a program to register students for a college students

write a program to register students for a college. students have names addresses and courses. implement the interface

  What is relationship between hashing and digital signatures

The security advantages of using two-factor authentication, such as the integrated fingerprint reader in the more recent iPhone models, particularly to support internet services (such as online banking)

  What is an illustration of a javascriptreg framework in the

what is an example of a javascriptreg framework? in the framework you have described what is an example of an

  1 securityimplement security so that all users can view the

1. security.implement security so that all users can view the information about the projects but only authenticated

  Write java program to select pine for furniture company

Write down the Java program for the furniture company. Ask user to select P for Pine, O for Oak or M for Mahogany.

  What is the average response time for this system?

A web server receives a request every 50ms and processes web requests every 8 ms. Using queuing theory, 1. What is the average response time for this system?

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

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