INTRODUCTION TO OOP Objective:

Slides:



Advertisements
Similar presentations
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
Advertisements

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.
Chapter 1 Object-Oriented System Development
Introduction to Computers and Java Recitation - 01/11/2008 CS 180 Department of Computer Science, Purdue University.
Object Oriented Programming A brief review of what you should know about OOP.
Object Oriented System Development with VB .NET
Basic OOP Concepts and Terms
Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
C++ fundamentals.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
BACS 287 Basics of Object-Oriented Programming 1.
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
Introduction to Object-oriented programming and software development Lecture 1.
BCS 2143 Introduction to Object Oriented and Software Development.
O BJECT O RIENTATION F UNDAMENTALS Prepared by: Gunjan Chhabra.
An Object-Oriented Approach to Programming Logic and Design
Object Oriented Concepts & Principles Ingrid Kirschning & Gerardo Ayala.
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 18. Review User interface Design principles Design Guidelines.
School of Computer Science & Information Technology G6DICP - Lecture 22 The Theory of Object Oriented Programming.
Chapter 1Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Java Byte Code l The Java compiler generates Java Byte Code. (Most.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
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.
Basic OOP Concepts and Terms. In this class, we will cover: Objects and examples of different object types Classes and how they relate to objects Object.
Design.ppt1 Top-down designs: 1. Define the Problem IPO 2. Identify tasks, Modularize 3. Use structure chart 4. Pseudocode for Mainline 5. Construct pseudocode.
1 Programming Paradigms Object Orientated Programming Paradigm (OOP)
Copyright 2006 Oxford Consulting, Ltd1 January Introduction to C++ Programming is taking A problem Find the area of a rectangle A set of data.
Introduction To OOP 1.0 Fundamentals Of Java Programming Language 2.0 Exception Handling 3.0 Classes, Inheritance And Polymorphism © 2011 | PN AZRINA.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Next Back MAP MAP F-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
 By the end of this lecture, you should …  Understand the three pillars of Object- Oriented Programming: Inheritance, Encapsulation and Polymorphism.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Game Programming II Concept.
Object-Oriented Programming
OOP - Object Oriented Programming
Object-Oriented Design
Programming paradigms
Object-Orientated Programming
Visit for more Learning Resources
Object Oriented Programming
Object-Oriented Programming Concepts
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
Sachin Malhotra Saurabh Choudhary
JAVA By Waqas.
ATM OO Design and Implementation Case Study
The Movement To Objects
Intro to OOP with Java, C. Thomas Wu CHAPTER 2 Introduction to OOP
CHAPTER 5 GENERAL OOP CONCEPTS.
Object Oriented Programming F3031
Programming in Java Sachin Malhotra, Chairperson, PGDM-IT, IMS Ghaziabad Saurabh Chaudhary, Dean, Academics, IMS Ghaziabad.
The Object-Oriented Thought Process Chapter 1
OOP What is problem? Solution? OOP
Introduction to Computers and Java
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
Types of Programming Languages
Object Oriented Concepts
Software Architecture & Design Pattern
OOP vs Structured Programming
ITEC 3220A Using and Designing Database Systems
Extended Learning Module G
Basic OOP Concepts and Terms
Object Oriented Analysis and Design
Chapter 5.
CS 2704 Object Oriented Software Design and Construction
Object-Oriented Programming
Object Oriented Programming(OOP)
Chapter 20 Object-Oriented Concepts and Principles
Presentation transcript:

INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know four design principles of OOP Know OOP programming languages

STRUCTURED vs. OO PROGRAMMING STRUCTURED PROGRAMMING: MAIN PROGRAM FUNCTION 3 FUNCTION 2 GLOBAL DATA FUNCTION 5 FUNCTION 4 FUNCTION 1

Structured Programming Using function Function & program is divided into modules Every module has its own data and function which can be called by other modules.

OBJECT ORIENTED PROGRAMMING Data Function Object 3

OBJECT ORIENTED PROGRAMMING Objects have both data and methods Objects of the same class have the same data elements and methods Objects send and receive messages to invoke actions Key idea in object-oriented:   The real world can be accurately described as a collection of objects that interact.

Basic terminology object - usually a person, place or thing (a noun) method - an action performed by an object (a verb) attribute - description of objects in a class class - a category of similar objects (such as automobiles) - does not hold any values of the object’s attributes

Example for attributes and methods manufacturer’s name model name year made color number of doors size of engine etc. Methods: Define data items (specify manufacturer’s name, model, year, etc.) Change a data item (color, engine, etc.) Display data items Calculate cost etc.

Why OOP? Save development time (and cost) by reusing code once an object class is created it can be used in other applications Easier debugging classes can be tested independently reused objects have already been tested

Design Principles of OOP Four main design principles of Object-Oriented Programming(OOP): Encapsulation Abstraction Polymorphism Inheritance

Encapsulation Also known as data hiding Only object’s methods can modify information in the object. Analogy: ATM machine can only update accounts of one person or object only.

Abstraction Focus only on the important facts about the problem at hand to design, produce, and describe so that it can be easily used without knowing the details of how it works. Analogy: When you drive a car, you don’t have to know how the gasoline and air are mixed and ignited. Instead you only have to know how to use the controls. Draw map

Polymorphism the same word or phrase can mean different things in different contexts Analogy: In English, bank can mean side of a river or a place to put money move -

The operation of one function depends on the argument passed to it. Function Overloading The operation of one function depends on the argument passed to it. Example: Fly(), Fly(low), Fly(150)

Inheritance Inheritance—a way of organizing classes Term comes from inheritance of traits like eye color, hair color, and so on. Classes with properties in common can be grouped so that their common properties are only defined once. Superclass – inherit its attributes & methods to the subclass(es). Subclass – can inherit all its superclass attributes & methods besides having its own unique attributes & methods.

An Inheritance Hierarchy Superclass Vehicle Subclasses Automobile Motorcycle Bus Sedan Sports Car Luxury Bus School Bus What properties does each vehicle inherit from the types of vehicles above it in the diagram?

Object-Oriented Programming Languages ·        Pure OO Languages Smalltalk, Eiffel, Actor, Java   ·        Hybrid OO Languages C++, Objective-C, Object-Pascal