Posts

Showing posts from June 9, 2019

class work

Image
Program#1   #include<iostream> #include<windows.h> #include<cstring> #include "untitled2.cpp" using namespace std; class education; class person { protected: string name; string cnic; string dob; public: void getdata() { cout<<"enter name"; cin>>name; cout<<"enter cnic"; cin>>cnic; cout<<"enter DOB"; cin>>dob; } void display() { cout<<"name= "<<name; cout<<"cnic= "<<cnic; cout<<"date of birth= "<<dob; } }; class education{ string dname; int year; float cgpa; public: void getdata() { cout<<"enter degree";cin>>dname; cout<<"enter year";cin>>year; cout<<"Cgpa";cin>>cgpa; } void display() { cout<<"\nDegree="<<dname; co...