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

  Create online store web site

the Java and JSP source codes and SQL scripts for creating a database in Oracle - any configuration files used

  Determine the decision of java

Determine the decision of Java as the platform to develop this program. Identify the Java-based technologies utilized in this project and analyze each of them. Then, provide discussion on the purpose of each of the Java-based technologies utiliz..

  Create a program that does runtime performance

Create a program that does runtime performance analysis of ArrayLists, TreeSets and HashSets.Add 100,000 random random integers ( 0 - 1,000,000 )Attempt to remove 10,000 random integers ( 0 - 1,000,000 )

  Implement all the methods in each of the classes

You need to have an array for this database, the size of this database is given by MAX. You may simply set MAX to be 8 to save your effort in filling information.

  Write a java loop

write a java loop ( of your choice ) that produces exactly the following output to the screen: 2-4-6-8-

  Need a console program

Need a console program that repeatedly prompts the user to enter data until they type done (any case, Upper, Lower, or Mixed).

  Implement a probability calculator for the standard normal

implement a probability calculator for the standard normal distribution using GUI.

  Create a program using a gui interface

In your lab5 folder, compile the file that is a starting point for this assignment. The listing and image of this Java class is on the bottom of this lab description. You can create the programs by cutting and pasting.

  Implement a fish-lake simulation

Implement a Fish/Lake simulation similar to the previous assignment. You will then make adjustments to accommodate class hierarchies and make use of inheritance as well as a JAVA interface.

  Including four sets of quadruplet andsevwn sets of triplets

Mrs. Bernard Scheinberg of Austria had sixty-nine children. Including four sets of quadruplet, sevwn sets of triplets, and sixten of twins. after Mrs. scheinberg died at the age of 56, her husband remarried. during his remaining years, he fathered an..

  Write an interrupt service routine to output brand name

Evaluate the form of the output depended on the coefficients being input - Consider you would like to use PSoC to display a different brand name on the LCD once every 15 s.

  Create a world class that contains a 2d array

You have to create a world class that contains a 2d array then create an abstract class called organism that contains move() method the organism should move randomly one step at the time.

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