Objective
The objective of this Lab is to explore creating and using an ordered linked list.
Task
1. Create an ordered double-linked list class.
See Prev – Same as SeeNext except in the other direction.
See At – 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.
Reset – resets the location that the SeeNext function uses to point at the first item in the list.
Destructor – make sure you remove all items to avoid memory leaks
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.
2. Create a class to be used as the item stored in the list. This class will be a part. It should have the following members at a minimum.
1. Private
2. Public
3. Create a test program that has a menu allowing you to test each of the functions in your linked last class (Task 1).
4. Create a visualization of your list using ASCII art.
Modify your linked list class to add a new public method to display the list.
This method should write directly to the screen.
This method should walk through the list and display every item in the list on the screen. The format of the output is up to you.
To display the contents of the item in the list, it should call the display member of the item (created in step 1 of this task).
This method should reuse members of the class as much as possible.
This method should not change the results of SeeNext method meaning it should not have a different value for the internal variable used by SeeNext after this method completes.
Modify your test program from task 3 to include an option that calls this new method.
Test your modifications. Include in your lab report a screen shot showing the results of this new method with at least 4 items in your list.
SHN6023 : Mental Health, Resilience and Recovery Across the Life-course – Case Study Assignment
Read MoreBUS6009 : International Business Management – Written Case Report
Read MoreBUS6018 : PROJECT MANAGEMENT – PROJECT PLAN
Read MoreHCM4003 : Communication and Interprofessional Collaboration – Podcast
Read MoreQHO335 : Business Project – Critical evaluation of an organisation’s response during the cost-of-living crisis in the UK
Read MorePRM7006 : Management of Traditional Projects – PID Assignment
Read MoreBMA5108-20H : International Business – Strategic Evaluation
Read MoreCA5055 : Airline Revenue and Pricing Management – REPORT
Read MoreCA5056 Aviation Psychology and Human Factors Assignment brief
Read MoreHow can i assist with youGBEN5006 : Intrapreneurial Development – Portfolio
Read More