solve c++

• Class Node:
• next, a private member that points to the next node in the list.
• back, a private member that points to the previous node in the list.
• info, a private member of type char.
• getInfo(), public member to return the value of info.
• setInfo(),public member to set the value of info.
• Class DLinkedList:
• first, a private pointer of type Node. It points to the first node in the list
• Last, a private pointer of type Node. It points to the last node in the list
• (0.5 pt)DLinkedList, the constructor initializes all private members.
• (0.5 pt)~DLinkedList (), the destructor destroys the linked list and de-allocates memory.
• (0.5 pt)isEmpty: returns true if the list is empty.
• (0.25pt)isFull: returns true if the list is full, it will return false always.
• (0.25pt)getSize(), returns the size of the list.
• (1 pt)printForward(), print the nodes from beginning to end.
• (1 pt)printBackward(), print the nodes from end to beginning.
• (1 pt)insertFirst(char), inserts a new node at the beginning of the list.
• (1 pt)insertLast(char), inserts a new node at the end of the list.
• (1 pt)deleteAt(int), delete from a specific location, start counting from 0, if location >= length or location <0, then don’t delete and show an error message.



TEST CODE
#include <iostream>
#include "linkedList.h"
using namespace std;
int main()
{ /*
1. Create a list.
2. call the following functions in the order you read them order.
isEmpty()
isFull() UMEHCM
insertFirst(A), insertEnd(H),
deleteAt(0), insertFirst(E),
insertFirst(Y), getsize(),
insertEnd(C), insertFirst(M),
insertFirst(U), insertEnd(F),
insertEnd(M), deleteAt(2),
getSize(), deleteAt(5),
deleteAt(20)
printForward
printbackward

*/}
Last edited on
No one is going to solve it for you.
What have you got so far ?
Are you stuck at a specific point ?
closed account (o1vk4iN6)
I didn't know C++ was a problem, what have I been doing all this time D:

Well this obviously seems like an assignment and you haven't done anything at all, we aren't going to do it for you. Also use code tags (press the <> button found to the right of the textbox where you are writing).
Last edited on
Topic archived. No new replies allowed.