Question
A) Static Stack Create an array of student records (at least 15) and put all the related student records information in an array: Student ID(Axxxxxxxx),
A) Static Stack
Create an array of student records (at least 15) and put all the related student records information in an array: Student ID(Axxxxxxxx), Name, Address and average of test scores and a Pointer for Test Scores (at least 10 scores).
-Display the student records in the array (do not display pointers).
-Push all student records from the array to a static stack
-Pop 5 student records from the stack and display the popped records.
-Display the remaining student records in the static stack.
B) Dynamic Stack
Create a linked list of student records (at least 15) and put all the student records information in the linked list: Student ID, Student Names, Address and average of test scores and a pointer for test scores (at least 10 scores).
-Display the student records in the linked list and the average of scores (do not display pointers).
-Push all student records from the linked list to a dynamic stack.
-Pop 5 student records from the dynamic stack and display the popped records.
- Display the remaining student records in the dynamic stack.
(Loops are needed to handle both programs, Stack Class definition must be used, using template and container is optional.)
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