Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please answer these questions you can just put first name and age and i will edit it for my details c++ Question Write a struct

image text in transcribed
please answer these questions
you can just put first name and age and i will edit it for my details
c++
Question 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) doubly 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. 7. Write a function to print the linked list (from tail node) on the console. Implement the above functions as follows. Initially, the list must have five nodes that are the instances of the struct whose member variable age are: 18,21, 25, 27 and 33. Insert three nodes that are instances of the struct with age variable: 6) 17. (ii) 23 and (iii) 34. Print the list from head node (in ascending order). Remove three nodes that are instances of the struct with age variable 17, 25, and 34. Print the list from tail node (in descending order). Search the list to find whether an element that corresponds to the student with age 23. Insert a node that is an instance of struct with age variable 29. Print the number of elements in the list. Print the list from head (in ascending order) on the console. Question 2 15). Consider the struct Student as defined in Question 1. Two students are equal if their name, age and fee are equal. Overload == operator to test equality of students as defined above. Give an implementation with the following students i studentl: - John, 21, 2075.50 and student2: = John, 21, 2075.50 ii. studenti: = John, 21, 2075.50 and student2: = Paul, 23, 2050.75 Question 3 14). Overload * operator for entry-wise multiplication (Hadamard product) of two matrices of size 4 x 4. One bonus mark will be given for overloading * for usual multiplication of matrices of size 3 x 3

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_2

Step: 3

blur-text-image_3

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

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions

Question

Why should an individual manager be interested in supporting HR?

Answered: 1 week ago

Question

1. Identify outcomes (e.g., quality, accidents).

Answered: 1 week ago