1. Engineering
  2. Computer Science
  3. please follow these instructions carefully and program in c language...

Question: please follow these instructions carefully and program in c language...

Question details

Please follow these instructions carefully and program in C++ Language 1. You need to implement a link-based Stack ADT. To complete this, you will need the following: A Node ADT which will have two attributes - a data attribute and a pointer attribute. Remember the Node has to be an ADT, so that it can hold any kind of data 2. You can choose to use this node as both a data and a head-pointing node or as a simple data node in which case you will need a new head pointing node 3. A Singly Linked List ADT whchill be composed of one or more of your nodes. Implement the most common linked-list behaviors as explained in claSS - new list, add anywhere, delete anywhere, find anywhere, count of items in the list, empty the list, etc. 4. Finally, implement a Stack ADT derived from your singly linked list which will implement the most common Stack operations like push, pop, isempty etc. and only expose them, i.e. a Stack object should not allow Linkedlist behaviors to be executed on it. 5. Ensure that your Node, List and Stack ADTs are mimimal and cohesive with adequate walls around them. Define interfaces as needed, so you can reuse them in all your subsequent assignments 6. Then write a main that will demonstrate the capabilities of you Stack ADT with different types of data - numbers, strings and your Dollar currency objects from Lab 1. Make sure that your currency files are not edited to fit the needs of this lab - I have the previous ones to compare Remember the template class code cannot be split into .h and cpp files-you need to define them in one file and you can give it the .h extension. Create separate code files for Node, List and Stack ADTs 7. Including Node template definition Linked List template definition with commonly accepted behaviors of List ADTs Stack template inheriting from Linked List such that only stack behaviors are exposed for use in the main Adequate demonstration of Stack ADT use in main

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution