(30 MARKS)
Assume that you are tasked to develop a class attendance based system for Richfield.
Your job is to keep track of the cumulative frequency of students per qualification from
the beginning of the semester until the end of the semester. The system must take
into consideration both the number of dropouts and the number of students admitted
mid-semester.
Using a linked list data structure, you need to design and implement a stack-based
solution to this problem. The stack should have the following methods:
• push: Add a new item to the top of the stack
• pop: Remove the item from the top of the stack
• peek: Return the value of the item at the top of the stack without removing it
.isEmpty: Return a boolean indicating whether the stack is empty
• size: Return the number of items in the stack.
Note: In this solution, the stack must not use any libraries or pre-existing data
structures. You must implement the linked list from scratch.
(30)
Fig: 1