Create a program with these three files: StrQueue.h StrQueue.cpp Source.cpp // StrQueue.h Write a class specification for a class named: StrQueue A StrQueue class object functions as a FIFO queue data structure. - The StrQueue class object has a pointer, strptr, that can be used to dynamically create an array on the heap. Include these class functions: O isEmpty o isFull O enque o deque o makeEmpty - Sets queue to an empty state o Constructor o Destructor Determines whether the queue is currently empty. Determines whether the queue is currently full. Adds a new Item to the back of the queue. Removes an item from the front of the queue. // StrQueue.cpp - Include the class function definitions in this file. II Source.cpp In main(), declare a pointer named: strPtr Using the pointer, create an array on the heap. o Size = 5 o string data type Prompt the user to enter the names of five cities. With each iteration in a while loop or for loop, read in one city and then enque it into the queue. Use all seven functions in your program. (See output on next page)
Create a program with these three files: StrQueue.h StrQueue.cpp Source.cpp // StrQueue.h Write a class specification for a class named: StrQueue A StrQueue class object functions as a FIFO queue data structure. - The StrQueue class object has a pointer, strptr, that can be used to dynamically create an array on the heap. Include these class functions: O isEmpty o isFull O enque o deque o makeEmpty - Sets queue to an empty state o Constructor o Destructor Determines whether the queue is currently empty. Determines whether the queue is currently full. Adds a new Item to the back of the queue. Removes an item from the front of the queue. // StrQueue.cpp - Include the class function definitions in this file. II Source.cpp In main(), declare a pointer named: strPtr Using the pointer, create an array on the heap. o Size = 5 o string data type Prompt the user to enter the names of five cities. With each iteration in a while loop or for loop, read in one city and then enque it into the queue. Use all seven functions in your program. (See output on next page)
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
Related questions
Question
C++

Transcribed Image Text:Create a program with these three files: StrQueue.h
// StrQueue.h
Write a class specification for a class named: StrQueue
A StrQueue class object functions as a FIFO queue data structure.
The StrQueue class object has a pointer, strPtr, that can be used to dynamically create
an array on the heap.
Include these class functions:
o isEmpty - Determines whether the queue is currently empty.
isFull
Determines whether the queue is currently full.
Adds a new Item to the back of the queue.
Removes an item from the front of the queue.
O
StrQueue.cpp Source.cpp
o
enque
o deque
o makeEmpty - Sets queue to an empty state
Constructor
Destructor
// StrQueue.cpp - Include the class function definitions in this file.
II Source.cpp
In main(), declare a pointer named: strPtr
Using the pointer, create an array on the heap.
o Size = 5
o string data type
Prompt the user to enter the names of five cities.
With each iteration in a while loop or for loop, read in one city and then enque it into the queue.
Use all seven functions in your program.
(See output on next page)

Transcribed Image Text:/* OUTPUT:
Enter the names of 5 cities.
Enter a city: Los Angeles
Enter a city:
Paris
Enter a city:
New York
Enter a city:
Stockholm
Enter a city: Vienna
The queue is full.
Now dequeing...
Here are the cities:
Los Angeles
Paris
New York
Stockholm
Vienna
The queue is empty.
*/
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 6 images

Knowledge Booster
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.Recommended textbooks for you

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education