Professional Documents
Culture Documents
Hamza Tarazi
OOP
16 December 2020
Ma’am Faria
Assignment 3
#include<iostream>
using namespace std;
class Final_Evaluation
{
protected:
//Data Members
int Registration_number;
string Name;
float cgpa;
int credit_hour;
public:
//Default constructor for initialization
Final_Evaluation() :Registration_number(),Name(),cgpa(),credit_hour(){}
//Methods
//Default Function
void Evaluation()
{
cout << "Yet to be Evaluated!!!!" << endl;
}
//Parametrized Function
virtual void Evaluation(int r, string N, float cg, int c)
{
this->Registration_number = r;
this->Name = N;
this->cgpa = cg;
this->credit_hour = c;
}
};
class BS : public Final_Evaluation
{
public:
//Parametrized Function
void Evaluation(int r, string N, float f, int c)
{
this->Registration_number = r;
this->Name = N;
this->cgpa = f;
this->credit_hour = c;
cout << "Registration Number of Student is :: " << Registration_number << endl;
cout << "Name of Student is :: " << Name << endl;
cout << "CGPA of student is :: " << cgpa << endl;
cout << "Credit hous of course is :: " << credit_hour << endl;
this->Registration_number = r;
this->Name = N;
this->cgpa = f;
this->credit_hour = c;
cout << "Registration Number of Student is :: " << Registration_number << endl;
cout << "Name of Student is :: " << Name << endl;
cout << "CGPA of student is :: " << cgpa << endl;
cout << "Credit hous of course is :: " << credit_hour<<endl;