Question: c++ queue and stack data structure please read the requirements carefully.. 1 - your program must pass those test cases. INCLUDE EVERYTHING HERE WITH YOUR

c++ queue and stack data structure

please read the requirements carefully..

1 - your program must pass those test cases. INCLUDE EVERYTHING HERE WITH YOUR MAIN.CPP and test them in linux server. http://www2.cs.uh.edu/~rizk/teaching/cosc2430/homeworks/2018fall/hw6/testcase/

the arugmentManager.h is optional. if you want to implement it or not, it's up to you.

c++ queue and stack data structure please read the requirements carefully.. 1

- your program must pass those test cases. INCLUDE EVERYTHING HERE WITH

YOUR MAIN.CPP and test them in linux server. http://www2.cs.uh.edu/~rizk/teaching/cosc2430/homeworks/2018fall/hw6/testcase/ the arugmentManager.h is

optional. if you want to implement it or not, it's up to

you. COSC2430 HW6: Class-Stack-Queue Problem 1. Introduction My friend SSS is the

owner of a bookstore. She buys and sells books. After buying, she

COSC2430 HW6: Class-Stack-Queue Problem 1. Introduction My friend SSS is the owner of a bookstore. She buys and sells books. After buying, she can store books either in the shelf maintaining the queue, or piling books one upon one using the stack. But the problem is, during selling the book, she needs to move books from the top of the stack, or from the front of the queue to get the specific book. Find out the cost, number of moves, that she needs for the stack, and for the queue to get the specific book. Note: It is required to implement the Stack and Queue by yourself. See the Implementation section to be clear how to implement it. 2. Input and Output The input and output file is a regular text file, where each line is terminated with a In' character. Input file format: - Each line is a combination of a command and a book name. Command and book name is separated by a single space. The command can be only either "buy" or "sal" If there is an empty line, you should ignore it. Output file format: Your program will generate output only for "sale" command. For a successful sale command, the output will be like, Book_name finding cost at stack: value, at queue: value For an unsuccessful sale command, the output will be like, Book_name not found You know, Stack follows LIFO, last in first out, order, and Queue follows FIFO, first in first out, order. You will add book into both stack and queue after buying. To COSC2430 HW6: Class-Stack-Queue Problem 1. Introduction My friend SSS is the owner of a bookstore. She buys and sells books. After buying, she can store books either in the shelf maintaining the queue, or piling books one upon one using the stack. But the problem is, during selling the book, she needs to move books from the top of the stack, or from the front of the queue to get the specific book. Find out the cost, number of moves, that she needs for the stack, and for the queue to get the specific book. Note: It is required to implement the Stack and Queue by yourself. See the Implementation section to be clear how to implement it. 2. Input and Output The input and output file is a regular text file, where each line is terminated with a In' character. Input file format: - Each line is a combination of a command and a book name. Command and book name is separated by a single space. The command can be only either "buy" or "sal" If there is an empty line, you should ignore it. Output file format: Your program will generate output only for "sale" command. For a successful sale command, the output will be like, Book_name finding cost at stack: value, at queue: value For an unsuccessful sale command, the output will be like, Book_name not found You know, Stack follows LIFO, last in first out, order, and Queue follows FIFO, first in first out, order. You will add book into both stack and queue after buying. To

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!