Object oriented programming Concepts

Similar documents
Object-Oriented Programming in C++/Handout 01 Page 1 of 8

1. Write two major differences between Object-oriented programming and procedural programming?

Elementary Concepts of Object Class

BASIC CONCEPT OF OOP

OBJECT ORIENTED PROGRAMMING

Object-Oriented Programming Concepts

Unit - IV CHAPTER - 13 INTRODUCTION TO OOP WITH C++ Part 1 Choose the best answer

Object Oriented Programming. Michał Bereta

Chapter3: Introduction to Classes and Objects


CHAPTER 5 GENERAL OOP CONCEPTS

Object Oriented Programming

Object Oriented Programming in Java. Jaanus Pöial, PhD Tallinn, Estonia

Classwide Programming 1

Chapter 2: Java OOP I

Object Oriented Programming. C++ 6 th Sem, A Div Ms. Mouna M. Naravani

What are the characteristics of Object Oriented programming language?

9/21/2010. Based on Chapter 2 in Advanced Programming Using Visual Basic.NET by Bradley and Millspaugh

Object-Oriented Programming Paradigm

CSCI 253. Outline. Background. George Blankenship 1

Object Orientated Analysis and Design. Benjamin Kenwright

Object-Oriented Concepts and Principles (Adapted from Dr. Osman Balci)

Overview. OOP: model, map, reuse, extend. Examples of objects. Introduction to Object Oriented Design

Classes, objects, methods and properties

Software Development. Modular Design and Algorithm Analysis

OOPS Viva Questions. Object is termed as an instance of a class, and it has its own state, behavior and identity.

modeling essential properties treat what and how independently building complex structures from simpler ones identifying common elements

Design Strategies in OO Development

Programmazione. Prof. Marco Bertini

Objects and Classes. Amirishetty Anjan Kumar. November 27, Computer Science and Engineering Indian Institue of Technology Bombay

What is a Programming Paradigm

Object Oriented Programming

Data Structures (list, dictionary, tuples, sets, strings)

Chapter No. 2 Class modeling CO:-Sketch Class,object models using fundamental relationships Contents 2.1 Object and Class Concepts (12M) Objects,

The Basics. Concepts of Class and Object

C++ Programming: Introduction to C++ and OOP (Object Oriented Programming)

Overview of OOP. Dr. Zhang COSC 1436 Summer, /18/2017

Java OOP (SE Tutorials: Learning the Java Language Trail : Object-Oriented Programming Concepts Lesson )

Data Structures. Data structures. Data structures. What is a data structure? Simple answer: a collection of data equipped with some operations.

Inheritance and Polymorphism

CMSC201 Computer Science I for Majors

CS304 Object Oriented Programming Final Term

Chapter 5. Inheritance

ENCAPSULATION. private, public, scope and visibility rules. packages and package level access.

System Analysis and Design/ Object-Oriented System Modeling

Chapter 5 Object-Oriented Programming

Classes, Objects, and OOP in Java. June 16, 2017

Government Polytechnic, Muzaffarpur. Name of the Lab: OBJECT ORIENTED PROGRAMMING

Microsoft Visual Basic 2005: Reloaded

Software Architecture (Lesson 2) Object-Oriented Paradigm (1)

Objective-C: An Introduction (pt 1) Tennessee Valley Apple Developers Saturday CodeJam July 24, 2010 August 7, 2010

A201 Object Oriented Programming with Visual Basic.Net

Programming II (CS300)

Introduction and Review of Java: Part 2

Object-Oriented Programming (OOP) Fundamental Principles of OOP

CREATED BY: Muhammad Bilal Arslan Ahmad Shaad. JAVA Chapter No 5. Instructor: Muhammad Naveed

Fundamental Concepts (Principles) of Object Oriented Programming These slides are based on:

Chapter 12 Object-Oriented Programming. Starting Out with Games & Graphics in C++ Tony Gaddis

Principles of Object Oriented Programming. Lecture 4

VB.NET. Exercise 1: Creating Your First Application in Visual Basic.NET

SEEM4570 System Design and Implementation. Lecture 11 From Design to Implementation

UML IB Computer Science. Content developed by Dartford Grammar School Computer Science Department

Introduction to Object-Oriented Programming

C++ Important Questions with Answers

Paytm Programming Sample paper: 1) A copy constructor is called. a. when an object is returned by value

Object Oriented Programming is a programming method that combines: Advantage of Object Oriented Programming

What is Inheritance?

JAVA: A Primer. By: Amrita Rajagopal

Introduction to OOP. Procedural Programming sequence of statements to solve a problem.

Oops known as object-oriented programming language system is the main feature of C# which further support the major features of oops including:

The 10 Minute Guide to Object Oriented Programming

CSC207H: Software Design. Java + OOP. CSC207 Winter 2018

Inheritance and Polymorphism

Java Basics. Object Orientated Programming in Java. Benjamin Kenwright

Object-Oriented Programming. Objects. Objects. Objects

COMSC-051 Java Programming Part 1. Part-Time Instructor: Joenil Mistal

Inheritance (Outsource: )

Computer Science II. OO Programming Classes Scott C Johnson Rochester Institute of Technology

Object-oriented. Service Innovation

