Copy Constructor
Design a class CScore which has
- a private data member "int value"
storing the score of a student.
- a constructor "CScore(int n)" which assigns n to value.
- a copy constructor "CScore(CScore s)"
which assigns initial values with the object s.
- a public member function "int getValue()" which returns the value
of the data member "value".
- a public member function "void Print()" which displays the value of
the object.
You test your class definition with this main
program. Save your class
definition in "score.h" and compile the program with "clang++
ex-score.cpp". The running result should look like:
80
80
80