FINANCIAL INSTITUTION - JAVA
1] Program to represent a simple queuing theory problem. The program will simulate the "time states" of a multiple teller bank which uses the "single queue" approach. Make the problem even simpler by allowing it to be command driven, than time driven. The bank has 6 available teller windows. Each of the six windows (numbered 0 thru 5) may be either *open* or *closed* at any particular time. Customers *wait* in one line until their turn. As a teller becomes available, the customer at the head of the queue is removed from the line and processed by that teller. Different customers have different processing requirements and it takes some number of *clock ticks* to process a customer
2] The following commands will be used.
Open - open a closed teller (opening an open teller is an error).
Close - close an open teller (closing a closed teller or a teller that has a current customer is an error).
Wait - add a customer (FIFO) to the waiting line.
Time - some amount of time passes before the next action.
Print - print current data about the status of the simulation.
1. 3] The commands will be supplied one per line. Each command (except *Print*) must have an associated argument. *Close* and *Open*, will have a teller number. *Time* will have some number of clock ticks. The *Wait* command argument is the amount of time (clock ticks) it will take a teller to process that customer.
4] All six teller windows start out *closed* and the waiting line is *empty*. The execution of any command (except *Print* or *Time*) counts as one clock tick. This clock tick occurs after execution of the command. During that clock tick each customer being serviced by a teller is processed one clock tick. A *Time* command indicates that no other commands occur for the indicated number of clock ticks; therefore each customer currently being served is processed up to the indicated number of clock ticks. Any time a customer's processing time is reduced to zero, that customer is removed and replaced with the next customer waiting in line. Your program must keep a *clock*, and each time that a clock tick is processed your clock should be incremented. The clock should start with time 0.
5] The program should accept its input from *stdin* and print its output to *stdout*.
6] A typical input sequence might look like the following:
`<font face="arial, helvetica, sans-serif" size="3">Open 5<br /></font>``<font face="arial, helvetica, sans-serif" size="3">Open 3<br /></font>``<font face="arial, helvetica, sans-serif" size="3">Wait 3<br /></font>``<font face="arial, helvetica, sans-serif" size="3">Wait 9<br /></font>``Time 3<br />``Wait 5`
`<font face="arial, helvetica, sans-serif" size="3">Print<br />
7] The <i>Print</i> command will display 7 lines of output, indicating the status of all of the teller windows in the following format. The value XXXX in the first line should be replaced with the time from your running simulation clock value. Each customer is represented by an integer value in square brackets. The number within the brackets at a teller window is the remaining processing time for that customer. The final line reflects the processing time of each customer now waiting in line. NOTE: this sample printout is NOT derived from the sample input above.<br />
**time (XXXX)**<br />
teller 0 closed<br />
teller 1 closed<br />
teller 2 <br />
teller 3 <br />
teller 4 closed<br />
teller 5 <br />
1) Complete and fully-functional working program in JAVA programming language and in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased. 4) The program should be authentic and exclusive. 5) The program should only be coded in the Java programming language. 6) seller should maintain confidentiality of the buyer.