Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Create an Element class that contains the data and pointers for a single-link forward link list for this application. Your linked list must consist

C++

Create an Element class that contains the data and pointers for a single-link forward link list for this application. Your linked list must consist of objects of this class. The class should contain at least the following elements (you may have more if you wish):

  • The standard four constructors (default, parameterized, copy, move)
  • The standard assignment operators (copy, move)
  • A destructor
  • Stream operators (<< and >>)
  • The standard seven relational operators
  • Accessor for all instance variables
  • Mutators for all instance variables

The instance variables must be pointers, and they must be private.

Create a List class that implements the List ADT for objects of the Element class in a single-linked forward linked list. The List class must contain at least the following elements (you may have more if you wish):

  • The standard four constructors (default, parameterized, copy, move)
  • The standard assignment operators (copy, move)
  • A destructor
  • Stream operators (<< and >>)
  • The standard seven relational operators
  • Accessor for all instance variables
  • Mutators for all instance variables
  • Insert a new element into the list by position. This method can be used for general insertion, as well as push and append operations.
  • Remove an element by position. This method can be used for general removal, as well as pop and trim operations.

The instance variables must be pointers, and they must be private.

create main.h and main.cpp with linux system source code files that contains the C++ source code for a program that

  1. Accepts an input file name from the user
  2. If the input file can not be opened, display an appropriate message and end the program.
  3. Create a list of the words that appear in the file, along with the number of times each word appears. Each list element must be an object of the Element class, and the list must be an object of the List class. All list operations must be done using the standard class operators, accessors, mutators, and constructors. Your list should not have any duplicate words. There is no need to display the list in any particular order (no need to sort the list).

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

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions

Question

=+ Between positive punishment and negative punishment?

Answered: 1 week ago

Question

Describe the new structures for the HRM function. page 676

Answered: 1 week ago