Question: Write a C++ program that uses binary search trees to maintain a database containing data, such as name and birthday about your friends and relatives.

Write a C++ program that uses binary search trees to maintain a database containing data, such as name and birthday about your friends and relatives. You should be able to: Enter one entry Remove one entry Modify one entry Search for one entry List everyone in the database that satisfy a given criteria. For example, list people born in a given month. Save information to a file. Retrieve information from a file.

can somebody complete the following program.

#include

#include

using namespace std;

struct Bstnode

{

string name; int date; int month; int year;

Bstnode* left;

Bstnode* right;

};

Bstnode* GetNewNode(string name, int date, int month, int year) {

Bstnode *newNode = new Bstnode();

newNode-> name,date, month, year = name, date, month, year;

}

void insert(Bstnode* root, string name,int date, int month,int year);

int main()

{

Bstnode* root;

root = NULL;

insert(root, "sam", 15, 10, 1990);

insert(root, "John", 20, 05, 1960);

insert(root, "anna", 25, 12, 1885);

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!