Professional Documents
Culture Documents
Oosd Notes Unit-1
Oosd Notes Unit-1
Oosd Notes Unit-1
UNIT – 1
The dictionary meaning of the object is an article or entity that exists in the
real world.
Classes are user-defined data types that act as the blueprint for
individual objects, attributes and methods.
Objects are instances of a class created with specifically defined
data. Objects can correspond to real-world objects or an abstract
entity. When class is defined initially, the description is the only
object that is defined.
Methods are functions that are defined inside a class that
describe the behaviors of an object. Each method contained in
class definitions starts with a reference to an instance object.
Additionally, the subroutines contained in an object are called
instance methods. Programmers use methods for reusability or
keeping functionality encapsulated inside one object at a time.
Attributes are defined in the class template and represent the state
of an object. Objects will have data stored in the attributes field.
Class attributes belong to the class itself.
o Abstraction
o Encapsulation
o Inheritance
o Polymorphism
Encapsulation :
Information Hiding :
This concept is also often used to hide the internal representation
or state , of an object from the outside this is called information
hiding.
The of these details results is an abstraction which reduces the
external complexity and make the object or function easier to use.
Abstraction :
Polymorphism :
The word polymorphism means having many forms.
In simple words, we can define polymorphism as the ability of a
message to be displayed in more than one form.
For example, A person at the same time can have different
characteristics. Like a man at the same time is a father, a husband, an
employee. So the same person posses different behavior in different
situations. This is called polymorphism.
There are two types of polymorphisms :
1.) Method Overloading :
Whenever class contain more than one method with same name
and different types of parameter called overloading.
2.) Method Overriding :
When we writing method name with same signature in parent
and child class called method overriding .
Without inheritance do not perform method overriding.
Inheritance:
Types Of Inheritance :
1. Single inheritance
In single inheritance, one class inherits from only one parent class. This
is also called simple inheritance because it’s the simplest type of
inheritance you can use.
A class which contain one base class and only one derived class.
2. Multilevel Inheritance:
A class which contains only one base class and only multiple derived
class.
3. Multiple Inheritance:
A class which contains more than one base class and only one derived
class.
4. Hierarchical Inheritance:
A class which contains only one base class and multiple derived class
But each derived class can access base class.
5. Hybrid Inheritance :
H.I is a combination of more than one type of inheritance.
Generosity :
It is a process that allows a function or a class to work with
different – different data types (That type of function is called
template function)
Modeling :
The right models will highlight the most critical development problems.
Wrong models will mislead you, causing you to focus on irrelevant issues.
For Example: We can use different types of diagrams for different phases in
software development.
2. Every model may be expressed at different levels of precision
For Example,
If you are building a high rise, sometimes you need a 30,000-foot view for
instance, to help your investors visualize its look and feel.
Other times, you need to get down to the level of the studs for instance,
when there's a tricky pipe run or an unusual structural element.
3. The best models are connected to reality
All models simplify reality and a good model reflects important key
characteristics.
4. No single model is sufficient
Every non-trivial system is best approached through a small set of nearly
independent models. Create models that can be built and studied separately, but
are still interrelated. In the case of a building:
Importance of Modeling
UML was created by the Object Management Group (OMG) and UML
1.0 specification draft was proposed to the OMG in January 1997.
Things
Relationships
Diagram
Things
Structural
Behavioral
Grouping
Annotational
Structural Things
Structural things define the static part of the model. They represent
the physical and conceptual elements. Following are the brief
descriptions of the structural things.
Grouping Things
Annotational Things
Relationship
1. Dependency
2.Association
3.Generalization
Diagrams
UML diagrams are the ultimate output of the entire discussion. All
the elements, relationships are used to make a complete UML
diagram and the diagram represents a system.
The visual effect of the UML diagram is the most important part of
the entire process. All the other elements are used to make it
complete.
UML includes the following nine diagrams, the details of which are
described in the subsequent chapters.
Class diagram
Object diagram
Use case diagram
Sequence diagram
Collaboration diagram
Activity diagram
Statechart diagram
Deployment diagram
Component diagram
Architecture Of UML :
Any real-world system is used by different users. The users can be
developers, testers, business people, analysts, and many more.
Design
Implementation
Process
Deployment
The center is the Use Case view which connects all these four. A Use
Case represents the functionality of the system. Hence, other
perspectives are connected with use case.
Process defines the flow of the system. Hence, the same elements as
used in Design are also used to support this perspective.
Phase of OMT
1. Analysis –
Analysis is the first phase of OMT methodology. The aim of
analysis phase is to build a model of the real world situation to
show its important properties and domain.