Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   Programe on Class C++ (http://www.go4expert.com/forums/programe-class-cpp-t4629/)

king imran 11Jun2007 21:38

Programe on Class C++
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.

DaWei 11Jun2007 22:16

Re: Programe on Class C++
That sounds like an assignment. That means YOU write it, not us. Go over, in your mind, what you have been taught (you did pay attention in class, right?) and write some code expressing that. We will be glad to help you debug it, or give you a few pointers, or whatever.

All times are GMT +5.5. The time now is 19:56.