Question: Queues are commonly used in network systems. For example, e - mail is placed in queues while it is waiting to be sent and after
Queues are commonly used in network systems. For example, email is placed in queues while it is waiting to be sent and after it arrives at the recipients mailbox. A problem occurs, however, if the outgoing mail processor cannot send one or more of the messages in the queue. For example, a message might not be sent because the recipients system is not available. Write an email simulator that processes mail at an average of messages per minute. As messages are received, they are placed in a queue. For the simulation, assume that the messages arrive at an average rate of messages per minute. Remember, the messages must arrive randomly, so you will need to use a random number generator to determine when messages are received. Each minute, you can dequeue up to messages and send them. Assume that up to of the messages in the queue cannot be sent in any processing cycle. Again, you will need to use a random number to determine whether a given message can be sent. If it cannot be sent, put it back at the end of the queue or enqueue it Run the simulator for minutes, tracking the number of times each message had to be requeued. At the end of the simulation, print the statistics that show: The total messages processed. The average arrival rate, that is the average number of messages arriving per minute. The average number of messages sent per minute. The average number of messages in the queue in a minute. The number of messages sent on the first attempt, the number of messages sent on the second attempt, and so forth. The average number of times messages had to be requeued do not include the messages sent the first time in this average. NOTE: Since the question is to assess your understanding of the concept of Queue, you are NOT allowed to use the library of the language that implement queue. You need to write the codes implementation of Queue
Help me write in JAVA the code thanks
It should look something like the output but with attempted msgs
Thank u
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
