Docsity

Object-Oriented Programming: Concepts, UML Diagrams, and Design Patterns, Slides of Information Technology

Partial preview of the text

Download Object-Oriented Programming: Concepts, UML Diagrams, and Design Patterns and more Slides Information Technology in PDF only on Docsity!

ADVANCED

PROGRAMMING

Teacher: Nguyen Hoang Anh Vu

GROUP 4

Gia Bao Quoc Khanh

Thien Thach

GROUP

Tuyet Nhung

MEMBER

Van Hieu

OBJECT-ORIENTATED

PROGRAMMING

Object Oriented Programming (or OOP) is a programming paradigm based on the concept of Class and Object.

It is used to separate a software program into simple, reusable parts.

DEFINITION

DISADVANTAGES:

OOP can cause data to be processed

separately, which means that when the data

structure changes, the algorithm changes

accordingly.

No automatic initialization,

dynamic data release.

It is not possible to describe the

system in reality completely and

truthfully.

EXAMPLE

DIFFERENCE BETWEEN OBJECT AND CLASSDIFFERENCE BETWEEN OBJECT AND CLASSDIFFERENCE BETWEEN OBJECT AND CLASS

A class is a detailed description, definition, and model of an object. But not the same. Furthermore, what we call classes are the building blocks that lead to OOP.

Objects are copies of classes. All data members and member functions of the class are accessible through the object.

POLYMPHISM

Polymorphism is an action that users can perform in many different ways, in simple words polymorphism is a concept. There are many classes that possess the same methods but develop in different ways

ABSTRACTION

ABSTRACTION

Abstraction is the basic tenet of OOP that is generalized, often not paying too much attention to the internals. Therefore, when using, users need to choose the properties and methods of the object in programming

INTERFACE

A interface could be a programming structure/syntax that enables a laptop to impose sure attributes on AN object (class). as an example, for instance we've got a automotive category and a scooter category and a truck category.

CODE DEMO OF INTERFACES

EXAMPLE

Example of Encapsulation

Inheritance is a basic principle that specializes in inheriting data classes,

for example, parent data classes will share information and methods for

child data classes. Thereby subclasses can inherit and add many new

components for themselves.

INHERITANCE