Answer to Question #25525 in C++ for lakshmi

Question #25525
pseudocode to maintain the records of students. The users should be able to add new student, edit, delete and search information of students
1
Expert's answer
2013-03-05T07:33:12-0500
# include <iostream>
# include <stack>
# include <string>
using namespace std;

/*pseudocode to maintain the records of students. The users should be able to
add new student, edit, delete and search information of students*/
class stud{
protected:
string name;
string info;
public:
stud(string _name="", string _info=""){name=_name;info=_info;}
~stud(){name.clear();info.clear();}
void add(string _name, string _info);
void edit(string _name, string _info);
void deletestud();
friend stud* search(stud a [] , int num, string name);
};
stud* search(stud a [] , int num,string name);
void stud::add(string _name, string _info){
name=_name;
info=_info;
}
void stud::edit(string _name, string _info){
name=_name;
info=_info;
}
void stud::deletestud(){
stud::~stud();
}
stud* search(stud a [] , int num,string _name){
while (a){
if (_name == a->name) {return a;}
a++;
}
return nullptr;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS