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 values. The class should have the following:

Constructor

Destructor

Insert function

Remove function

Accessor function

Mutator function

Use this class in a program that will give a menu similar to below:

  1. Add Value
  2. Delete Value
  3. Display List (forward)
  4. Display List (backward)
  5. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!