Unit-1
Unit-1
• It is the procedure of identifying software engineering requirements and developing software specifications in
terms of a software system’s object model, which comprises of interacting objects.
• The primary tasks in object-oriented analysis (OOA) are:
• Find the objects
• Organize the objects
• Describe how the objects interact
• Define the behavior of the objects
• Define the internals of the objects
Object-Oriented Design (OOD)
• Object-oriented programming (OOP) is a programming paradigm based upon objects (having both data and
methods) that aims to incorporate the advantages of modularity and reusability.
• Objects, which are usually instances of classes, are used to interact with one another to design applications
and computer programs.
• The important features of object–oriented programming are:
• Bottom–up approach in program design.
• Programs organized around objects, grouped in classes.
• Focus on data with methods to operate upon object’s data.
• Interaction between objects through functions.
• Reusability of design through creation of new classes by adding features to existing classes.
• Some examples of object-oriented programming languages are C++, Java, Smalltalk, Delphi, C#, Perl, Python,
Ruby, and PHP.
About Object Oriented Technology
• Classification means that objects with the same data structure (attributes) and
behavior (operations) are grouped into a class.
• Paragraph, Monitor, and ChessPiece are examples of classes.
• A class is an abstraction that describes properties important to an application and
ignores the rest.
• Any choice of classes is arbitrary and depends on the application.
About Object Oriented Technology
• Polymorphism means that the same operation may behave differently for
different classes.
• The move operation, for example, behaves differently for a pawn than for the
queen in a chess game.
• An operation is a procedure or transformation that an object performs or is
subject to.
• Right Justify, display, and move are examples of operations.
• An implementation of an operation by a specific class is called a method.
Object Oriented Technology
OO Development
• Software based on abstractions that exist in the real world as well as in the program.
• In this context development refers to the software life cycle: analysis, design, and implementation .
• OO development is the identification and organization of application concepts, rather than their final
representation in a programming language.
• It‘s a conceptual process independent of programming languages.
• OO development is fundamentally a way of thinking and not a
programming technique.
OO Modeling History
• The history of object-oriented modeling (OO) can be traced back to the 1960s.
• The development of Simula and Smalltalk were key events in the evolution of OO.
• Simula developed between 1961–1967, Simula was the first programming language to be widely
recognized as "object oriented“.
• Smalltalk developed in the 1970s at Xerox PARC, Smalltalk advanced OOP by emphasizing
encapsulation and polymorphism.
• In 1982, Booch wrote the first paper titled Object-Oriented Design, which may have coined the term.
• Unified Modeling Language (UML) developed in 1994 by the Three Amigos of Rational Software, UML
was a collaboration between Grady Booch, James Rumbaugh, and Ivar Jacobson.
Modelling
• Model: A model is an abstraction of something for the purpose of understanding it before building it.
• Modelling: Designers build many kinds of models for various purposes before constructing things.
• Because a model omits nonessential details, it is easier to manipulate than the original entity.
• Abstraction is a fundamental human capability that permits us to deal with complexity.
• Models are abstractions built to understand a problem before implementing a solution.
• All abstractions are subsets of reality selected for a particular purpose.
• The state model describes the control structure of a system in terms of events and states.
• The interaction model describes how individual objects collaborate to achieve the behavior of the system
as a whole.
• Different problems place different emphasis on the three kinds of models.
Modelling
• For example, the class model attaches operations to classes, while the state and interaction models elaborate the
operations.
• The three kinds of models separate a system into distinct views.
• The different models are not completely independent—a system is more than a collection of independent parts— but
each model can be examined and understood by itself to a large extent.
• The different models have limited and explicit interconnections.
• Each of the three models evolves during development.
• First analysts construct a model of the application without regard for eventual implementation.
• Then designers add solution constructs to the model.
• Implementers code both application and solution constructs.
• The word model has two dimensions
• A view of a system (class model, state model, or interaction model)
Three Models
• Class Model
• The class model shows all the classes present in the system.
• The class model shows the attributes and the behavior associated with the objects.
• The class diagram shows the class name followed by the attributes followed by the functions or the methods that
are associated with the object of the class.
• Goal in constructing class model is to capture those concepts from the real world that are important to an
application.
• The class model describes the structure of objects in a system, their identity, their relationships to other objects, their
attributes and their operations.
• The class model provides context for the state and interaction models.
Class Model
Three Models
• State Model
• The state model describes those aspects of objects concerned with time and the sequencing of operations also
events that mark changes, states that define the context for the events, and the organization of events and
states.
• The state model captures control, the aspect of a system that describes the sequences of operations that
occur, without regard for what the operations do, what they operate on, or how they are implemented.
• The state model specifies and implements control with state diagrams.
• A state diagram is a graph whose nodes are states and whose arcs are transitions between states caused by
events.
• Actions and events in a state diagram become operations on objects in the class model.
• Interaction Model
• The interaction perspective model explains how components of the system interact with each other.
• Interaction model is used to show the various interactions between objects, how the objects collaborate to
achieve the behavior of the system as a whole.
• There are three types of interactions:
• User interaction: It involves user input and user output. It interacts with the user and helps to identify user
requirements.
• System interaction: It is the interaction between the system which is to be developed and other systems. It
interacts from system to system and highlights the problems that may arise in communication.
• Component interaction: It interacts with different components of the same system and helps understand
whether the proposed system can provide the required system performance.
Three Models
• Interaction Model – Represents the collaboration of individual objects, the “interaction” aspects
of a system.
• Interaction model describes interactions between objects – how individual objects collaborate to achieve
the behavior of the system as a whole.
• The state and interaction models describe different aspects of behavior, and you need both to describe
behavior fully.
• The interactive model start with use case with activity and sequence.
• Use cases, sequence diagrams and activity diagrams document the interaction model.
• A use case focuses on the functionality of a system- that is, what a system does for users.
• A sequence diagram shows the objects that interact and the time sequence of their interaction.
• Activity diagrams show the flow of control among the processing steps of a computation.
Relationship Among the Models
• Each model describes one aspect of the system but contains references to the other models.
• The class model describes data structure on which the state and interaction models operate.
• The operations in the class model correspond to events and actions.
• The state model describes the control structure of objects.
• It shows decisions that depend on object values and causes actions that change object values and state.
• The interaction model focuses on the exchanges between objects and provides a holistic overview of the
operation of a system.