Create a linked list data structure from scratch

Assignment Help C/C++ Programming
Reference no: EM131106480

Topics:

• C/C++ Syntax
• Pointers
• Functions
• Dynamic Allocation of Memory
• Data Structures: Linked Lists
• Object Orientation

Specifications:

You are to create a Linked List data structure from scratch. This linked list should be Templated so that any data could be stored within it.

You will create a Linked List Class and a Node Class

The Linked List should contain the following methods in its public interface:

• Constructor
• Destructor
• AddToFront(T data) - create a node containing T data and add it to the front of the list
• AddToEnd(T data) - create a node containing T data and add it to eh end of the list
• AddAtIndex(T data, int index) - create a node containing T data and add it to the list at index, return boolean for success or failure (optional: you could also return an integer with failure codes since this method can fail multiple ways)
• NextNode - Move the current pointer to the next node, wraps to front if it navigates past the end
• InsertAfterCurrent(T data) - Create a node containing T data and insert it after wherever the current pointer is pointing
• RemoveCurrent() - Delete the current item and return its contents
• RemoveAtIndex(int index) - delete the index # node in the list and return its contents
• RemoveFromFront() - Delete first item and return its contents
• RemoveFromEnd() - Delete last item and return its contents
• RemoveFirst(T data) - find first instance of T data and remove it
• RemoveAll(T data) - find each instance of T data and remove it
• ElementExists(T data) - Returns a T/F if element exists in list
• Find(T data) - Look for data in the list, return a pointer to its node
• IndexOf(T data) - returns an index of the item in the list (zero-based)
• RetrieveFront - returns the data contained in the first node, does not delete it
• RetrieveEnd - returns the data contained in the last node, does not delete it
• Retrieve(int index) - returns the data contained in node # index, does not delete it, returns null if index is out of bounds or data does not exist
• ToArray - Create an array from the contents of the list and return it
• Empty - Empty out the list, delete everything
• Length - How many elements are in the list

More methods private or public should be created as needed to facilitate the functionality of the Interface methods. If you feel your list needs more functionality, feel free to create it.

Node Class

• Constructor
• Destructor
• Getters & Setters

The node class should be fairly rudimentary. It should be templated so you can store anything in it.

C++ Template Types:

https://www.cplusplus.com/doc/oldtutorial/templates/

C++ Template Information:

https://en.cppreference.com/w/cpp/language/template_parameters

Reference no: EM131106480

Questions Cloud

Assuming that total dividends declared in 2011 : Assuming that total dividends declared in 2011 were $64,000, and that the preferred stock is not cumulative but is fully participating, common stockholders should receive 2011 dividends of what amount?
Explain which software model has more legal implications : Predict the long-term use of both open source and proprietary software models and explain which software model has more legal implications/issues than the other.
Formulate the square root modification of this algorithm : Table 15.2 presents a summary of the EKF algorithm for the supervised training of an RMLP. Using the square root filtering theory described in Chapter 14, formulate the square root modification of this algorithm.
To backlog some demand but estimates : A car dealer must pay $20,000 for each car purchased. The annual holding cost is estimated to be 25% of the dollar value of inventory. The dealer sells an average of 500 cars per year.
Create a linked list data structure from scratch : You are to create a Linked List data structure from scratch. This linked list should be Templated so that any data could be stored within it. You will create a Linked List Class and a Node Class
Briefly discuss the implications of the financial statement : Briefly discuss the implications of the financial statement presentation project for the reporting of stockholders’ equity.
One way that demographics-global presence : What is one way that demographics, global presence, or diversity might impact your companies choices about internet and social media use?
What amount of deferred gross profit should report : What amount of deferred gross profit should Blake report at December 31, 2011 - The note was payable in three annual installments of $250,000 beginning January 2, 2011. Blake appropriately accounted for the sale under the installment method.
Where can authoritative igaap guidance : Where can authoritative iGAAP guidance related to stockholders’ equity are found?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd