• Tidak ada hasil yang ditemukan

Lecture-03 BCS-503: Object Oriented Techniques

N/A
N/A
Protected

Academic year: 2024

Membagikan "Lecture-03 BCS-503: Object Oriented Techniques"

Copied!
18
0
0

Teks penuh

(1)

Preeti Singh

Computer Science & Engineering

Lecture-03

BCS-503: Object Oriented Techniques

(2)

OBJECTIVES

In this PPT, you will learn to:

Explain Object-Oriented Concepts

Role of Object-Oriented Analysis and Design (OOAD) in SDLC

(3)

What is Object-Oriented Concepts

In the design phase, there are two approaches to software development:

1. Function-oriented approach

 Is module-centric and concentrates on functions of the software.

2. Object-oriented approach

Portrays things as they exist in the real world.

Introduces the concept of inheritance which allows reuse of existing code components.

Supports inheritance, reusability and encapsulation of data, abstraction, and polymorphism.

(4)

OVERVIEW OF OBJECT-ORIENTED CONCEPTS

Classes and Objects

 A class is an abstract data type that contains a set of attributes and functions.

 An object is an instance of a class.

(5)

Inheritance

Inheritance refers to sharing of attributes and behaviors among classes based upon hierarchical relationship.

The inheritance feature allows you to define a new class by extending an existing class.

The original class is called a base class and the new class obtained through inheritance is called a derived class or sub calss.

(6)

OVERVIEW OF OBJECT-ORIENTED CONCEPTS (Contd.)

Abstraction

Abstraction focuses on essential, inherent aspects of an entity ignoring its implementation details.

An abstract class specifies the abstract operation but does not include its implementation.

The implementation is provided in the derived classes of the abstract class.

(7)

Encapsulation

 Encapsulation means preventing access to non-essential details.

 Encapsulation is also called information hiding because it involves hiding attributes and operations of a class from other classes

(8)

OVERVIEW OF OBJECT-ORIENTED CONCEPTS (Contd.)

Polymorphism

 Polymorphism is the concept of using operators or functions in different ways depending on what they are operating on.

 Using operators in different ways depending on what they are operating on is called operator overloading.

 Using functions in different ways is called function overloading.

(9)

Example of Object-Oriented Concept

Countryside Markets has no formal system to store its employees information. The organization now wants to store detailed information about its employees, such as name, age, date of birth, e-mail id, department, employee code, salary drawn, and date of joining.

(10)

OVERVIEW OF OBJECT-ORIENTED CONCEPTS (Contd.)

Countryside Markets class hierarchy

(11)

Role of Object-Oriented Analysis and Design (OOAD) in SDLC

 Object-Oriented approach does not replace the standard approaches, such as Data Flow Diagrams (DFD) or Entity Relationship (ER) diagrams. It is only an addition to the existing toolkit.

 OOAD uses the Object-Oriented approach to solve the real world problems. It uses Object-Oriented approach to analyze the system requirements and break a large and complex system into smaller and simpler components.

 OOAD is analysis of requirements and design of software system in terms of the objects, classes, encapsulation, inheritance, polymorphism, abstraction, and dynamic binding.

 OOAD is a methodology that can be applied to linear, iterative, or incremental approach.

(12)

REFERENCES

1. James Rumbaughet. al, "Object Oriented Modeling and Design", PHI

2. Grady Booch, James Rumbaugh, Ivar Jacobson, "The Unified Modeling Language User Guide", Pearson Education 3. Naughton, Schildt, "The Complete Reference JAVA2", TMH

4. Mark Priestley "Practical Object-Oriented Design with UML", TMH

5. Booch, Maksimchuk, Engle, Young, Conallen and Houstan, "Object Oriented Analysis and Design with Applications", Pearson Education

6. Pandey, Tiwari, " Object Oriented Programming with JAVA" , Acme Learning 7. https://www.javatpoint.com/java-tutorial

8. https://www.tutorialspoint.com/java/index.htm

9. https://www.tutorialspoint.com/object_oriented_analysis_design/index.htm 10. https://www.slideshare.net/niitstudentcare/

(13)

Multiple Choice Question:

Q1. If the objects focus on the problem domain, then we are concerned with ______.

a) Object Oriented Analysis b) Object Oriented Design

c) Object Oriented Analysis and Design d) None of the above

(14)

MULTIPLE CHOICE QUESTION

Multiple Choice Question:

Q2. The feature of the object oriented paradigm which helps code reuse is _______ . a) Object

b) Class c) Inheritance d) Aggregation.

(15)

Multiple Choice Question:

Q3. In OOD, the attributes(data variables) and methods( operation on the data) are bundled together is called _______ .

a) Classes b) Objects

c) Encapsulation d) Inheritance

(16)

MULTIPLE CHOICE QUESTION

Multiple Choice Question:

Q4. OOD languages provide a mechanism where methods performing similar tasks but vary in arguments, and that can be assigned to the same name is called _____ .

a) Classes b) Object

c) Polymorphism d) Encapsulation

(17)

Multiple Choice Question:

Q5. Which of the following is a technique for hiding the internal implementation details of an object?

a) Abstraction b) Encapsulation c) Inheritance d) Polymorphism

(18)

Summary

In this PPT, you learned that:

 The function-oriented approach is module-centric and concentrates on the functions of the software.

 The object-oriented (OO) approach supports reusability and encapsulation of data and concepts such as inheritance, abstraction, and polymorphism.

 OOAD is analysis of requirements and design of software system in terms of objects, classes, encapsulation, inheritance, polymorphism, abstraction, and dynamic binding.

Referensi

Dokumen terkait

Modules thus provide a perfect way to allow objects of different classes to play a common role using a single set of code.. When an object includes a module, the methods defined

In this section, we’ll walk through a simple but practical example of how to create a workable framework using inheritance, abstract classes, interfaces, and composition.

Classes and instances „ Chris knows how to h F d Instances of class Florist communicate with Fred „ If Chris comes across other florists – instances of the same class as Fred –

When a base pointer points to a derived object that contains a virtual function and that virtual function is called through that pointer, C++ determines which version of that function

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

• Analyse a requirements description • Identify items outside scope of system • Identify candidate classes, attributes and methods • Document the resulting Object Oriented

Specif- ically, the design models comprise: – an object interaction graph for each system operation of the interface model, that records how functionality is distributed among objects;

Our software development approach is based on PROOF and how the features of PROOF are used in our approach will be discussed in detail in the following sections: The Design Process T