Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

***I only want the correct code, not an explanation of how to write the code In this assignment, you will write a C++ code to

image text in transcribedimage text in transcribed

***I only want the correct code, not an explanation of how to write the code

In this assignment, you will write a C++ code to do the following: Write a program to process data for Computer Engineering Students. The data should be loaded from a text file containing the following information for each student: Student ID, Student Name, Surname, and Grade in the Data Structure course. As the following: Your Node definition should be as follow: struct node \{ int ID; char* Name; char* Surname; int Grade; node* left; \}; Student Grades.txt - Notepad File Edit Format View Help 12256564 Ahlam Saleem 88 12258947 Ali Nabeel 75 12263632 Rami Masri 91 12254543 Nadia Sameer 71 node* right; Your program initially reads the file and creates a (Binary Search Tree) BST in which each node maintains a record of the file. The BST is arranged in terms of Student ID. As the following: - You should implement void buildTreeFromFile (char* filename) - You should implement an insert function based on ID. void insert(node* root, int ID, const char* Name, const char* Surname, int Grade) If the ID already exists in the tree, you should update the value - You should implement a search function. This function search for an ID in the binary search tree and return the associated value. node* search (node* root, int ID) - You should implement a delete function. This function delete a student from the BST depending on ID. void delete (node* root, int ID) - You should implement a function to print BST in-order. void printInorder (node* root) - You should implement a function to count the number of the students that grades lie within the range [80-90]. - You should implement a function to print the data of the students that have the top 5 grades. Note: Feel free to add other functions you may need

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

Explain budgetary Control

Answered: 1 week ago

Question

Solve the integral:

Answered: 1 week ago

Question

What is meant by Non-programmed decision?

Answered: 1 week ago

Question

What are the different techniques used in decision making?

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago