Practical 1
Practical 1
Private members
Member Name Data Type
integer name
position integer
points integer
Create a function calculate ( )- to assign the
points according to the value of
position given below:
Position Point
1 10
2 7
3 5
>3 0
Public members
1. Create an appropriate function Accept()
and Display() to accept and display
data respectively.
2. A constructor to initialize all the
numerical members to 0 and all strings to
“WELCOME”.
Write a C++ program to implement the
class defined above by creating an
object.