Lab 3 - Adding Operators to Classes

The purpose of this lab is to define operators for a class.

Look at the score.cpp file that contains the Score class. You can copy it over to your current directory using:

wget http://www.cs.csubak.edu/~melissa/cs222/score.cpp
This is the Score class that we discussed in lecture, which will allow one to store integers greater than INT_MAX. This class currently has several helper functions and two operators defined, but it does not have the following basic operators needed to provide a standard interface. You will need to define these operators for the lab: The given main() function will NOT work until all three operators have been defined. Once you have defined the three operators, compile the program and then run it. Try giving large values (greater than 1 billion but less than 2.4 billion) when running the program. For example, if you give 2.1 billion for the first prompt and 1.3 billion for the second prompt, it should tell you that the new value of a is 3.4 billion if you have done the output operator correctly.

Email me your completed source code. Make sure both partners names are in the comment section if you worked with a lab partner.