Java Basics  «Prev  Next»

Lesson 2 OOA - Reading Concepts
Objective Understand how object-oriented analysis (OOA) models systems as collections of interacting objects, independent of implementation details.

Object-Oriented Analysis: Reading Concepts

In object-oriented analysis, a system is modeled as a collection of collaborating objects. Each object maintains its own state, and the overall system’s state is the combination of all participating objects. Collaboration occurs through message passing between objects.

  • OOA Concepts: An analysis model abstracts the system into idealized objects and their interactions. Unlike programming, the focus here is on how to think about the system, not how to implement it. This abstraction can describe both software and non-software systems.
  • Analysis Model: The model does not consider implementation concerns such as persistence, concurrency, or distribution. These details are introduced during object-oriented design (OOD), where design patterns are applied to solve recurring structural and behavioral problems.

Identifying shared properties

Consider two roles in an organization: Programmer and Manager. Both share properties such as name, address, phoneNumber, and experience. Yet, they also differ:

  • A Programmer may track preferred programming languages or current project assignments.
  • A Manager may focus on project status reports or team performance metrics.

Instead of duplicating shared fields, it is best to extract these into a common superclass, Employee. This illustrates the OOA principle of identifying generalizations and factoring out common attributes and behaviors.


Figure 1.2: Properties and behavior of a Programmer and a Manager, together with their representations as classes
Figure 1.2: Properties and behavior of a Programmer and a Manager, together with their representations as classes

Inheritance and polymorphism in context

In nature, offspring inherit traits from their parents while still expressing unique characteristics. Similarly, in Java a subclass inherits variables and methods from its superclass but may also define additional members. This relationship captures both reuse and specialization.

Furthermore, one action can have different meanings depending on context. For example, “eat” means something different to a deer than to a bear. In Java, this corresponds to polymorphism—the ability of a single method name to invoke behavior specific to the object’s runtime type.

Effective OOA requires identifying where inheritance structures clarify relationships and where polymorphism simplifies collaboration. These principles guide the later design and implementation stages.


SEMrush Software