Write c++ code Create a BST where each node stores the rollNumber and marks of a student. Your task is to provide the implementation of following methods. constructor insertRecord() function updateRecord() function countOfPassedStudents() showData() function inside main() function, create an object of BST class. Insert the following data and create the BST according to the marks. ● 19L-1941, 71 should be the root node

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Write c++ code

Create a BST where each node stores the rollNumber and marks of a student. Your task is to
provide the implementation of following methods.
constructor
insertRecord() function
updateRecord() function
countOfPassedStudents()
showData() function
inside main() function, create an object of BST class.
Insert the following data and create the BST according to the marks.
● 19L-1941, 71 should be the root node
● 19L-1942, 62
● 19L-1943, 67
● 19L-1944, 54
● 19L-1945, 58
● 19L-1946, 45
● 19L-1947, 29
● 19L-1948, 76
● 19L-1949, 81
● 19L-1950, 92
Update the data of following record
● Marks of 19L-1944 are 54. Update the marks to 47
● Marks of 19L-1949 are 81. Update the marks to 85
Call the countOfPassedStudents(). You can either display the count in the same function or
return the value to main function.
Call the showData() function to display all the records of BST in preorder traversal.
Note: It is not mandatory to create a template class

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY