Question: CS - 3 0 3 Assignment 2 ( 2 5 points ) Q 1 . ( 1 5 points ) Build a Single Linked List
CS Assignment
points
Q points Build a Single Linked List class. Your class should have the data members:
head, tail, and numitems. Write the following member functions, which perform the same
operations as the corresponding functions in the standard list class:
pushfront,
pushback,
popfront,
popback,
front, back,
empty,
void insertsizet index, const ItemType& item: Insert item at position index
starting at Insert at the end if index is beyond the end of the list
bool removesizet index: Remove the item at position index. Return true if
successful; return false if index is beyond the end of the list.
sizet findconst ItemType& item: Return the position of the first occurrence of
item if it is found. Return the size of the list if it is not found.
Q points Write a C program to implement a stack of integers using a vector with
push and pop operations.
Perform the following operations:
Create a stack object.
Check the stack is empty or not.
Insert some integer values onto the stack.
Remove an element from the stack.
Find the Top of the stack.
Find average value of the stack elements.
Submission guidelines:
You should have a header file and cpp file. The header file should provide the function
declaration and cpp file should have implementation details.
All the functionality of the program should be implemented as functions and methods.
The code should be well commented
Create a report readme file that contains instruction on how to run the code and
screen shots of the outputs
Upload your report and code files to GitHub.
Submit the GitHub link on Canvas by due date.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
