Question
Hello, please compile source code in C++ for the program below. I ask that you include comments so that someone without a technical background can
Hello, please compile source code in C++ for the program below. I ask that you include comments so that someone without a technical background can understand what is going on. Last, please show which portion of your program is a .h or .cpp file and show the program compiles and runs without error. Thanks and please see below.
PROGRAM AS FOLLOWS:
Design your own linked list class that works as a template class. It should provide member functions for appending, inserting and deleting nodes. The destructor should destroy the list. The class should also provide a member function that will display the contents of the list to the screen. The class should also provide a member function to search the list for an element in the list. The search should return the index (location) of the item in the list. So if it is the first element in the list then it should return 0. If the item is not in the list, it should return -1. Have main create two instances of the linked list with different data types and show that all of the functions work correctly.
Then, design a program using the linked list you just created. First you will create a class that holds information about the weather for a given month which should be called WeatherStats. It should have data members that are doubles to hold the amount of rain for the month and the amount of snow for the month. It will also have a data member that holds the number of sunny days during the month. It should provide accessors and mutators for the private data members. Main will create an instance of the linked list with a data type of the WeatherStats (LinkedList
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