STUDENT LESSON A20 Inheritance, Polymorphism, and Abstract Classes

Microsoft Visual Basic 2005: Reloaded

Advantages of Object Oriented Programming :- Features of Object Oriented Programming :- Advantages Of Object Oriented Programming :

Unit 1 : Principles of object oriented programming

A STUDY OF OBJECT ORIENTED ANALYSIS AND DESIGN

Chapter 5: Classes and Objects in Depth. Information Hiding

Object Oriented Concepts. Produced by. Introduction to the Java Programming Language. Eamonn de Leastar

Abstraction. Abstraction

Programming II (CS300)

Day 4. COMP1006/1406 Summer M. Jason Hinek Carleton University

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University

M Introduction to Visual Basic.NET Programming with Microsoft.NET 5 Day Course

Basics of Object Oriented Programming. Visit for more.

Java is an Object Oriented Language. As a language that has the Object Oriented feature Java supports the following fundamental concepts:

CSIT 2008 June 28, 2008 Anita Verno, Bergen Community College,

OVERRIDING. 7/11/2015 Budditha Hettige 82

Object Oriented Programming using C++

Why C++? C vs. C Design goals of C++ C vs. C++ - 2

Object Model. Object Orientated Analysis and Design. Benjamin Kenwright

Object-Oriented Languages and Object-Oriented Design. Ghezzi&Jazayeri: OO Languages 1

Chapter 15: Object Oriented Programming

Transcription:

Object oriented programming Concepts Naresh Proddaturi 09/10/2012 Naresh Proddaturi 1

Problems with Procedural language Data is accessible to all functions It views a program as a series of steps to be carried out 09/10/2012 Naresh Proddaturi 2

OOP offers OOP is a way of organizing programs. OOP programs are organized around objects, which contain both data and functions that act on that data. 09/10/2012 Naresh Proddaturi 3

Object and Encapsulation The fundamental idea behind object-oriented languages is to combine both data and the functions that operate on that data into a single unit called an object. You can t access the data directly. The data is hidden, so it is safe from accidental alteration. Data and its functions are said to be encapsulated into a single entity. (encapsulation). No other functions can access the data. Calling an object s member function is referred to as sending a message to the object. 09/10/2012 Naresh Proddaturi 4

Characteristics of Object- Oriented Languages Objects: in an object-oriented language problem will be divided into objects. These relate to objects in real world. Class:A class is thus a description of a number of similar objects. A class serves as a plan, or blueprint. It specifies what data and what methods will be included in objects of that class. An object is often called an instance of a class. 09/10/2012 Naresh Proddaturi 5

A class and its objects Class is a template Object is a example of a class 09/10/2012 Naresh Proddaturi 6

Inheritance Inheritance allows a class to be derived from an existing class without modifying it. The derived class has all the data and functions of the parent class, but adds new ones of its own. 09/10/2012 Naresh Proddaturi 7

Reusability Reusability: Once a class has been written, created, and debugged, it can be distributed to other programmers for use in their own programs. This is called reusability. In OOPS an existing class can be used without modifying it and add additional features and capabilities to it.this is done by deriving a new class from the existing one. The new class will inherit the capabilities of the old one, but is free to add new features of its own. Reusability is using a class over and over in different programs. The ease with which existing software can be reused is an important benefit of OOP. 09/10/2012 Naresh Proddaturi 8

Polymorphism and Overloading Using operators or functions in different ways, depending on what they are operating on, is called polymorphism (one thing with several distinct forms). When an existing operator, such as + or =, is given the capability to operate on a new data type, it is said to be overloaded. Overloading is a kind of polymorphism. 09/10/2012 Naresh Proddaturi 9

Encapsulation, Discrete, Abstract classes & Data Abstraction Declaring member variables as private or protected is known as encapsulation or data hiding objects are discrete entities and that we communicate with them by calling their member functions Some classes are designed specifically to be inherited by other sub classes and objects of such classes cannot be directly instantiated. These classes are called Abstract Classes. Data Abstraction is hiding of implementation details so that classes are protected from unintentional user errors. 09/10/2012 Naresh Proddaturi 10

Interface An interface allows us to define the behaviours of a class without having to worry about how it will be achieved 09/10/2012 Naresh Proddaturi 11

Modularity Modularity is a software engineering approach where a programmed solution consists of a number of self-contained-but connected-parcels of code called modules. 09/10/2012 Naresh Proddaturi 12

message passing A member function call is one implementation of passing a message. Message passing is a different way of handling the need in OO code for one object to get another object (or potentially itself) to do something. When objects need to interact with each other, they pass information to one another. This interaction is known as message passing. 09/10/2012 Naresh Proddaturi 13

Identifying methods and properties Class Identify the Actions Identify the Attributes Examples Dog 09/10/2012 Naresh Proddaturi 14

OOP: Dog Methods (actions) Wag tail Bark Poo run Properties (Attributes ) Breed age 09/10/2012 Naresh Proddaturi 15

TASK Identify Methods and Properties of a class Animal Car Person Boiler 09/10/2012 Naresh Proddaturi 16

References Java Complete reference-herbert Schildt www.java.com http://docs.oracle.com/javase/tutorial/index.html http://netbeans.org/ 09/10/2012 Naresh Proddaturi 17