[PDF] 13 BASIC CONCEPTS OF OOP Over the years many object-





Previous PDF Next PDF



OBJECT ORIENTED PROGRAMMING DIGITAL NOTES

Structure of a C++ program namespace



Object Oriented Programming Using C++

LECTURE NOTES. ON. Object Oriented Programming Using C++. Prepared by. Dr. Subasish Mohapatra. Department of Computer Science and Application.



Introducing to Object-Oriented Programming

Why OOP? JAVA is an OOP language. It means that to write a program in JAVA In these notes we concentrate on Object-Oriented Programming (OOP). Notes.



Object Oriented Programming

Dr. Feza Buzlaca's Lecture Notes Introduction to Object Oriented Programming. ... ?Before the rules of the programming language the programming.



Object Oriented Programming Lecture notes (Java)

Java can be easily extended since it is based on the Object model. Platform independent: Unlike many other programming languages including. C and C++ when Java 



13 BASIC CONCEPTS OF OOP

Over the years many object-oriented programming languages such as C++ Java have come up and are becoming quite popular in the market. The major need for.



LECTURE NOTES ON OBJECT ORIENTED PROGRAMMING

Languages like Java are object oriented. Programming in such a language is called object-oriented programming (OOP) and it allows computer programmers to 



Notes Subject: Object Oriented Programming through C++ (IT-03

Re-usability: objects can be reused in different programs. C++. C++ is an object oriented programming language. It was developed by Bjarne Stroustrup in 1979 at.



Learn C++ Programming Language

Note: A programming language is said to use static typing when type checking is performed during compile-time as opposed to run-time. Object-Oriented 



TutorialsPoint

This reference will take you through simple and practical approaches while learning Java. Programming language. Audience. This tutorial has been prepared for 



Introduction to C++ and Object Oriented Programming - Indico

• Object-oriented programming revolves around abstraction of your problem – Separate what you do from how you do it • Example – PushButton object PushButton is a complicated piece of software – Handling of mouse input drawing of graphics etc Nevertheless you can use a PushButton object and don’t need to know anything about



Introduction to Object-Oriented Programming - Semantic Scholar

Introduction to Object-Oriented Programming Objects and classes Encapsulation and information hiding Mental exercises Classification and exemplification Aggregation and decomposition Generalization and specialization Inheritance Polymorphism and dynamic binding Java an example of an object-oriented programming language Program example



Object Oriented Programming

Object Oriented Programming involves 4 main principles 1 Abstraction 2 Encapsulation 3 Inheritance 4 Polymorphism AbstractionI De nition Abstraction is the mechanism by which objects are given their representation and implementation details are hidden Abstraction is apparent in many areas: IApplication layers (database middle-tier front-end)



LECTURE NOTES ON OBJECT ORIENTED PROGRAMMING THROUGH JAVA - IARE

Object-oriented programming organizes a program around its data (that is objects) and a set of well-defined interfaces to that data An object-oriented program can be characterized as data controlling access to code As you will see by switching the controlling entity to data you can achieve several organizational benefits Procedure



Introduction to Object-Oriented Programming - AAU

Introduction to Object-Oriented Programming Objects and classes Abstract Data Types (ADT) Encapsulation and information hiding Aggregation Inheritance and polymorphism Pure Object-Oriented Languages Five rules [Source: Alan Kay]: Everything in an object A program is a set of objects telling each other what to do by sending messages



Searches related to object oriented programming language pdf notes filetype:pdf

The object-oriented programming (OOP) is a different approach toprogramming and quite suitable for managing large and complex programs Anobject oriented language combines the data to its function or code in such away that access to data is allowed only through its function or code



[PDF] OBJECT ORIENTED PROGRAMMING DIGITAL NOTES - mrcetacin

Structure of a C++ program namespace Data types C++ tokens identifiers variables constants operators control structures loops Overview of C language:



[PDF] Introducing to Object-Oriented Programming

These lecture notes are designed to provide the basic knowledge on OOP that The style of programming in pre-OOP languages and in OOP ones are different



[PDF] Object Oriented Programming Using C++ - CET

LECTURE NOTES ON Object Oriented Programming Using C++ Prepared by Dr Subasish Mohapatra Department of Computer Science and Application



[PDF] Object Oriented Programming - ?TÜ

Object Oriented Programming ?Like any human language a programming language provides a way to express concepts ?Program development involves creating 



CS6456 OBJECT ORIENTED PROGRAMMING LECTURE NOTES

An instance of an object is known as object which represents a real world entity See Full PDF Download PDF See Full PDF



[PDF] USIT201-Object-Oriented-Programmingpdf - Mumbai University

following the syntax (form) and semantics (meaning) of the programming language chosen for writing the program ? There are a variety of programming languages 



[PDF] object oriented programming through java - IARE

LECTURE NOTES ON polymorphism procedural and object oriented programming paradigm: Java programming: Programming in such a language is called



[PDF] Object oriented programming c lecture notes pdf - Squarespace

OOPS IN C++ PDF Notes Programming languages like C++ are frequently used to create a wide range of applications including operating systems games and much 



Object Oriented Programme pdf notes

13 avr 2022 · CHAPTER 3: LANGUAGE STRUCTURES OF OOP Basic Structure of C++ Program; Features of the Object Oriented programming; Header and Source Files 

What are the five rules of pure object-oriented languages?

    Pure Object-Oriented Languages Five rules [source: Alan Kay] •Everything in an object. •A program is a set of objects telling each other what to do by sending messages. •Each object has its own memory (made up by other objects). •Every object has a type.

Is Java an object oriented language?

    Languages like Java are object oriented. Programming in such a language is called object-oriented programming (OOP), and it allows computer programmers to implement an object-oriented design as a working system. Languages like C, on the other hand, are procedural, so programming tends to be action oriented.

What is object oriented programming (OOP)?

    Programming in such a language is called object-oriented programming (OOP), and it allows computer programmers to implement an object-oriented design as a working system. Languages like C, on the other hand, are procedural, so programming tends to be action oriented.

What are the key features of object-oriented programming?

    ?Key feature of object-oriented programming ?Separation of interface from implementation ?It is not possible to access the hidden/encapsulated parts of an object •Aggregation and decomposition ?“has-a” relationship •Generalization and specialization (inheritance) ?“is-a” or “is-like-a” relationship •Polymorpishm/dynamic binding

Computer Science

MODULE - 3Basic Concepts of OOP

270

Programming in C++

Notes 13

BASIC CONCEPTS OF OOP

In the previous lesson you have learnt about the basics of C++ programming. Now you will learn about basic concepts of Object Oriented Programming (OOP). The object-oriented programming (OOP) is a different approach to programming and quite suitable for managing large and complex programs. An object oriented language combines the data to its function or code in such a way that access to data is allowed only through its function or code. In this lesson, you will learn about the various benefits provided by OOP and applications of OOP.

OBJECTIVES

After reading this lesson, you will be able to:

learn the basic concepts used in OOP; describe the various benefits provided by OOP; explain the programming applications of OOP.

13.1 OBJECT ORIENTED PROGRAMMING

The object-oriented programming is a different approach to programming. It has been created with a view to increase programmer's productivity by overcoming the weaknesses found in procedural programming approach. Over the years many object-oriented programming languages such as C++, Java have come up and are becoming quite popular in the market. The major need for developing such languages was to manage the ever-increasing size and complexity of programs.

MODULE - 3

271

Basic Concepts of OOP

Computer Science

Programming in C++

Notes Data

Member function

Data

Member functionData

Member function

Fig: 13.1: Paradigm of OOP

13.1.1 Features of OOPS

The following are the features of object-oriented programming.

Objects

Classes

Data abstraction

Data encapsulation

Inheritance

Polymorphism

Objects

Object is a class variable or an instance of class. It can represent a person, a bank account or any item that a program can handle. When a program is executed, the objects interact by sending messages to one another. For example, if 'customer' and 'account' are two objects in a program, then the customer object may send message to account object requesting for a bank balance. Each object contains data and code to manipulate data. Objects can interact without having to know details of each other's data or code. It is sufficient to know the type of message accepted and the type of response returned by the objects.

MODULE - 3

273

Basic Concepts of OOP

Computer Science

Programming in C++

Notes

Data Abstraction

Abstraction refers to the act of representing essential features without including the background details. To understand this concept more clearly, take an example of 'switch board'. You only press particular switches as per your requirement. You need not know the internal working of these switches. What is happening inside is hidden from you. This is abstraction, where you only know the essential things to operate on switch board without knowing the background details of switch board.

Data Encapsulation

Wrapping up of data and functions into a single unit is called as data encapsulation. Encapsulation is the most basic concept of OOP. It is the way of combining both data and the functions that operate on that data under a single unit. The only way to access the data is provided by the functions (that are combined along with the data). These functions are considered as member functions in C++. It is not possible to access the data directly. If you want to reach the data item in an object, you call a member function in the object. It will read the data item and return the value to you. The data is hidden, so it is considered as safe and far away from accidental alternation. Data and its functions are said to be encapsulated into a single entity. In the Figure 13.4 item is a class which has keep_data as member variable which cannot be accessed from outside directly. It can be accessed only via the member functions set() and get_value().

Member functionsMember variable

keep_dataitem class set ( ) ( ) get_value ( ) ( )

Protection 'wall'Small peep hole

Fig: 13.4: Encapsulated Data and Functions in class item

Modularity

The act of partitioning a program into individual components is called modularity. It gives the following benefits.

It reduces its complexity to some extent.

It creates a number of well-defined, documented boundaries within theprogram. Module is a separate unit in itself. It can be complied independently though it has links with other modules. Modules work quite closely in order to achieve the program's goal.

Computer Science

MODULE - 3Basic Concepts of OOP

274

Programming in C++

Notes

Inheritance

It is a process by which object of one class inherit the properties of objects of another class. It is the capability to define a new class in terms of an existing class. An existing class is known as a base class and the new class is known as derived class. Number of examples can be given on this aspect. For example, a motor cycle is a class in itself. It is also a member of two wheelers class. Two wheelers class in turn is a member of automotive class as shown in Fig. 13.5. The automotive is an example of base class and two wheelers is its derived class. In simple words, we can say a motor cycle is a two wheeler automotive. C++ supports such hierarchical classification of classes. The main benefit from inheritance is that we can build a generic base class, and obtain a new class by adding some new features to an existing class and so on. Every new class defined in that way consists of features of both the classes. Inheritance allows existing classes to be adapted to new application without the need for modification.

Fig: 13.5: Automotive class

Polymorphism

Polymorphism is a key to the power of OOP. It is the concept that supports the capability of data to be processed in more than one form. For example, an operation may exhibit different behavior in different instances. The behavior depends upon the types of data used in the operation. For example let us consider Fig 13.6 the operation of addition. For two numbers, the operation will generate a sum. If the operands are strings then the operation would produce a third string by concatenation.

MODULE - 3

275

Basic Concepts of OOP

Computer Science

Programming in C++

Notes

Numbers = sum e.g. 1 + 2 = 3

ADD

Strings = concatenated string i.e., a + b = ab

Fig: 13.6: Addition operation

INTEXT QUESTIONS 13.1

1. State whether the following statements are true or false:

(a) In procedure-oriented programming all data is shared by all functions. (b) One of the striking features of OOP is division of program into objects that represent real world entities. (c) Wrapping up of data of different types into a single unit is known as encapsulation. (d) Object oriented programs are executed much faster than conventional programs. (e) Since C is a subset of C++, C programs will run under C++ compilers.

13.2 BENEFITS OF OOP

OOP provides lot of benefits to both the program designer and the user. Object- oriented approach helps in solving many problems related to software development and quality of software product. The new technology assures greater programmer productivity, better quality of software and lesser maintenance cost. The major benefits are:

Software complexity can be easily managed.

Object-oriented systems can be easily upgraded.

It is quite easy to partition the work in a project based on objects. Objects created for object oriented program can easily be reused in otherprograms.

Programming Applications of OOP

OOP has become one of the programming buzzwords today. There appears to be a great deal of excitement and interest among software programmers in using OOP. Applications of OOP are gaining importance in many areas. OOP has been extensively used in the development of Windows and word based systems such as MS-Windows, x-Windows etc. The promising application areas of OOP are:

Computer Science

MODULE - 3Basic Concepts of OOP

276

Programming in C++

Notes (i)Multiple uses of data structure: This is an application where the same data structure is used many times. For example a window data structure is used multiple-times in a windowing system. (ii)Data in multiple programs: This is an application where the same operations are performed on a data structure in different programs. For example, record validation in an accounting system. The other application areas of OOP are parallel programming, simulation and modeling, AI and Expert systems, Neural Networks and CAD systems, object- oriented databases.

INTEXT QUESTIONS 13.2

1. Fill in the blanks.

(a) C++ is an .................... language. (b) An .................... is a self contained unit of .................... and function. (c) A .................... can be used to create objects of its own type. (d) .................... is a way of combining data with functions into an object. (e) A derived class can be derived from a .................... class.

2. State whether the following statements are true or false:

(a) C++ is an extension to C programming language. (b) Functions of one object cannot access the functions of other objects in C++ (c) Inheritance is the capability to define a new class in terms of an existing class. (d) Abstraction refers to the act of representing essential features without including the background details. (e) An object is a new data type.

WHAT YOU HAVE LEARNT

Object is a class variable or an instance of a class. Abstraction refers to the act of representing essential features without including the background details.

Data encapsulation is the way of combining both data and the functions thatoperate on that data under a single unit.

MODULE - 3

277

Basic Concepts of OOP

Computer Science

Programming in C++

Notesquotesdbs_dbs20.pdfusesText_26
[PDF] object oriented programming python coursera

[PDF] object oriented programming python data science

[PDF] object oriented programming python exercises

[PDF] object oriented programming python for beginners

[PDF] object oriented programming python interview questions

[PDF] object oriented programming python practice

[PDF] object oriented programming python projects

[PDF] object oriented programming short notes pdf

[PDF] object oriented analysis and design advantages and disadvantages

[PDF] object oriented analysis and design example

[PDF] object oriented analysis and design python

[PDF] object oriented analysis and design with applications 4th edition pdf

[PDF] object oriented approach

[PDF] object oriented design patterns

[PDF] object oriented javascript pdf