Define a Class in C++. (CANDIDATE)


Define a class CANDIDATE in C++ with following descriptions:

Private members
  • ·         A data member RNo (Registration Number) of type long
  • ·         A data member Name of type string
  • ·         A data member Score or type float
  • ·         A data member Remarks of type string
  • ·         A member function AssignRem() to assign the remarks as per the score obtained by a candidate. Score range and the respective remarks are shown as follow:


Score
Remarks
>=50
Selected
Less than 50
Not selected

Public members
  • ·         A function ENTER() to allow user to enter values for RNo, Name, Score and call function AssignRem() to assign grade.
  • ·         A function DISPLAY() to allow user to view the content of all data members.




1 comment:

Post your comments

Powered by Blogger.