diff --git a/Mod_6_5_Practic.cpp b/Mod_6_5_Practic.cpp new file mode 100644 index 0000000..aac7589 --- /dev/null +++ b/Mod_6_5_Practic.cpp @@ -0,0 +1,88 @@ +#include +using namespace std; + +class Student{ +private: + string pass; + +protected: + int eng_mark; + +public: + string name; + char sec; + int roll; + + void setPassword(string p){ + pass = p; + } + void setMark(int mark){ + eng_mark = mark; + } + string getPassword(){ + return "***"; + } + int getMark(){ + return eng_mark; + } + void printData(Student st[], int n){ + cout<>n; + Student st[n]; + //name, sec, roll, mark, pass + for(int i=0; i>st[i].name>>st[i].sec>>st[i].roll + >>mark>>pass; + st[i].setMark(mark); + st[i].setPassword(pass); + } + st[n].printData(st, n); + + /* Searching ..... */ + int roll; + int mark; + string pass; + cout<<"For update the mark"<>roll>>mark>>pass; + bool found = false; + for(int i=0; i