Pérform the following using your programming skills. 1. Specify the variable size of MAX up to 50. Then the queue array is to be declared to be of size MAX. 2. Declare 3 functions, functions such as insert, view, and remove. It will use a main menu-driven feature. 3. To perform the operation, the user is to be asked to enter his option and call the appropriate function. 4. The front is at the front of the line and the back is at the back of the queue. There will be 2 pointers. From the back of the queue, you will have to add elements and delete them from the front of the queue. 5. In the insertion segment, specify the item to be inserted first. The item will be entered by the user. 6. Check the queue if it is full, if yes send the message of overflow, or else check if the queue is empty. The rear will then be increased by one and the new item is added to the rear at the position. 7. In the delete portion, check if the queue is empty. If yes, you will print underflow error. Otherwise, the first element is to be printed, which would be the element that will be omitted, and the front is to be incremented.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please use C++

Activity no. 25
Description:
This activity is to implement a menu-driven Queue.
Required Materials:
1. Computer set or Laptop
2. Software Development Tool
3. Diagramming Tool
Required Time:
Procedure:
Perform the following using your programming skills.
1. Specify the variable size of MAX up to 50. Then the
queue array is to be declared to be of size MAX.
2. Declare 3 functions, functions such as insert, view,
and remove. It will use a main menu-driven feature.
3. To perform the operation, the user is to be asked to
enter his option and call the appropriate function.
4. The front is at the front of the line and the back is at
the back of the queue. There will be 2 pointers. From
the back of the queue, you will have to add
elements and delete them from the front of the
queue.
5. In the insertion segment, specify the item to be
inserted first. The item will be entered by the user.
6. Check the queue if it is full, if yes send the message
of overflow, or else check if the queue is empty. The
rear will then be increased by one and the new item
is added to the rear at the position.
7. In the delete portion, check if the queue is empty. If
yes, you will print underflow error. Otherwise, the first
element is to be printed, which would be the
element that will be omitted, and the front is to be
incremented.
Required Output:
1. Source Code
2. Program Output
3. Draw the flow of data you created.
Transcribed Image Text:Activity no. 25 Description: This activity is to implement a menu-driven Queue. Required Materials: 1. Computer set or Laptop 2. Software Development Tool 3. Diagramming Tool Required Time: Procedure: Perform the following using your programming skills. 1. Specify the variable size of MAX up to 50. Then the queue array is to be declared to be of size MAX. 2. Declare 3 functions, functions such as insert, view, and remove. It will use a main menu-driven feature. 3. To perform the operation, the user is to be asked to enter his option and call the appropriate function. 4. The front is at the front of the line and the back is at the back of the queue. There will be 2 pointers. From the back of the queue, you will have to add elements and delete them from the front of the queue. 5. In the insertion segment, specify the item to be inserted first. The item will be entered by the user. 6. Check the queue if it is full, if yes send the message of overflow, or else check if the queue is empty. The rear will then be increased by one and the new item is added to the rear at the position. 7. In the delete portion, check if the queue is empty. If yes, you will print underflow error. Otherwise, the first element is to be printed, which would be the element that will be omitted, and the front is to be incremented. Required Output: 1. Source Code 2. Program Output 3. Draw the flow of data you created.
Expert Solution
steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education