December 2003
Beginner
288 pages
7h 8m
English
As mentioned previously, the plus signs (+) and minus signs (-) to the left of the attributes and methods signify whether the attributes and methods are public or private. The attribute or method is considered private if there is a minus sign. This means that no other class can access the attribute or method; only methods in the class can inspect or change it.
If the attribute or method has a plus sign to the left, the attribute or method is public, and any class can inspect or modify it. For example, consider the following:
-companyNumber:float +companyAge:int
In this example, companyNumber is private, and only methods of its class can do anything with it. However, companyAge is public, and thus it is fair game for any ...
Read now
Unlock full access