Question: C++ ONLY PLEASE. CAN I GET SOME HELP WRITING THIS HEADER FILE? I MAINLY WANT TO KNOW HOW I WOULD WRITE IT WITH A TEMPLATE.

C++ ONLY PLEASE. CAN I GET SOME HELP WRITING THIS HEADER FILE? I MAINLY WANT TO KNOW HOW I WOULD WRITE IT WITH A TEMPLATE. PLEASE AND THANKS IN ADVANCE.

**************LinkedList.h requirements************************

linked list Class

EXTRA CREDIT OPPORTUNITY:

Create the LinkedList class as a template class for 5 extra credit points!!!

private memebers

  • Create a structure called ListNode, which should hold a Dinosaur and a pointer to the next ListNode
  • ListNode pointer called head will eventually point to the first node in the linked list
  • ListNode pointer called tail will eventually point to the last node in the linked list
  • Integer called numNodes will hold the number of nodes in the linked list

public members

  • Constructor initialize head, tail, & numNodes
  • Destructor delete all nodes in the list
  • getLength accessor
  • getNodeValue accessor should return a Dinosaur
  • appendNode appends a node containing the value passed into nodeValue, to the end of the list
  • insertNode this function is passed a node value (Dinosaur) and a position where the node should be inserted. The first node is position 0.
  • deleteNode finds the node with the argument position & deletes it

#####################SAMPLE OUTPUT######################

There is no sample output this is only a header file. this is going to belng to a much bigger assignement and i have the header mostly written but i would like the extra 5 points for doing it with a template please. Thanks again in advance :)

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!