Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Attached is my program, which i have used Stack ADT. I need to make a new program and implement a link-based Queue ADT instead of Stack. Just use...

Attached is my program, which i have used Stack ADT. I need to make a new program and implement a link-based Queue ADT instead of Stack. Just use most of the code below. To complete this, i will need the following:

1. 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. For the head-pointing node, please implement both front and rear pointers, even if you may not need to use them.

3. A Singly Linked List ADT which will 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 Queue ADT based on your singly linked list which will implement the most common Queue operations like enqueue, dequeue, front, rear, empty etc.

5. Ensure that your Node, List and Queue 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 Queue ADT with different types of data - numbers, strings and your currency objects.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question