Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For C++> Design and implement you own templated linked list class. The class should have the following methods: append : adds a new element to

For C++>

Design and implement you own templated linked list class. The class should have the following methods:

append : adds a new element to the end of the list

insert: adds a new element at a position in the list. The position is an integer value (not an iterator).

delete: deletes a node at a given position. The position is an integer value.

constructor & copy constructor

destructor: must delete all of the nodes

Your linked list can be either a singly-linked list or doubly-linked list. There is a singly-linked list shown in your book and we discussed a doubly-linked list in class. Notice that this linked list class uses a positional value for inserts and deletes. This is different than the implementation in your book.

You will also need to build a driver program that demonstrates the use of all of these methods. You can use any data type as the parameter to your data type.

NOTE: You can force a destructor call by building a function that creates a list object as a local variable. When the function is called and finishes, the destructor for that local list object will be called.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial Databases 2nd Symposium Ssd 91 Zurich Switzerland August 1991 Proceedings Lncs 525

Authors: Oliver Gunther ,Hans-Jorg Schek

1st Edition

3540544143, 978-3540544142

More Books

Students also viewed these Databases questions

Question

Are there any questions that you want to ask?

Answered: 1 week ago