Question: implement the ListLinked ADT (the declaration is given in ListLinked.h)(60 points) - implement the following operations: - constructor, assignment operator, destructor - insert, remove, replace,

implement the ListLinked ADT (the declaration is given in ListLinked.h)(60 points)

- implement the following operations:

- constructor, assignment operator, destructor

- insert, remove, replace, clear

- isFull, isEmpty

- gotoBeginning, gotoEnd, gotoNext, gotoPrior, getCursor

implement the function moveToBeginning() that removes the data item marked by the cursor and reinserts it at the beginning of the list

- implement the function insertBefore(..) that will insert the new data item before the cursor or if the list is empty as the first element of the list

#include "ListLinked.h"

// ListNode member functions

template List::ListNode::ListNode(const DataType& nodeData, ListNode* nextPtr) { this->dataItem = nodeData; this->next = nextPtr; }

// List member functions

template List::List(int ignored = 0) { }

template List::List(const List& other) { }

template List& List::operator=(const List& other) { }

template List::~List() { }

template void List::insert(const DataType& newDataItem) throw (logic_error) { }

template void List::remove() throw (logic_error) { }

template void List::replace(const DataType& newDataItem) throw (logic_error) { }

template void List::clear() { }

template bool List::isEmpty() const { return false; }

template bool List::isFull() const { return false; }

template void List::gotoBeginning() throw (logic_error) { }

template void List::gotoEnd() throw (logic_error) { }

template bool List::gotoNext() throw (logic_error) { return false; }

template bool List::gotoPrior() throw (logic_error) { return false; }

template DataType List::getCursor() const throw (logic_error) { DataType t; return t; }

template void List::moveToBeginning () throw (logic_error) { }

template void List::insertBefore(const DataType& newDataItem) throw (logic_error) { }

#include "show5.cpp"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!