Question: I need run this code with java please #include class student { public: int academic _ number; string name; int level; string major; int academic

"I need run this code with java please
#include
class student{
public:
int academic_number;
string name;
int level;
string major;
int academic_year;
int registered[5];
student * left;
student* right;
student(){
left=NULL;
right=NULL;
}
};
//insert function
void insert(student *root,int a,string n,int l,string m,int ay,int re[]){
if(!root){// if the list is empty then blindly insert at first position
student node=new student();
node->a_no=a;
node->name=n;
node->lev=l;
node->maj=m;
node->a_year=ay;
node->reg=re;
}
else{//select an appropriate position to insert a node based on A_no
student * temp=root;
student * temp2=root;
while(temp->a_no<=a){
temp2=temp;
temp=temp->right;
}
temp=new student();
temp->a_no=a;
temp->name=n;
temp->lev=l;
temp->maj=m;
temp->a_year=ay;
temp->reg=re;
temp2->right=temp;
temp->left=temp2;
}
}
void display(student *root){//displaying student details
if(!root)
cout<<""no student records"";
else{
student *temp=root;
while(!temp){
cout<<""academic number:""<a_no<name<lev<maj<a_year<right;
}
}
void search(int ano,student * root){
if(!roo XS13 t)
cout<""no deatils found"";
node *temp=root;
int flag=0;
while(!temp){
if(temp->a_no==ano){
flag=1;
break;
}
else{
flag=0;
}
temp=temp->right;
}
if(!flag)
cout<<""not found"";
else
couot<<""found"";
}
int main(){
student* root=NULL;
int n;//number of students
cin>>n;
int A_no;
string name;
int lev;
string maj;
int a_year;
int r_no;
int reg[5];
for(int i=0;i>a_no>>name>>lev>>maj>>a_year>>r_no;
for(int i=0;i>reg[i];
}
insert(root,a_no,name,lev,maj,a_year,reg);
}
for(int i=0;i>ano;
search(ano);
return 0;
}
Here is the b"

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 Programming Questions!