Suppose that you are in charge of customer service for a certain business. As phone calls come in, the name of the caller is recorded and eventually a service representative returns the call and handles the request. Write a class ServiceRequests that keeps track of the names of callers. The class should have the following methods:
• addName(name)—adds a name to the list of names. Throws a Service- BackUpException if there is no free space in the list.
• removeName(name)—removes a name from the list. Throws a NoService- RequestException if the name is not in the list.
• getName(i)—returns the i th name in the list.
• getNumber—returns the current number of service requests.
Write a program that uses an object of type ServiceRequests to keep track of customers that have called. It should have a loop that, in each iteration, attempts to add a name, remove a name, or print all names. Use an array of size 10 as the list of names.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.