Purchase Solution

Writing Various Programs in Java

Not what you're looking for?

Ask Custom Question

A tech support queue consists of n number of positions and the current position that the tech support individual is working with. If there are no customers that need assistance, the tech support person will go on break for x number of seconds (representing minutes). Also if a customer enters the support queue but the queue already has n number of individuals, then the customer is rejected (with a counter). The tech support person will help the person for y number of seconds (representing minutes). The customers should come in at a steady rate by z number of seconds. There should be a max of customers that may come in as w.

STEPS
1. Write a program using C++ or Java that will take in the following parameters from the user:

x: break for number of seconds
y: time it takes to resolve one individual
z: rate that the customers should be added
w: maximum number of customers allowed to attempt to enter the queue

2. If the rate of y is less than z, then the queue may never get full. The program will simulate process synchronization. You will want to make sure that you output a message during each of these transactions:

Tech support goes on break
Tech support comes back from break
Customer attempts to enter queue
Customer enters queue at position (#)
Customer is rejected due to queue being full
Tech support is currently serving customer (#)
Tech support is finished serving customer (#)
Last customer is finished being served

3. Output the number of served customers and the number of rejected customers with the total length of time it took to serve the customers. Develop a thorough testing example with different values for the inputs.

Purchase this Solution

Solution Summary

This solution provides various programs written in Java.

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.