From 66da1aa5788285f66e08c2d511bf169662a05efe Mon Sep 17 00:00:00 2001 From: Ashraful Haque <68662629+v-selfnet@users.noreply.github.com> Date: Fri, 22 Jul 2022 07:25:49 +0200 Subject: [PATCH] Add files via upload --- Mod_6_5_Practic.cpp | 88 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Mod_6_5_Practic.cpp 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