Programe on Class C++

Discussion in 'C++' started by king imran, Jun 11, 2007.

  1. king imran

    king imran New Member

    Joined:
    Jun 3, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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.
    :confused:
     
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    http://www.daweidesigns.com
    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.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice