Question
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
- Accepts an input file name from the user
- If the input file can not be opened, display an appropriate message and end the program.
- 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
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