OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.

Slides:



Advertisements
Similar presentations
Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
Advertisements

Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
1 OBJECT-ORIENTED CONCEPTS. 2 What is an object?  An object is a software entity that mirrors the real world in some way.  A software object in OOP.
Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
Chapter 10 Introduction to Objects and Classess 1.
1 CIS601: Object-Oriented Programming in C++ Note: CIS 601 notes were originally developed by H. Zhu for NJIT DL Program. The notes were subsequently revised.
Introduction To System Analysis and Design
Object-oriented Programming Concepts
1 Introduction to C++ Programming Concept Basic C++ C++ Extension from C.
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
INTRODUCTION TO JAVA PROGRAMMING Chapter 1. What is Computer Programming?
C++ fundamentals.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
BACS 287 Basics of Object-Oriented Programming 1.
Introduction To System Analysis and design
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
Object Orientation An Object oriented approach views systems and programs as a collection of interacting objects. An object is a thing in a computer system.
Introduction to Object-oriented programming and software development Lecture 1.
CSM-Java Programming-I Spring,2005 Objects and Classes Overview Lesson - 1.
An Object-Oriented Approach to Programming Logic and Design
OBJECT ORIENTED PROGRAMMING CONCEPTS ISC 560. Object-oriented Concepts  Objects – things names with nouns  Classes – classifications (groups) of similar.
Object Oriented Programming CS160 - OOP. Objects Objects are a Objects are a way to organize and conceptualize a program as a set of interacting objects.
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
Introduction To System Analysis and Design
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
© S Ramakrishnan, Monash University oops1.ppt 1 Object-Oriented Programming Systems SFT3021 Semester Lecturer: Sita Ramakrishnan
Object-Oriented Programming (OOP) CSC-2071 (3+1=4 Credits) Lecture No. 1 MBY.
Guided Notes Ch. 9 ADT and Modules Ch. 10 Object-Oriented Programming PHP support for OOP and Assignment 4 Term project proposal C++ and Java Designer.
1 Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill Chapter 2: Object Basics Object-Oriented Systems Development Using the Unified Modeling.
Object Oriented Programming Principles Lecturer: Kalamullah Ramli Electrical Engineering Dept. University of Indonesia Session-3.
Object-Oriented Programming
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Object-Oriented Programming with Java Lecture 1: Introduction Autumn, 2007.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Learners Support Publications Object Oriented Programming.
Abstraction ADTs, Information Hiding and Encapsulation.
Programming Paradigms Lecturer Hamza Azeem. What is PP ? Revision of Programming concepts learned in CPLB Learning how to perform “Object-Oriented Programming”
CS451 - Lecture 2 1 CS451 Lecture 2: Introduction to Object Orientation Yugi Lee STB #555 (816) * Acknowledgement:
: Maha Sabri Altememe Lecturer : Maha Sabri Altememe Lecture :1 1.
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
Basic Concepts of Object Orientation Object-Oriented Analysis CIM2566 Bavy LI.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Object-Oriented Concepts Overview. Florida Community College at Jacksonville COP 2551 Object-Oriented Programming OO Concepts Overview Objective Overview.
1 CSE Programming in C++. 2 Overview Sign roster list Syllabus and Course Policies Introduction to C++ About Lab 1 Fill Questionnaire.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
Copyright 2005, The Ohio State University CSE – Introduction to C++ Name: Shirish Tatikonda Time: T 3:30 PM Room: BE 394
Author: DoanNX Time: 45’.  OOP concepts  OOP in Java.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (2/2)
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
Sadegh Aliakbary Sharif University of Technology Fall 2010.
Object means a real word entity such as pen, chair, table etc. Object-Oriented Programming is a methodology or paradigm to design a program using classes.
CPS120: Introduction to Computer Science Lecture 16A Object-Oriented Concepts.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
Programming paradigms
JAVA By Waqas.
OOP What is problem? Solution? OOP
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
Object Oriented Concepts
Object Oriented Analysis and Design
CIS601: Object-Oriented Programming in C++
Workshop for Programming And Systems Management Teachers
Object-Oriented Programming
Object Oriented Programming(OOP)
Presentation transcript:

