C++ Unit-1 Notes
C++ Unit-1 Notes
Object-Oriented Analysis:
While OOAD practices have been around for a number of decades, the core
ideas and techniques were largely cemented in the collective mind of the
development community in the 1990s. An assortment of practitioners and
authorities in the industry, working together and on solo endeavors, began to
publish a number of books, articles, and techniques that all relied heavily
on OOAD concepts. Some of these publications and methodologies are still
well-known and in use today, including the Unified Modeling Language and
the Rational Unified Process.
Object modelling develops the static structure of the software system in terms of
objects. It identifies the objects, the classes into which the objects can be
grouped into and the relationships between the objects. It also identifies the
main attributes and operations that characterize each class.
Object-oriented modelling (OOM) is a common approach to modelling
applications, systems, and business domains by using the object-oriented
paradigm throughout the entire development life cycles. OOM is a main
technique heavily used by both OOD and OOA activities in modern software
engineering.
Object-oriented modelling typically divides into two aspects of work: the
modelling of dynamic behaviours like business processes and use cases, and the
modelling of static structures like classes and components. OOA and OOD are
the two distinct abstract levels (i.e. the analysis level and the design level)
during OOM. The Unified Modelling Language (UML) and SysML are the two
popular international standard languages used for object-oriented modelling.
The benefits of OOM are:
They developed from classical systems analysis of the 1960s and 1970s
structured analysis structured design (SA/SD) approach, with all the models
most physicists are used: data flow diagrams, algorithmic decomposition, flow
charts, top down module hierarchical tree. SA/SD puts the emphasis on
decomposing a system as a set of processes and the set of data they manage, and
their mutual dependencies. Hence, it focuses upon and exposes the structure of
data and the implementation details of the processes that manipulate it, exactly
those parts that in a complex software environment are most subject to changes
for improvement. Indeed most of the effort spent is in trying to achieve first the
most stable data structures, then the hierarchical tree of processes that mutually
exchange them. Unfortunately, once defined the data, processes are so tightly
depending on data structures to become difficult to improve, if not to simply
modify, and the knowledge of data structures is so deep in the fabric of the
system to discourage any evolution, even when major improvements would then
be achievable. In facts, the modules that express the relevant abstractions
depend upon the modules that contain the irrelevant details! From this derives
that when changes are made to the details, the abstractions are affected.
In SA/SD, the top-down tree of the structured program expresses also the chain
of dependencies from the more abstract modules at the top (closer to the
problem domain) to the more detailed ones at the bottom: purely
implementation concerned (solution domain) modules. Therefore, if we attempt
to reuse one of those abstractions we must carry along all the details that those
abstractions depend upon (the traditional reuse). It is not an exaggeration to say
that every experiment in HEP has faced these and similar problems during its
life time.
DIFFERENCES BETWEEN STRUCTURED ANALYSIS AND
OBJECT ORIENTED ANALYSIS
Object oriented analysis design (OOAD) is basically a bottom up approach
which supports viewing the system as a set of components (objects) that can be
logically kept together to form the system.
Advantages:
The other main advantage of object oriented (OO) is the focus on data
relationships. You cannot develop a successful system where data relationships
are not well understood. An OO model provides all of the insight of an ER
diagram and contains additional information related to the methods to be
performed on the data.
Disadvantages:
You know that OO methods only build functional models within the objects.
There is no place in the methodology to build a complete functional model.
While this is not a problem for some applications (e.g., building a software
toolset), but for large systems, it can lead to missed requirements. You will see
in Unit 3 of this course. “Use cases” addresses this problem, but since all use
cases cannot be developed, it is still possible to miss requirements until late in
the development cycle.
The object oriented (OO) analysis design itself does not provide support for
identifying which objects will generate an optimal system design. Specifically,
there is no single diagram that shows all of the interfaces between objects. You
will study object oriented analysis design (OOAD) diagrams in Unit 3 of this
course. As you know, coupling is a major factor in system complexity, not
having this information makes architecture component selection a hit or miss
proposition.
With experience, you will come to know that most customers understand
structured methods better than object oriented (OO) methods. Since one of the
main reasons of modeling a system is for communication with customers and
users, there is an advantage in providing structured models for information
exchange with user groups or customers.
This step basically means all the three models, functional, object and dynamic
must be combined so as to know what operations are to be performed on
objects. We can make a state diagram describing the life history of an object. A
transition is a change of state of object and it maps into an operation on the
object. It helps in visualizing state changes. We can associate an operation with
each event received by an object. Also, sometimes an event may represent an
operation on another objects i.e., where one event triggers another event. Thus,
in this case, the event pair must be mapped into an operation performing action
and returning control, provided that the events are on a single thread of control
passing from object to object.
To implement software control the designer must redesign the strategy of the
state event model that is present in the dynamic model. Generally, there are
three basic approaches to implement the dynamic model. These approaches are:
5) Adjustment of inheritance
6) Design of associations
During the object design phase we must make a strategy to implement the
associations. Association can be unidirectional or bi-directional. Whichever
implementation strategy we choose, we should hide the implementation, using
access operations to traverse and update the associations. This will allow us to
change our decision with minimal effort. The designer should:
Programs are made of discrete physical units that can be edited, complied,
imported or otherwise manipulated. The careful partitioning of an
implementation into package is important for group work on a program.
Packaging involves the following issues:
a. Information hiding
b. Collection of entities
c. Constructing physical modules with strong coupling within each module.