Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions