2. Module 1 Lecture 2
â–ş Approaches to Software Design. Functional Oriented Design, Object
Oriented Design, Case Study of Automated Fire Alarm System
â–ş Object Modeling Using Unified Modeling Language. Basic Object
Oriented concepts, UML diagrams, Use case model, Class diagram, Interaction
diagram, Activity diagram, State chart diagram
â–ş Introduction to Java Java programming. Environment and Runtime
Environment, Development Platforms - Standard, Enterprise. Java Virtual
Machine, Java compiler, Bytecode, Java applet Java Buzzwords, Java program
structure, Comments, Garbage Collection, Lexical Issues
3. Basic Object Oriented Concepts
In OOD, implementation of a software is based on the concepts of objects.
This approach is very close to the real-world applications
4. Class & Object
CLASS
â—Ź A class is a blueprint or prototype from
which objects are created
â—Ź A class is a generalized description of an
object. No physical existence.
â—Ź Acts as a type or category.
OBJECT
â—Ź An object is an instance of a class
â—Ź Objects are real-world entities that has
their own state and behavior.
â—Ź An object has physical existence
5. Class & Object
● Let’s take Student as a class. James is an instance / object of the class Student
â—Ź Object has a physical existence while a class is just a logical definition.
State => Variables
Name
RollNo
Behaviors => Functions
setName()
setRollNo()
6. Abstraction
â—Ź Abstraction means displaying only essential information and hiding the internal
details.
â—Ź It is a process of generalizing things at design level.
â—Ź Data abstraction refers to providing only essential information about the data
to the outside world, hiding the background details or implementation.
â—Ź Consider a real-life example of a man driving a car. The man only knows that
pressing the accelerators will increase the speed of the car or applying brakes
will stop the car.
â—Ź All about showing necessary details.
7. Encapsulation
â—Ź The wrapping up of data(variables) and functions (methods) that operates on the data,
into a single unit (called class) is known as encapsulation.
● It is also called "information hiding“, hides the internal representation, or state, of an
object from the outside through access modifies (Private / Public).
â—Ź Hiding unnecessary details, at implementation level.
8. Encapsulation...
• Protection of data from accidental corruption, by means of
access specifiers (Private / Public), it provides security.
• Flexibility and extensibility of the code and reduction in
complexity
• Encapsulation of a class can hide the internal details of how an
object does something
• Encapsulation protects abstraction
10. Inheritance
The capability of a class to derive properties and
characteristics from another class is called Inheritance.
Inheritance is the process by which objects of one
class acquired the properties of objects of another
classes
Base Class : The class whose properties are inherited
by subclass is called Base Class or Super class.
Derived Class : The class that inherits properties from
another class is called Subclass or Derived Class.
11. Inheritance
Reusability: Inheritance supports the concept of “reusability”, i.e. when we want to
create a new class and there is already a class that includes some of the code that
we want, we can derive our new class from the existing class. By doing this, we are
reusing the fields and methods of the existing class.
13. Polymorphism
â—Ź The word polymorphism means having many forms.
â—Ź Refers to a programming language's ability to process objects differently
depending on their data type or class
â—Ź An operation may exhibit different behaviors in different instances. The behavior
depends upon the types of data used in the operation.
â—Ź Ability for objects of different classes related by inheritance to respond differently to
the same member function call
14. Polymorphism...
â—Ź Static polymorphism: the binding between the method call an the method body happens
at the time of compilation and, this binding is known as static binding or early binding
â—Ź Runtime polymorphism or Dynamic Method Dispatch is a process in which a call to an
overridden method is resolved at runtime.
â—Ź Dynamic binding happens when all information needed for a function call cannot be
determined at compile-time
â—Ź In the example, same rotation of steering wheel causes, different mechanical operations,
corresponding to the steering type present in each cars.
â—Ź Brings flexibility to the implementations
15. Association, Composition and Aggregation
Association is relation between two separate
classes which establishes through their
Objects. Association can be one-to-one,
one-to-many, many-to-one, many-to-many.
Aggregation is a special form of
Association where:
It represents Has-A relationship.
It is a unidirectional association
In Aggregation, both the entries can
survive individually.
â—Ź Composition: It represents part-of relationship.
â—Ź In composition, both the entities are dependent
on each other.
â—Ź When there is a composition between two
entities, the composed object cannot exist
without the other entity.
17. References
â—Ź Rajib Mall, Fundamentals of Software Engineering, 4th edition, PHI, 2014.
â—Ź GeeksforGeeks - www.geeksforgeeks.org
â—Ź Wikipedia - www.wikipedia.org
â—Ź Tutorialspoint - www.tutorialspoint.com
â—Ź Disclaimer - This document contains images/texts from various internet
sources. Copyright belongs to the respective content creators. Document is
compiled exclusively for study purpose and shall not be used for commercial
purpose.