Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to create a program in C++ that can perform 7 functions with linked lists. Please show both the function headings and the function

I need to create a program in C++ that can perform 7 functions with linked lists. Please show both the function headings and the function definitions in seperate cpp and .h files. Show function definitions for both singly linked lists, and doubly linked lists. For example, singly linked list function headings would be in a singlyLL.h and the function definitions would be in a singlyLL.cpp

functions need to be

1. create a node

2. insert a node to the head.

3. insert a node to the tail.

4. remove a node from the head.

5. remove a node from the tail.

6. print the list

7. show statistics ( outputs the total sum of the data fields of the linked list, largest value, smallest value, and average)

if a node has already been created, there will be an error statement that you cannot create another initial node. also these funtions need to be implemented for doubly linked lists in another doublyLL.h and doublyLL.cpp file. The doubly linked list files need to also have a function that will print the contents of the list in reverse order. when creating the information for the .h files use a node class. Thanks

Please show the functions being called in an sample main program. Thanks!! I will upvote detailed response.

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 In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

Does it have correct contact information?

Answered: 1 week ago