Define a Class in C++. (STUDENT)


Define a class STUDENT with the following specifications:

Private members
  • Admno    Integer 
  • Sname     20 character
  • English    float
  • Math        float
  • Science    float
  • Total        float
  • Ctotal()    A function to calculate English + Math + Science with float return type
Public members
  • Takedata()    Function to accept values for Admno, Sname, English, Math, Scince and invoke Ctotal() to calculate total
  • Showdata()   Function to display all the data members on the screen.



No comments

Post your comments

Powered by Blogger.