OOPS CONCEPT

 OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives

 Top-down structured design: uses algorithmic decomposition where each module denotes a major step in some overall process  Object-oriented design: divides the problem into a set of objects that interacts to solve the problem. Your program’s properties and behaviors are modeled based upon real objects like cars, books, houses, etc. How can one design a program?

Difference Between Procedural Vs. Non-Procedural Language?  Procedural Withdraw, deposit, transfer  Object Oriented Customer, money, account

 It is the problem solving technique to develop the software system.  It’s a technique to think real world in terms of objects  e.g. you, your classmates, your dog, your mobile phone  objects may relate to/interact with each others  e.g. you have a dog, you make a call with your mobile, you talk to your classmates  interaction does something  change of state, side-effect of interaction (e.g. display on screen, file operation), etc. Object-Oriented Programming Concepts

 Everything is an object.  A program is a bunch of objects telling each other what to do by sending messages.  Each object has its own memory made up of other objects.  Every object has a type.  All objects of a particular type can receive the same messages. OOPS Rules

 Software is complex (too many people is doing too many things – the mess is inevitable )  One of the main goals in programming is to avoid the redundancy and objects can help to do this (inheritance)  Objects can help increase modularity through data hiding (encapsulation) Why OOP?

 An object can be written and maintained separately from the rest of the program, modularity.  An object has a “public face” that it uses to communicate with other objects, but other objects can not directly access its instance variables, information hiding. OOPS Benefits

 OOPS Concepts are mainly 4  Abstraction  Encapsulation  Inheritance  Polymorphisam OOP Features

 Abstraction:-Hidding non-essential features and showing the essential features (OR)  Hidding unnecessary data from the users details, is called abstraction. Abstraction

Abstraction - Example Real Time example: TV Remote Button in that number format and power buttons and other buttons there. just we are seeing the butttons, we don't see the button circuits.i.e buttons circutes and wirings all are hidden.

 The mechanism that binds together code and data.  It keeps both code and data safe from outside interference and misuse.  The basis of encapsulation is the class.  The process of hiding all the internal details of an object from the outside world.  Writing Operations and methods stored in a single class. This is Called Encapsulation Encapsulation

Encapsulation - Examples Real Time Example: Medical Capsuals i.e one drug is stored in bottom layer and another drug is stored in Upper layer these two layers are combined in single capsual.

 Inheritance is the process of deriving a new class from an existing one.  The existing class is called the parent class or super class.  The derived class is called the child class or subclass.  Java supports single and multi-level inheritance.  Multiple inheritance is done by Interface. Inheritance

Inheritance - Examples

 It refers to the ability of two or more objects belonging to different classes to respond exactly to the same message.  It is defined as, one interface multiple methods.  Interface and overloading are examples of Polymorphism.  Two Types of Polymorphism:  Compile- time Polymorphism. (Overloading)  Run-time Polymorphism. (Overriding) Polymorphisam

Polymorphisam - Examples OFFICE HOME RAILWAY STATION

 It happens within the class  Same Method name with different arguments  It is compile time polymorphism  Overriding – It happens during inheritance via classes and interface  Same method and with same signature  Sub class method with the same signature and return type of that of parent class.  It is Run time polymorphism Overloading And Overriding

 It is a conceptual idea of an object or real-world entity.  A class describes all the attributes of objects.  It is a blue-print of an object.  It is a collection of objects which have common state and behavior. Class

 A (software) object bundles together data(state) and functions(behavior) of an object(physical or conceptual).  It defines something material that may be perceived by the senses.  Something mental or physical towards which thought, feeling or action is directed.  It is an instance of a class.  It is physical reality of the program. Object

Class and Object Classes reflect concepts, objects reflect instances that embody those concepts. B C D A girl class object

Mapping the world to software Objects in the problem domain are mapped to objects in software