Bank8Simulation - /* / Bank8Simulation.java Author:...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************* // Bank8Simulation.java Author: Lewis/Loftus // // Solution to Programming Project 12.6 // // Simulates customers waiting in eight lines at a bank using a queue // date structure. //******************************************************************* import java.util.Random; import java.text.DecimalFormat; public class Bank8Simulation { private Random gen; private int custCount; private Line[] lines; private int tellers[]; private int stats[]; private final int MAX_NUM_CUSTOMERS = 20; private final int MAX_CUST_SERVICED = 5; private final int NUM_TELLERS = 8; public Bank8Simulation() { gen = new Random(); custCount = 0; lines = new Line[NUM_TELLERS]; stats = new int[NUM_TELLERS]; for (int i = 0; i<NUM_TELLERS; i++) { lines[i] = new Line(); stats[i] = 0; } tellers = new int[NUM_TELLERS]; } //---------------------------------------------------------------- // Displays the stats for each teller, and identifies the teller
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Bank8Simulation - /* / Bank8Simulation.java Author:...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online