Telephone systemconsider a telephone system that has an


Telephone SystemConsider a telephone system that has an automatic redial feature that will allow the user to return callsautomatically.

This telephone system can store the telephone numbers of the 10 most recent callers. Once thelimit of 10 is reached, and another call is made, the least recent number is deleted to make room for the mostrecent number.When the user wishes to review his/her calls, the user can choose between:1. Review new calls2. Review old calls3. ExitNew calls are reviewed by starting with the most recent caller. Old calls are reviewed by starting with the first callthat was place on the list of old calls. When reviewing calls, the user may decide from the

following:1. Call back the caller2. Ignore the caller, that is, never call back3. Call back later. (Put phone number on a queue for later)Use the following data structures in your program: - Use a queue to hold the telephone numbers of the incomingnew calls. (New calls queue) - Transfer the telephone numbers from the new calls queue to a stack in order to setup for reviewing the calls. - Use another queue of size 5 to hold the numbers that the user wishes to wait to call(old calls queue). Note: This queue works just like the new calls queue, in that, if there are 5 numbers on thequeue, and a number needs to be added, the number that has been on the queue the longest is removed to makeroom for the new number.NOTEThis program should be menu driven. - Read the numbers from an input file to simulate incoming calls. - A phonenumber leaves the system if the user calls back or ignores the caller. - When the user reviews old calls, the numbersare taken from the old calls queue directly without using the stack. The stack is used when reviewing calls fromthe new calls queue.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Telephone systemconsider a telephone system that has an
Reference No:- TGS01136589

Now Priced at $20 (50% Discount)

Recommended (97%)

Rated (4.9/5)