create a class COVID with 6 private data members name, cnic, security code, age, address and blood pressure of patient. Class include public member functions
#include<iostream>
using namespace std;
class covid {
public:
void input(string name, string cnic, int secureCode, int age, string address, string blood)
{
this->name=name;
this->cnic=cnic;
this->secureCode=secureCode;
this->age=age;
this->address=address;
this->blood;
}
bool verify()
{
return this->secureCode;
}
void display()
{
return '[name:'+name+',cnic'+cnic+',secure code:'+to_string(secureCode)+',age:'+to_string(age)+',address:'+adress+',blood:'+blood+']';
}
void show()
{
cout << display() << endl;
}
private:
string name;
string cnic;
int secureCode;
int age;
string address;
string blood;
};
int main() {return 0;}
Comments
Leave a comment