Proverbs, aphorisms, quotations (English) | by Linux fortune |
... C++ offers even more flexible control over the visibility of member objects and member functions. Specifically, members may be placed in the public, private, or protected parts of a class. Members declared in the public parts are visible to all clients; members declared in the private parts are fully encapsulated; and members declared in the protected parts are visible only to the class itself and its subclasses. C++ also supports the notion of *_______friends*: cooperative classes that are permitted to see each other's private parts. -- Grady Booch, "Object Oriented Design with Applications" | |
Two battleships assigned to the training squadron had been at sea on maneuvers in heavy weather for several days. I was serving on the lead battleship and was on watch on the bridge as night fell. The visibility was poor with patchy fog, so the Captain remained on the bridge keeping an eye on all activities. Shortly after dark, the lookout on the wing of the bridge reported, "Light, bearing on the starboard bow." "Is it steady or moving astern?" the Captain called out. Lookout replied, "Steady, Captain," which meant we were on a dangerous collision course with that ship. The Captain then called to the signalman, "Signal that ship: We are on a collision course, advise you change course 20 degrees." Back came a signal "Advisable for you to change course 20 degrees." In reply, the Captain said, "Send: I'm a Captain, change course 20 degrees!" "I'm a seaman second class," came the reply, "You had better change course 20 degrees." By that time, the Captain was furious. He spit out, "Send: I'm a battleship, change course 20 degrees." Back came the flashing light: "I'm a lighthouse!" We changed course. -- The Naval Institute's "Proceedings" | |
Speer's 1st Law of Proofreading: The visibility of an error is inversely proportional to the number of times you have looked at it. |