Software Engineering & Object-Oriented Analysis & Design β Object-Oriented Fundamentals and Analysis, NEC licence examination syllabus (Nepal Engineering Council).
Object-Oriented Development Cycle
Analysis to design to implementation, with the same vocabulary throughout.
π Where this lives: the practical advantage of object orientation over the structured methods it replaced is continuity of vocabulary. In a structured project, requirements spoke of functions, design spoke of data flows and modules, and code spoke of procedures β three translations, each an opportunity to lose meaning. In an OO project the word "Application" means the same thing in the interview, the domain model, the design and the class file. That continuity is why the phases blur into iterations so naturally. Search "object oriented analysis design seamless transition".
The four object-oriented fundamentals
Before the cycle, the concepts it depends on. These four are the
definitional core of object orientation and a guaranteed exam
question.
ABSTRACTION
The essential characteristics of an object that distinguish
it from all other kinds of object, providing a crisply
defined boundary relative to the perspective of the viewer.
β decide what matters and ignore the rest, as in the design
concepts topic.
ENCAPSULATION
The process of compartmentalising the elements of an
abstraction that constitute its structure and behaviour;
encapsulation serves to separate the CONTRACTUAL INTERFACE of
an abstraction from its IMPLEMENTATION.
β this is Parnas's information hiding, realised as a language
feature. The class publishes operations and hides its data
representation, so the representation can change without
breaking callers.
NOTE: encapsulation is not the same as data hiding. Data
hiding is one mechanism; encapsulation is the principle of
bundling data with the operations that act on it, and keeping
the internals private.
MODULARITY
The property of a system that has been decomposed into a set
of cohesive and loosely coupled modules.
β in OO, the class is the primary unit of modularity and the
package or namespace groups classes.
HIERARCHY
A ranking or ordering of abstractions. The two important
hierarchies:
IS-A hierarchy β INHERITANCE / generalisation. A Car is-a
Vehicle. Shares structure and behaviour.
PART-OF hierarchy β AGGREGATION / composition. A Wheel is
part-of a Car.
CONFUSING THESE IS THE COMMONEST OO MODELLING ERROR. If you
can say "is a kind of", use inheritance; if you can say "has
a" or "is part of", use composition.
THE THREE ADDITIONAL CONCEPTS usually listed alongside:
CLASS a description of a set of objects sharing the
same attributes, operations, relationships and
semantics. A class is a TEMPLATE; an object is
an INSTANCE.
MESSAGE objects interact by sending messages β
requesting an operation of another object.
Behaviour is distributed, not centralised.
POLYMORPHISM the ability of different types to respond to
the same message in their own way. It is what
makes a design extensible: a new subtype can be
added without changing the code that sends the
message β the open/closed principle from the
design concepts topic.
WHY POLYMORPHISM MATTERS, concretely. Without it:
if (type == PDF) renderPdf(doc);
else if (type == EXCEL) renderExcel(doc);
else if (type == CSV) renderCsv(doc);
Every new format edits this function β and every other
function shaped like it. With polymorphism:
renderer.render(doc);
A new format adds a class and edits nothing. THIS IS THE
SINGLE LARGEST PRACTICAL BENEFIT of object orientation, and
it is the same conclusion the design heuristics topic reached
when it exploded a report controller into a strategy
interface.
The cycle
THE THREE PHASES, and what carries between them:
OBJECT-ORIENTED ANALYSIS (OOA)
Purpose: understand and describe the PROBLEM DOMAIN.
Activities:
Β· identify the actors and their goals β use cases
Β· build the GLOSSARY
Β· identify domain CONCEPTS β the conceptual/domain model
Β· identify ASSOCIATIONS and ATTRIBUTES of concepts
Β· describe SYSTEM BEHAVIOUR β what the system does in
response to events, without saying how
Output: use case model, domain model, system sequence
diagrams, operation contracts.
THE DISCIPLINE: NO software classes. Everything named here is
a real-world concept a domain expert would recognise.
OBJECT-ORIENTED DESIGN (OOD)
Purpose: define a SOFTWARE SOLUTION that satisfies the
analysis.
Activities:
Β· define the architecture and layers
Β· assign RESPONSIBILITIES to software objects β the central
activity, and the subject of ACtE0805
Β· design the collaborations that realise each use case β
interaction diagrams
Β· determine VISIBILITY between objects
Β· define the design class diagram with types, visibility
and method signatures
Β· apply DESIGN PATTERNS where a known solution fits
Output: interaction (sequence/collaboration) diagrams, design
class diagram, package/deployment structure.
OBJECT-ORIENTED IMPLEMENTATION / PROGRAMMING (OOP)
Purpose: express the design in a programming language.
Activities:
Β· map design classes to class definitions
Β· derive method bodies from the interaction diagrams
Β· implement associations as references or collections
Β· handle exceptions per the contracts
Output: source code and unit tests β the subject of ACtE0806.
WHAT CARRIES THROUGH, which is the point of the whole approach:
a CONCEPT in analysis β a DESIGN CLASS β a CLASS in code
an ASSOCIATION β a REFERENCE or collection
a USE CASE β a set of INTERACTIONS β a set of
METHODS and a test
a SYSTEM OPERATION β a CONTROLLER method
No paradigm shift, and therefore no translation loss. Compare
structured development, where a data-flow diagram must be
converted into a module hierarchy by a process with no
mechanical correspondence.
THE ITERATIVE SHAPE β the phases are not sequential stages but
activities repeated per iteration:
iteration n: select use cases β analyse them β design β
implement β test β demonstrate
iteration n+1: the next use cases, PLUS what the
demonstration taught you
EACH ITERATION IS A COMPLETE MINIATURE PROJECT, typically two
to six weeks, producing running tested software. From the
requirement process topic: the demonstration at the end is the
validation mechanism, and iterations are ordered by risk.
A use case through all three phases
TRACE "Record Payment" end to end, so the correspondence is
concrete rather than asserted.
ββ ANALYSIS ββββββββββββββββββββββββββββββββββββββββββββββββββ
USE CASE step 4 of UC-05: "Officer records the fee payment."
DOMAIN CONCEPTS identified from the text:
Payment, Fee, Application, Officer, Receipt
ASSOCIATIONS:
Application 1 ββββ 0..1 Payment
Payment * ββββ 1 Officer (recorded by)
Payment 1 ββββ 0..1 Receipt
ATTRIBUTES:
Payment: amount, receivedOn, method, reference
SYSTEM OPERATION (what the system must do, stated abstractly):
recordPayment(applicationNo, amount, method)
PRE the application is APPROVED and unpaid;
amount equals the fee due
POST a Payment instance was created and associated with
the Application; a Receipt was created; the
application's paid flag is set
NOTE: an OPERATION CONTRACT in analysis says what changes,
not how. "A Payment instance was created" is a statement
about the domain, not about a constructor.
ββ DESIGN ββββββββββββββββββββββββββββββββββββββββββββββββββββ
RESPONSIBILITY ASSIGNMENT β who does what:
PaymentController receives the system operation
Application knows its fee and its paid state, so
it validates the amount (it has the
information β the Information Expert
principle of ACtE0805)
Payment is created and holds its own data
ReceiptPrinter renders the receipt
PaymentRepository persists the Payment
INTERACTION (a sequence, abbreviated):
Officer β PaymentController : recordPayment(no, amt, m)
Controller β ApplicationRepository : find(no)
Controller β Application : assertPayable(amt)
Controller β Payment : Β«createΒ»(amt, m, officer)
Controller β Application : attach(payment)
Controller β PaymentRepository : save(payment)
Controller β ReceiptPrinter : print(payment)
DESIGN CLASS, now with solution detail:
class Payment {
- id : PaymentId
- amount : Money {β₯ 0}
- receivedOn: Instant
- method : PaymentMethod
- reference : String {gateway ref, nullable}
- version : int β solution-domain only
+ Payment(amount, method, officer)
+ isReconciled() : boolean
}
`version` and `reference` have no analysis counterpart β
optimistic locking and gateway reconciliation are solution
concerns, exactly as the design model topic described.
ββ IMPLEMENTATION ββββββββββββββββββββββββββββββββββββββββββββ
public final class Payment {
private final Money amount;
private final PaymentMethod method;
private final OfficerId recordedBy;
private final Instant receivedOn;
private String gatewayReference; // null until known
private int version;
Payment(Money amount, PaymentMethod method,
OfficerId by, Clock clock) {
if (amount.isNegative())
throw new IllegalArgumentException(
"amount must not be negative");
this.amount = amount;
this.method = method;
this.recordedBy = by;
this.receivedOn = clock.instant();
}
boolean isReconciled() {
return gatewayReference != null;
}
}
NOTE `Clock clock` IN THE CONSTRUCTOR. The design said
`receivedOn` is set at creation; taking the clock as a
parameter rather than calling a static now() is what makes
the class testable β the FIRST properties from the test
automation topic, specifically Repeatable. A design decision
with a testing consequence.
THE CORRESPONDENCE, tabulated:
analysis concept Payment β design class Payment
β Java class Payment
association ApplicationβPayment
β attach(payment) + a field
contract postcondition β the constructor's
assignments
contract precondition β assertPayable + the
constructor's guard
use case extension 4a β gatewayReference nullable
+ isReconciled()
EVERY ROW IS A MECHANICAL STEP. That is the claim object
orientation makes about the development cycle, and it is
substantially true β which is why the same nouns survive from
the interview to the source file.
The Clock clock parameter is a small detail with a large lesson. The design said receivedOn is set at creation; how the time is obtained decides whether the class can be tested repeatably. Design decisions and testability decisions are frequently the same decision, which is why the design and testing units keep converging.
π Go further: the design school that takes this continuity furthest is domain-driven design. Its central commitment is a ubiquitous language β the same terms used by domain experts, in conversation, in the model and in the code, with no translation layer β enforced by refactoring the code whenever the language shifts. It adds tactical patterns (entities, value objects, aggregates, repositories) and strategic ones (bounded contexts, context maps) for deciding where one model must end and another begin. It is the analysis/design continuity of this topic, treated as the primary design constraint rather than a convenience. Search "domain driven design ubiquitous language bounded context".
π‘ Exam angle: define the four fundamentals β abstraction, encapsulation, modularity, hierarchy β and distinguish the IS-A (inheritance) from the PART-OF (aggregation) hierarchy, since confusing them is the classic error. Define class, object, message and polymorphism, and explain polymorphism's benefit with the conditional-versus-dispatch example. Describe the three phases OOA, OOD, OOP with the activities and outputs of each, and state what carries between them: a concept becomes a design class becomes a code class, an association becomes a reference, a use case becomes interactions and methods. Note that the phases are repeated per iteration, not performed once.
Syllabus points
Phases of OO development
Create a free account to tick topics off, take notes as you read, watch the video lessons and get a day-by-day study plan built around your exam date.
Related topics in Object-Oriented Fundamentals and Analysis