==================================================================
====================================================================
#include<iostream>
#include<iomanip>
using namespace std;
class Application
{
protected:
string name;
int age;
int Eng;
int SL;
int id;
int M;
int P;
int C;
int CS;
float cutoff;
public:
void get()
{
cin>>id;
cin>>name;
cin>>age;
cin>>Eng;
cin>>SL;
cin>>M;
cin>>P;
cin>>C;
cin>>CS;
}
void print()
{
cout<<name<<endl;
cout<<fixed<<setprecision(2)<<cutoff;
}
};
class engg_Appln:public Application
{
int E;
public:
void get()
{
Application::get();
cin>>E;
}
void calc_Cutoff()
{
Application::cutoff=(M+P+C)/3.0+E;
}
void print()
{
Application::print();
}
};
class arts_Appln:public Application
{
public:
void get()
{
Application::get();
}
void calc_Cutoff()
{
Application::cutoff=(Eng+M+P+C+SL+CS)/6.0;
}
void print()
{
Application::print();
}
};
====================================================================
#include<iostream>
#include<iomanip>
using namespace std;
class Application
{
protected:
string name;
int age;
int Eng;
int SL;
int id;
int M;
int P;
int C;
int CS;
float cutoff;
public:
void get()
{
cin>>id;
cin>>name;
cin>>age;
cin>>Eng;
cin>>SL;
cin>>M;
cin>>P;
cin>>C;
cin>>CS;
}
void print()
{
cout<<name<<endl;
cout<<fixed<<setprecision(2)<<cutoff;
}
};
class engg_Appln:public Application
{
int E;
public:
void get()
{
Application::get();
cin>>E;
}
void calc_Cutoff()
{
Application::cutoff=(M+P+C)/3.0+E;
}
void print()
{
Application::print();
}
};
class arts_Appln:public Application
{
public:
void get()
{
Application::get();
}
void calc_Cutoff()
{
Application::cutoff=(Eng+M+P+C+SL+CS)/6.0;
}
void print()
{
Application::print();
}
};
what is meant by arts in second class
ReplyDelete