Question
Write a doubly linked list class that will store values. The class should have the following: Constructor Destructor Insert function Remove function Accessor function Mutator
Write a doubly linked list class that will store
Constructor
Destructor
Insert function
Remove function
Accessor function
Mutator function
Use this class in a program that will give a menu similar to below:
- Add Value
- Delete Value
- Display List (forward)
- Display List (backward)
- Quit
The user should be able to use the menu to populate your list, remove elements and display the results.
add the following:
1. An operator overload for the [] operator that will allow the programmer to access a nodes value by 0 based index.
For example:
DoublyLinkedList l
...
cout << l[0] << endl;
2. An operator overload for the + operator that will add a value to the end of the linked list
Use this class to create a program that will determine if a number is prime or not. If the number is not prime, it should display the prime factorization of the number. For example:
Input Number: 840
Prime Factorization:
2 * 2 * 2 * 3 * 5 * 7
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started