Using the following UML diagram and class description, write a class named MyDLL which implements a pointer-based doubly linked list.

Class Attributes:

Node – a nested struct

i – stores an integer
next – the pointer that holds the memory address of the following node.
prev – the pointer that holds the memory address of the preceding node.

head – the pointer that holds the memory address of the head node (the first node in the list).
tail – the pointer that holds the memory address of the tail node (the last node in the list).

constructor – initializes head and tail to null.
destructor – frees all memory used by the list.
append – if there is enough memory, stores it’s argument in a new node and attaches that new node to the end of the list.
remove – searches for it’s argument in the list. Removes the first node it finds that contains a value matching it’s argument.
find – searches for it’s argument in the list. Returns true if it’s found, false otherwise.
clear – frees all memory used by the list. Ensures head and tail are set back to null.
print – prints the values stored in the list in order.
reverse – prints the values stored in the list in reverse order.

Notes:

The class does not interact with the user in any way, so no cin or cout statements.
All accessors should be marked const.
struct Node is nested in the class and is private.
Since the insert and append algorithms are incompatible, only implement the append algorithm.

Hints:

Save yourself some work by having the destructor call clear.
There is no isFull or isEmpty method in the class.

Submission Details:

Place your class in it’s own header file named MyDLL.h.
Submit only this file.
Be sure to include preprocess guards( #ifndef, #define, #endif).

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount! Use Discount Code “Newclient” for a 15% Discount!NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

The post c-programming-5-1 appeared first on Essay Fount.


What Students Are Saying About Us

.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐
"Honestly, I was afraid to send my paper to you, but you proved you are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"

.......... Customer ID: 11***| Rating: ⭐⭐⭐⭐⭐
"This company is the best there is. They saved me so many times, I cannot even keep count. Now I recommend it to all my friends, and none of them have complained about it. The writers here are excellent."


"Order a custom Paper on Similar Assignment at essayfount.com! No Plagiarism! Enjoy 20% Discount!"