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 and implement an application to manage a tournament

Design and implement an application to manage a tennis tournament of 16 players - design and implement an application to manage a tournament. Is there anybody who knows how to do this?

  Java program to write-read data from user using i-o function

Write java program to write and read data from user using I/O functions. Describe class with data members name[20],emp_id,basic pay,net pay.calculate all the allowances.

  Implement the link list using java programming concepts

Modify the class LinkedList by adding to it the following methods. The appropriate error message should be generated if an invalid condition occurs.

  Create java application which creates random phone number

Create and implement Java application which creates and prints a random phone number of the form xxx-xxx-xxxx. Include the dashes in the output.

  Create a gantt chart for the project

Create a Gantt chart for the project. Compare and contrast the information that one receives from a Gantt chart, versus that of a PERT diagram

  Write a program that establishes two savings accounts

Write a program that establishes two savings accounts with saver1 having account number 10002 with an initial balance of $2,000, and saver2 having account 10003 with an initial balance of $3,000

  Write program that convert us dollar into canadian dollar

Design a new class named Polygon that extends GeometricObject and implements Comparable. The number of sides in polygons varies, you cannot use a certain number of data fields for sides of a polygon - Write a program that passes an unspecified numb..

  Write a blog article for a codingtechnical community

write a blog article for a codingtechnical community blog.the theme is general c or java. choose any subject under this

  Write the definition of the class inventory

Write the definition of the class Inventory such that object of this class can store an item's id, name, number of pieces in stock, manufacturer's price, and selling price. The class should include constructors, setters, getters, and toString meth..

  Create a sales tracking program named salestracking.java

create a sales tracking program named SalesTracking.java. This program must track monthly sales as well as compute average yearly sales, total sales for the year, and which month had the highest sales and which month had the lowest sales.

  Write a program to track hourly employee arrival departure

THE JAVA SOURCE CODEWILL AWARD AN ADDITIONAL 1,500 POINTS TO PERSON WITH THE BEST ANSWER (you will be directed to another one of my previous, unanswered questions.)A company hires you to write a program to track hourly employee arrival and departure ..

  T an array using insertion sort and track the number of swap

How to sort an array using insertion sort and track teh number of swaps during the sorting

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