Encapsulation Bundling data and actions so that the logical properties of data and actions are separated from the implementation details 6.3 Object-Oriented Design 167 core classes in the problem solution. There may be two classes on the list that are actually the same thing. These duplicate classes usually arise because people within different parts of an organization use different names for the same concept or entity. There may be two classes in the list that have many common attributes and behaviors. The common parts should be gathered together into a superclass with the two classes inher-iting the common properties and adding the properties that are different. There may be classes that really don’t belong in the problem solution. For example, if we are simulating a calculator, we might list the user as a possible class. However, the user is not within the simulation as a class; the user is an entity outside the problem that provides input to the simulation. Another possible class might be the
This is the end of the preview.
access the rest of the document.