Let's say we have a class SCORE. It has three objects s1,s2 and s3. SCORE has an attribute RUNS. How to add the runs of all the objects ? SCORE has an internal method int TOTALSCORE(). so when that method is called, it should return the total score .
How should i call that method ? Like s1.TOTALSCORE() ? Or any other way?
See Question&Answers more detail:os