Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ PROGRAMMING: Implement a linked list class to hold a series of names (strings). The class should have member functions for appending, deleting, and inserting

C++ PROGRAMMING:

Implement a linked list class to hold a series of names (strings). The class should have member functions for appending, deleting, and inserting nodes. Your task is to complete the program below, fix any errors along the way (there are some syntax errors already), verify that it prints what you expect to print. Submit your '.cpp' file and screenshots of output.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

#include using namespace std; class MyOwnLinkedList { private: // Declare structure with name OneNode struct OneNode { // your variables (ToDo) }; // Define your head pointer (ToDo) public: // Constructor(ToDo) // Destructor (ToDo) // Methods to be implemented (ToDo) // append at the end (ignoring the alphabetical order) void appendNode(string); // this will insert assuming that alphabetical order is to be maintained void insertNode(string); // should print valid message if name does not exist void deleteNode(string); // print all names void displayWholeList() const; } int main () { MyOwnLinkedList l; l.appendNode("B"); l.appendNode("C T"); l.appendNode("D D"); l.insertNode("A"); l.insertNode("A A"); l.deleteNode("X"); l.deleteNode("A"); l.displayWholeList(); return 0; } 

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

Database Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions

Question

=+b) Are the assumptions and conditions met?

Answered: 1 week ago

Question

Compare and contrast cultural preferences for online privacy

Answered: 1 week ago

Question

Provide examples of the various microcultures in the United States

Answered: 1 week ago