M
mohammaditraders
Question # 1 Write a program which consists of a class
named Student, the class should consists of three data members Name,
Ob_marks, Total_marks and two member functions Cal_percentage() which
calculate the percentage of the student by the formula (Ob_marks *
100 )/Total_marks and Display() which show all information of the
student. The class should also contain the default constructor which
initializes all the data member of the class.
In main program define an object of the Student class and call the
member functions with this object.
Question # 2
What is function overloading Is it possible to overload constructor if
Yes give complete example of constructor overloading, if No justify
your answer.
named Student, the class should consists of three data members Name,
Ob_marks, Total_marks and two member functions Cal_percentage() which
calculate the percentage of the student by the formula (Ob_marks *
100 )/Total_marks and Display() which show all information of the
student. The class should also contain the default constructor which
initializes all the data member of the class.
In main program define an object of the Student class and call the
member functions with this object.
Question # 2
What is function overloading Is it possible to overload constructor if
Yes give complete example of constructor overloading, if No justify
your answer.