1. Write a program which implements an unbounded sorted list (using the single or double- linked list) as a template structure (aimed at storing values of any type and ordering them in descending order - from the greatest to the lowest), and a set of methods operating on this structure:
• the default constructor,
• the destructor (with memory deallocation),
• the copy-constructor (with memory allocation),
• the assignment operator= (with memory dellocation and allocation),
• the comparison operator==,
• push – adding a value to the list in descending order (with memory allocation),
• pop – removig the greatest value from the list or throwing an empty list exception (with memory deallocation),
• top – returning the greatest value or throwing an empty list exception,
• count – returning the number of occurences of a value,
• empty – informing whether the list is empty,
• size – returning the number of items in the list,
• clear – removing all the items from the list (with memory deallocation).
The program should use all these methods to make the operations as follows:
1) create an ordered list of integers containing the numbers given by the user, 2) print the greatest number,
3) remove the greatest value from the list, 4) print the greatest number,
5) print the number of values in the list if it is nonempty, or an appropriate message otherwise,
6) clear the list.
Compare your implementation of the container with the built-in container priority_queue delivered in the <queue> library.
2. Extend the Student structure from the 2nd task of lab 1 with the comparison operator ( operator< ) comparing students by their average grade. Implement a ranking of students for the competition for scholarships. Use the sorted list implemented in task 1. Allow the user to add many student to the list and then print them ordered (using top and pop methods of the list).