Question: QUESTION 2 Description: In your coding assignments you had to create a stack (twice). A stack is a LIFO queue (last in, first out).


QUESTION 2 Description: In your coding assignments you had to create a

QUESTION 2 Description: In your coding assignments you had to create a stack (twice). A stack is a LIFO queue (last in, first out). Now create a FIFO "stack" (first in, first out) conforming to all the definitions of a stack except "pop" will pull data from the "bottom," not the "top." In other words, push will still push to the "top" but pull will pull from the "bottom." Similarly, peek will return the value on the "bottom." Specifications: Make a complete and properly architected, loosely-coupled "FIFO" class as discussed in lecture and notes, and conforming to all best practices. Use a linked list approach to implement the queue, using the same "node" and "data" struct from your coding assignments. You can use a singly or doubly linked list. You are free to use a tail pointer in addition to the head pointer, your choice. Make all the following methods for your FIFO class (it's up to you to figure out the parameters and return values): o push() o pull() O O peek() isEmpty() Make a main.cpp/main.h to test your queue. Make all appropriate, complete, and exhaustive tests to prove your object works. Turn in only 4 files, main.cpp, main.h, queue.cpp, queue.h. Everything your program needs MUST be in those four files and ONLY those four files with those exact filenames. Hint: Although you may not have more than one class per set of h/cpp file, you may include supporting structs in your class header file. Your code will be graded no different than any normal homework submission and must conform to all class submission guidelines. Your code MUST compile with ONLY the files you submit, nothing more, nothing less. If your code does not compile at the command line with the standard compile command given in class there will be a significant grade penalty, up to and including a grade of 0. You will be graded based on all best practice guidelines presented in class. Hint: This is very simple to implement, do not over complicate it. "push" will always add to the tail. "pull" will always pull from the head. Submission: When you are ready to submit, place your 4 files in a single zip file, attach it to this question and upload it. Your zip file must contain ONLY those 4 files, no other files, no project or IDE files, no Mac OS files, and no directories including no top level directory). Inclusion of any other files/directories will incur an automatic 5% penalty. Mac people, you cannot use the built in zip utility because it will add extra files you cannot see, but Linux can (you are graded on Linux). Use the command line or a 3rd party zip utility to zip. Double check your zip files before submitting! 50 po

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

mainh ifndef FIFOMAINH define FIFOMAINH define LOWERBOUND 1 define TESTVALUE 1000 define MULTIPLIER 20 define TESTVALUE3 VALIDSTACKSIZE 1000 include cout endl include functionsh include fifoh using st... View full answer

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 Programming Questions!