Unit1 1
Unit1 1
Design
• ?
• Where we used OOSD
• And how it is implemented using
C++
UNIT 1
Introduction: The meaning of Object Orientation, object identity, Encapsulation, information hiding, polymorphism,
generosity, importance of modelling, principles of modelling, object oriented modelling, Introduction to UML,
conceptual model of the UML, Architecture.
UNIT 2
Basic Structural Modeling: Classes, Relationships, common Mechanisms, and diagrams. Class &Object Diagrams:
Terms, concepts, modelling techniques for Class & Object Diagrams. Collaboration Diagrams: Terms, Concepts,
depicting a message, polymorphism in collaboration Diagrams, iterated messages, use of self in messages. Sequence
Diagrams: Terms, concepts, depicting asynchronous messages with/without priority, call-back mechanism, broadcast
messages.
Basic Behavioural Modeling: Use cases, Use case Diagrams, Activity Diagrams, State Machine, Process and thread,
Event and signals, Time diagram, interaction diagram, Package diagram.
Architectural Modeling: Component, Deployment, Component diagrams and Deployment diagrams.
UNIT 3
Object Oriented Analysis: Object oriented design, Object design, combining three models, Designing
algorithms, design optimization, Implementation of control, Adjustment of inheritance, Object
representation, Physical packaging, Documenting design considerations. Structured analysis and
structured design (SA/SD), Jackson Structured Development (JSD).
Mapping object-oriented concepts using non-object-oriented language, translating classes into data
structures, passing arguments to methods, Implementing inheritance, associations encapsulation.
Object oriented programming style: reusability, extensibility, robustness, programming in the large.
Procedural v/s OOP, Object oriented language features. Abstraction and Encapsulation
UNIT 4
C++ Basics: Overview, Program structure, namespace, identifiers, variables, constants, enum,
operators, typecasting, control structures
C++ Functions: Simple functions, Call and Return by reference, Inline functions, Macro Vs. Inline
functions, Overloading of functions, default arguments, friend functions, virtual functions
UNIT 5
Objects and Classes: Basics of object and class in C++, Private and public members, static data and
function members, constructors and their types, destructors, operator overloading, type conversion.
Inheritance: Concept of Inheritance, types of inheritance: single, multiple, multilevel, hierarchical,
hybrid, protected members, overriding, virtual base class. Polymorphism: Pointers in C++, Pointes
and Objects, this pointer, virtual and pure virtual functions, Implementing polymorphism
• Lecture Objectives
• To understand basic definitions and types of Object
Orientation.
• To understand design techniques, types, UML, C++
OOPS.
• Learn to implement class/Object in C++.
• Lecture Outcomes
• Students will be able to identify and describe
different problem design.
• Students will be able to explain solution and visual
representation of real world problems
• Students will be able to implement simple problem
with oops concept in C++ language.
Lecture 1
Introduction to Object Orientation
Object orientation, or object-oriented programming (OOP), is a
programming model that organizes software design around
objects, which are data fields with unique attributes and
behavior.
In OOP, programs are made up of objects that interact with
each other, and each object can contain data and code
What is Object Orientation?
• In the past, information systems used to be defined
primarily by their functions: data and functions were kept
separate and associated using input and output
relations.
• The object-oriented approach, however, focuses on
objects that represent abstract or concrete things in the
real world. These objects are first defined by their
character and their properties, which are represented by
their internal structure and their attributes (data). The
behavior of these objects is described by methods
(functions).
• Objects form a capsule, which combines the
characteristics with behavior. Objects are intended to
enable programmers to map a real problem and its
proposed software solution on a one-to-one basis.
• SAP ABAP Full Form is : ABAP stands for “Advanced
Business Application Programming.
• Typical objects in a business environment are, for
example, 'Customer', 'Order', or 'Invoice'. From Release
3.1 onwards, Business Object Repository (BOR) of SAP
Web Application Server ABAP has contained examples
of such objects. The BOR object model will be integrated
into ABAP Objects in the next release by migrating the
BOR object types to the ABAP class library.
• Objects
Objects are instances of classes. They contain data
and provides services. The data forms the attributes
of the object. The services are known as methods
(also known as operations or functions). Typically,
methods operate on private data (the attributes, or
state of the object), which is only visible to the
methods of the object. Thus the attributes of an
object cannot be changed directly by the user, but
only by the methods of the object. This guarantees
the internal consistency of the object.
• Classes
Classes describe objects. From a technical point
of view, objects are runtime instances of a class.
In theory, you can create any number of objects
based on a single class. Each instance (object)
of a class has a unique identity and its own set
of values for its attributes.
• Object References
In a program, you identify and address objects
using unique object references. Object
references allow you to access the attributes
and methods of an object.
In object-oriented programming, objects usually
have the following properties:
• Encapsulation
Objects restrict the visibility of their resources
(attributes and methods) to other users. Every
object has an interface, which determines how
other objects can interact with it. The
implementation of the object is encapsulated,
that is, invisible outside the object itself.
• Inheritance
You can use an existing class to derive a new
class. Derived classes inherit the data and
methods of the superclass. However, they can
overwrite existing methods, and also add new
ones.
• Polymorphism
Identical (identically named) methods behave
differently in different classes. In ABAP Objects,
polymorphism is implemented by redefining
methods during inheritance and by using
constructs called interfaces.
Uses of Object Orientation
Below are some of the advantages of object-oriented programming:
• Complex software systems become easier to understand, since object-
oriented structuring provides a closer representation of reality than other
programming techniques.
• In a well-designed object-oriented system, it should be possible to
implement changes at class level, without having to make alterations at
other points in the system. This reduces the overall amount of
maintenance required.
• Using polymorphism and inheritance, object-oriented programming
allows you to reuse individual components.
• In an object-oriented system, the amount of work involved in revising and
maintaining the system is reduced, since many problems can be
detected and corrected in the design phase.
Achieving these goals requires:
• Object-oriented programming languages
Object-oriented programming techniques do not necessarily depend on object-oriented
programming languages. However, the efficiency of object-oriented programming depends
directly on how object-oriented language techniques are implemented in the system kernel.
• Object-oriented tools
Object-oriented tools allow you to create object-oriented programs in object-oriented
languages. They allow you to model and store development objects and the relationships
between them.
• Object-oriented modelling
The object-orientation modeling of a software system is the most important, most
time-consuming, and most difficult requirement for attaining the above goals.
Object-oriented design involves more than just object-oriented programming, and
provides logical advantages that are independent of the actual implementation.
Class Overview
In the above diagram
• The left-hand side of the illustration shows the declaration and
implementation parts of a local class C1. The right-hand side
illustrates the structure of the class with the components in their
respective visibility areas, and the implementation of the methods.
• The public components of the class form the interface between the
class and its users. The protected components are an interface to
the subclasses of C1. The private components are not visible
externally, and are fully encapsulated in the class. The methods in
the implementation part have unrestricted access to all components
of the class.
Object Overview
• The above illustration shows a class C1 on the left, with
its instances represented in the internal session of an
ABAP program on the right. To distinguish them from
classes, instances are drawn with rounded corners. The
instance names above use the same notation as is used
for reference variables in the Debugger.
Inheritance
• The left-hand part of the graphic shows how you can derive a
subclass c2 from a superclass c1 using the INHERTINGFROM
addition in the CLASS statement. The right-hand part of the graphic
shows the distribution of the subclass in the inheritance tree, which
stretches back to the default empty class OBJECT. A subclass
contains all of the components declared above it in the inheritance
tree, and can address all of them that are declared public or
protected.
– Class;
Object
– Component Interaction Diagrams
– Deployment
– Composite Structure
– Package
– Sequence;
Behavioral Diagrams Communication
Use case
– Interaction Overview
Statechart – Timing
Activity
44
Type of UML Diagram
Class Diagrams
Structural Diagrams
– Class;
Object
– Component
– Deployment
– Composite Structure
– Package
47
THANK YOU