/*MINI
PROJECT FROM GROUP C- Azrai,Hafiz,Jaimah,Prita. */
/* A
PROJECT ON REQUIREMENTS OF GIVING ADMISSION IN 4 UNIVERSITIES.*/
#include<iostream> //A header files for input and output
#include<conio.h> //A header files to use in old MS-Dos
#include<string.h> //a header files which contains definition ,constant and
declaration of function
usingnamespace
std;
class admission //Object for this OOP is admission
{
};
class
uitm : public admission //class uitm inherit from
class admission
{
public: //class control for this class is public
void seeb() //the function for the oop
{ cout<<"******************THIS
IS UITM UNIVERSITY.*************"<<endl //this is the
line for output
<<endl<<"Grades In Different Subjects Are Given Below."<<endl //this is the line for output
<<endl<<"The Applicant Must Get G.P.A. 4.0 Out of G.P.A. 5.0
In H.S.C." //this is the line for output
<<endl //end of line
<<" In Physics:=4.5(gp)"<<endl<<"In Chemistry:=4.5(gp)"<<endl //this is the line for output
<<"In Mathematics:=4.5(gp)"<<endl<<"In English:=4.5(gp)"<<endl<< //this is the line for output
"And
At least G.P.A. 3.0 In Every Subject."<<endl<<endl<<//this is the line for output
"The
Total G.P.A. of Four Subjects is :=18"<<endl<<endl; //this is the
line for output
} //open block
};
class usm
: public admission //inherit from class admission
{ //open block
public: //access control for this class is public
void
seek() // void function class usm
{ cout<<"****************THIS IS USM UNIVERSITY.*****************"//this is the line for output
{ cout<<"****************THIS IS USM UNIVERSITY.*****************"//this is the line for output
<<endl;
cout<<"The Requirements Of Giving Addmission Test are
given Below."//this is the line for
output
<<endl<<endl<<"In Physics:=3.5 (gp)."<<endl<<"In Chemistry:=3.5(gp)."<<endl //this is
the line for output
<<"In Mathematics:=3.5 (gp)."<<endl<<"In English:=3.5(gp)."<<endl //this
is the line for output
<<endl<<"The Applicant Must Get At Least G.P.A. 3.5 In Every
Subject."//this is the line for output
<<endl<<endl<<"The Total Of These Four Subjects Should Be
:=17."//this is the line for output
<<endl<<endl;
//end of line
} //close
block
};
class upm
: public admission //inherit from class
admission
{ //open
block
public: //access control for this class is public
void
seec() //void function for class upm
{ //Open open block
cout<<"***************** THIS IS UPM UNIVERSITY.*************.\n \n" //this is the line for output
cout<<"***************** THIS IS UPM UNIVERSITY.*************.\n \n" //this is the line for output
<<"THE REQUIREMENTS ARE GIVEN BELOW.\n \n" //this
is the line for output
<<"IN PHYSICS := 3.5 (G.P.A.)\n"; //this
is the line for output
cout<<" IN CHEMISTRY := 3.5 (G.P.A.)\n" //this is the line for output
<<"IN MATHEMATICS := 3.5 (G.P.A.)\n" //this
is the line for output
<<"IN ENGLISH := 3.5 (G.P.A.)\n"; //this
is the line for output
cout<<"THE AVERAGE G.P.A. WILL BE := 4 (G.P.A.) IN PER SUBJECTS.\n\n"; //this is the line for output
} //close block
};
class uum
:public admission //class uum is inherit from
class admission
{ //open block
public: //access control for this class is public
void
seer() //void function
{ //open block
cout<<"*********** THIS IS UUM UNIVERSITY************.\n \n" //this is the line for output
cout<<"*********** THIS IS UUM UNIVERSITY************.\n \n" //this is the line for output
<<"THE REQUIREMENTS ARE GIVEN BELOW. \n \n" //this
is the line for output
<<"IN PHYSICS := 3.5 (G.P.A.)\n" //this
is the line for output
<<"IN CHEMISTRY := 3.5 (G.P.A.)\n" //this
is the line for output
<<"IN MATHEMATIS := 3.5 (G.P.A.)\n" //this
is the line for output
<<"IN ENGLISH := 3.5 (G.P.A.)\n \n"; //this is the line for output
cout<<"THE AVERAGE G.P.A. IN THREE SUBJECTS WILL BE := 3.5
(G.P.A.)\n"; //this is the
line for output
} //close block
};
class
grade:public uitm,public
usm,public upm,public
uum
{
private: //access control for this class is private
float
p,c,m,e,b,hsc,ssc; //float data types
public: //access control for this function is public
void
setgrade(void);
void
setkb(void);
void
provek(void);
void
proveb(void);
void
prover(void);
void
provec(void);
void
proveru(void);
void
proveku(void);
void
provedu(void);
};
void grade::setgrade() //method outside from class
{ //open block
cout<<"Enter
the G.P.A. of Physics:="; //user
wil enter their cgpa
cin>>p; //input from user as the grade as p
while(p>5.0) //if the input is greater tha 5.0
{ //open block
cout<<"Please
reenter G.P.A of Phsics:="; //user wil enter their cgpa
cin>>p; //input from user as the grade as p
} //open block
cout<<"Enter
the G.P.A. of Chemistry:="; //user wil
enter their cgpa
cin>>c; //input from user as the grade as c
while(c>5.0) //if the input is greater tha 5.0
{ //cose block
cout<<"Please
reenter G.P.A of Chemistry:="; //user wil enter their cgpa
cin>>c; //input from user as the grade as c
} //close block
cout<<"Enter
the G.P.A. of Mathematics:="; //user wil enter
their cgpa
cin>>m; //input from user as the grade as m
while(m>5.0)
{
cout<<"Please
reenter G.P.A of Mathematics:=";
//user wil enter their cgpa
cin>>m; //input from user as the grade as m
}
cout<<"Enter
the G.P.A. of English:="; //user wil
enter their cgpa
cin>>e; //input from user as the grade as e
while(e>5.0)
{
cout<<"Please
reenter G.P.A of English:=";
//user wil enter their cgpa
cin>>e; //input from user as the grade as e
}
cout<<"Enter the
G.P.A. of Biology:=";
//user wil enter their cgpa
cin>>b; ////input from user as the grade as b
while(b>5.0)
{ //open block
cout<<"Please
reenter G.P.A of Biology:=";
//user wil enter their cgpa
cin>>b; //input from user as the grade as b
}
cout<<"Total
G.P.A. In H.S.C.(Without fourth Subject.):= "; //user wil enter
their cgpa
cin>>hsc; //input from user as the grade as hsc
cout<<"Total
G.P.A. in S.S.C.(Without fourth subject.):= "; //user wil enter
their cgpa
cin>>ssc; //input from user as the grade as ssc
}
void
grade ::setkb(void) //void
function for setkb
{
cout<<"Enter
the G.P.A. of Physics:="; //user wil enter their cgpa
cin>>p; //input from user as the grade as p
while(p>5.0)
{
cout<<"Please
reenter G.P.A of Phsics:="; //user wil
enter their cgpa
cin>>p; //input from user as the grade as p
} //close block
cout<<"Enter
the G.P.A. of Chemistry:="; //user wil enter their cgpa
cin>>c; //input from user as the grade as c
while(c>5.0)
{
cout<<"Please
reenter G.P.A of Chemistry:="; //user wil
enter their cgpa
cin>>c; //input from user as the grade as c
}
cout<<"Enter
the G.P.A. of Mathematics:=";
//user wil enter their cgpa
cin>>m; //input from user as the grade as m
while(m>5.0)
{
cout<<"Please
reenter G.P.A of Mathematics:="; //user
wil enter their cgpa
cin>>m; //input from user as the grade as m
}
cout<<"Enter
the G.P.A. of English:="; //user wil enter their cgpa
cin>>e; //input from user as the grade as m
while(e>5.0)
{ //open block
cout<<"Please
reenter G.P.A of English:="; //user wil
enter their cgpa
cin>>e; //input from user as the grade as c
} //close block
} //close block
void
grade::provek(void) //method
outside from class
{ //open block
float t; //variable data type
t=p+c+m+e;
if(p<3.5) //if-else statement
cout<<"He
is weak in physics."<<endl;
//the output shows the result of cgpa.
if(c<3.5) //if-else statement
cout<<"He
is weak in chemistry."<<endl; //the
output shows the result of cgpa.
if(m<3.5) //if-else statement
cout<<"He
is weak in mathematics."<<endl; //the
output shows the result of cgpa.
if(e<3.5) //if-else statement
cout<<"He
is weak in english"<<endl; //the
output shows the result of cgpa.
cout<<endl<<endl; // end of line
if(t<17.0) //if-else statement
{ // open block
cout<<"THE
APPLICANT CAN NOT APPLY FOR USM."<<endl; //the output shows the result of cgpa.
cout<<"Because
his/her total gp is :="<<t<<endl; //the output shows the result of cgpa.
cout<<"The
requirements are:="<<"\n
\n"; //the output shows the result of
cgpa.
seek();
} //open block
if(t>=17) //if-else statement
if(p>=3.5&&p<=5.0) //if-else statement
if(c>=3.5&&c<=5.0) //if-else statement
if(m>=3.5&&m<=5.0) //if-else statement
if(e>=3.5&&e<=5.0) //if-else statement
{ //open block
cout<<"The
applicant can apply for USM."<<endl; //if
the cgpa are fit with the requirement this output will show
cout<<"Because
the applicant total gp is :="<<t<<endl; //the output will
show user cgpa.
} //close block
if(t>=17.0) //if-else statement
{ //open block
if(p<3.5||c<3.5||m<3.5||e<3.5) //if-else
statement
{ //open block
cout<<"He
CAN NOT APPLY FOR USM.\n \n"; // if the
cgpa is below 17.0 the user will receive output
seek();
} //close block
} //close block
} //close block
void
grade :: proveb(void) //this is
function in class grade
{ //open block
float t; //float data types
t=p+c+m+e;
if(p<3.0) //if-else statement
{
cout<<"He
is weak in physics."<<endl;
// if the cgpa is below 3.5.0 the user will
receive output
} //close block
if(c<3.0) //if-else statement
{ //open block
cout<<"He
is weak in chemistry."<<endl; // if
the cgpa is below 3.5.0 the user will receive output
} //close block
if(m<3.0) //if-else staatement
{
cout<<"He
is weak in mathematics."<<endl;//
if the cgpa is below 3.5.0 the user will receive output
} //close block
if(e<3.0) //if-else statement
{ //open block
cout<<"He
is weak in english."<<endl; // if
the cgpa is below 3.5.0 the user will receive output
} //close block
cout<<endl<<endl; //
end of line
if(t<18.0) // if-else statement
{ //open block
cout<<"He
is UNAPPLICABLE in UITM."<<endl; //
if the cgpa is below 18.0 the user will receive output
cout<<"
Because his total is:="<<t<<endl; //
cout<<"The
requirements are :="<<"\n
\n";
seeb();
} //close block
if(t>=18.0&&t<=20) //
if(p>=3.0&&p<=5.0)
if(c>=3.0&&c<=5.0)
if(m>=3.0&&m<=5.0)
if(e>=3.0&&e<=5.0)
{
cout<<"The
applicant can apply for UITM."<<endl; //if the user cgpa
if above 3.0 this output will show
cout<<"
Because his total is:="<<t<<endl; //this output
will show user total cgpa
}
if(t>=18.0) //if-else statement
{ //open block
if(p<3.0||c<3.0||m<3.0||e<3.0) //if-else statement
{
cout<<"HE IS UNAPPLICABLE IN UITM. \n \n"; //if the
user cgpa is below 3.0 this output will show
seeb();
} //close block
} //close block
} //close block
void
grade::prover(void) //variable
function for class grade
{ //open block
float t; //this is a data type
t=p+c+m;
uum ;
if(p<3.5)
{
cout<<"He
is weak in physics."<<endl; // if the user
cgpa is below 3.5 this output wil show
} //close block
if(c<3.5) //if-else statement
{ //open block
cout<<"He
is weak in chemistry."<<endl; // if
the user cgpa is below 3.5 this output wil show
} //close block
if(m<3.5) //if-else statement
{ //open block
cout<<"He
is weak in mathematics."<<endl; //
if the user cgpa is below 3.5 this output wil show
} //close block
cout<<endl<<endl;
if(t<12) //if-else statement
{ //open block
cout<<"The
Apllicant can not apply for UUM."<<endl; // if the user total cgpa is below 12.0 this output wil
show
cout<<"Because
his total is :="<<t<<endl<<"\n";
seer();
}
if(t>=12) //if-else statement
if(p>=3.5&&p<=5.0) //if-else statement
if(c>=3.5&&c<=5.0) //if-else statement
if(m>=3.5&&m<=5.0) //if-else statement
{
cout<<"The
applicant can apply for UUM."<<endl<<endl;
cout<<"Because his total GPA in 3 subjects are:="<<t<<endl;
}
if(t>=12.0) //if-else statement
{
if(p<3.5||c<3.5||m<3.5) //if-else statement
{
cout<<"HE
IS UNAPPLICABLE FOR UUM. \n \n"; // if
the user cgpa is below 3.5 this output wil show
seer();
}
}
}
void
grade:: provec(void)
{
float t;
t=p+c+m;
if(p<3.5) //if-else statement
{
cout<<"He
is weak in Physics."<<endl; // if the
user total cgpa is below 3.5 this output wil show
}
if(c<3.5) //if-else statement
{
cout<<"He
is weak in Chemistry."<<endl; // if the
user total cgpa is below 3.5 this output wil show
}
if(m<3.5) //if-else statement
{
cout<<"He
is Weak in Mathematics."<<endl; // if the user
total cgpa is below 3.5 this output wil show
}
if(ssc<4.0) //if-else statement
{
cout<<"He
is weak in S.S.C. G.P.A.\n";
// if the user total cgpa is below 3.5 this
output wil show
}
if(hsc<4.0) //if-else statement
{
cout<<"He
is weak in H.S.C. G.P.A.\n"; // if the
user total cgpa is below 4.0 this output wil show
}
cout<<endl<<endl; //end of line
if(t<12) //if-else statement
{
cout<<"He
can not apply for UPM."<<endl; // if the user
total cgpa is below 12.0 this output wil show
cout<<"Because
his total in 3 subjects is:="<<t<<endl<<"\n";
//this line will show output cgpa
seec();
}
if(t>=12) //this is if-else statement
if(hsc>=4.0) //this is if-else statement
if(ssc>=4.0&&ssc<=5.0) //this is if-else statement
if(p>=3.5&&p<=5.0) //this is if-else statement
if(c>=3.5&&c<=5.0) //this is if-else statement
if(m>=3.5&&m<=5.0) //this is if-else statement
if(e>=3.5&&e<=5.0) //this is if-else statement
{
cout<<"The
applicant can apply for UPM."<<endl; //if the user cgpa
is 3.0 above this output will show
cout<<"Because
his total in 3 Subjects is:="<<t<<endl;
}
if(t>=12.0) //this is if-else statement

No comments:
Post a Comment
thanks for comment