Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve Question 1 Need solution to be accurate and clear ASAP Question 1 [10]. Write a struct Student that has member variables: (string) first name,

image text in transcribed
Solve Question 1
Need solution to be accurate and clear
ASAP
Question 1 [10]. Write a struct Student that has member variables: (string) first name, (int) age and (double) fee. Write the functions as described in the class for the following purposes. 1. Write a function to create a dynamic sorted (in ascending order according to the age) circular linked list, where the data component of each node is an instance of the struct Student 2. Write a function to insert the instances in the linked list. You also need to write a function to find the spot for insertion of the nodes. 3. Write a function to remove the node from the linked list. 4. Write a function to count the elements of the linked list. 5. Write a function to determine check whether an element belongs to the linked list. 6. Write a function to print the linked list (from head node) on the console. Implement the above functions as follows. Initially, the list must have two nodes that are the instances of the struct: (studenti, 20, 20.75) and (student2, 25, 85.55) (get these values from the user). Insert two nodes that are instances of the struct: (student3, 23, 73.53) and (student4, 19, 45.37) (hardcode these values). Print the list (in ascending order). Remove one node (student1, 20, 20.75) (hardcode; hardcode this node for removal only, not for inserting). Print the list again. Search the list to find whether the list has an element (student2, 25, 85.55). Print the number of elements in the list. Question 2 [10]. Do the Question 1 above with following changes. In this question list must be in ascending order with respect to name. Also, replace the name of the students studenti, student2. student3 and student4 with Paul, John, Patel and Kaur, respectively

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions