Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C++ Complete the following task: Task 1: Create an ordered linked list class 1. 2. Create a new project. You can name this whatever

Using C++ Complete the following task:

image text in transcribed

Task 1: Create an ordered linked list class 1. 2. Create a new project. You can name this whatever you like Design and implement an ordered linked list class. This class should be a template a. The class should have the following methods fully implemented i. Constructor ii. Addltem-adds an item from the list iii. Getltem - searches the list for the given item. If found, it removes it from the list and returns it. If not found, it returns a null pointer. iv. Islnlist returns a bool indicating if the given item is in the list v. IsEmpty- returns a bool indicating if the list is empty vi. Size returns an int indicating the number of items in the list vii. SeeNext returns the item without removing it from the list at a given location in the list. The class will maintain the next location and will start at the first item in the list. When it gets to the last item in the list, it will return a null pointer after it gets past the last item. If the list is empty, this will throw an error. 2 calls to SeeNext will return the 2 items next to each other in the list unless SeeAt or Reset is called in between the 2 calls (or the first call returns the last item in the list) SeeAt- Finds an item at a location in the list (int passed in from user), and returns the item without removing it. If the location passed by the user is past the end of the list, this will throw an error. This will set the location used by SeeNext to point at the item after the item returned viii. ix. Reset - resets the location that the SeeNext function uses to point at the first item in the list. x. Destructor b. All items passed to or from the class should be done so via a pointer rather than by value. Make sure you don't have any memory leaks c

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

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions

Question

1. Where will you recommend that she hold the focus group?

Answered: 1 week ago

Question

3. What might you have done differently

Answered: 1 week ago