Copyright ©2005  Department of Computer & Information Science Object Oriented Concepts.

Slides:



Advertisements
Similar presentations
When is Orientated Programming NOT? Mike Fitzpatrick.
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.
Overview1 History of Programming Languages n Machine languages n Assembly languages n High-level languages – Procedure-oriented – Object-oriented/Event-driven.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
OBJECT ORIENTED ANALYSIS & DESIGN Vassilka Kirova Department of Computer & Information Science NJIT.
OBJECT ORIENTED ANALYSIS & DESIGN Vassilka Kirova Department of Computer & Information Science NJIT.
Fall 2005CSE 115/503 Introduction to Computer Science I1 Lecture #4 Agenda Announcements Review Questions? Classes and objects UML class diagrams Creating.
Systems Analysis & Design Sixth Edition Systems Analysis & Design Sixth Edition Toolkit Part 5.
Data Modeling Entity - Relationship Models. Models Used to represent unstructured problems A model is a representation of reality Logical models  show.
Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.
CSCI N201: Programming Concepts Copyright ©2005  Department of Computer & Information Science Introducing Object-Oriented Programming (OOP)
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
Object Oriented Programming
CSCI N341: Client-Side Web Programming Copyright ©2004  Department of Computer & Information Science "Object-Oriented" JavaScript.
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.
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.
Database Management System Prepared by Dr. Ahmed El-Ragal Reviewed & Presented By Mr. Mahmoud Rafeek Alfarra College Of Science & Technology Khan younis.
Object-Oriented Programming (OOP) CSC-2071 (3+1=4 Credits) Lecture No. 1 MBY.
Advanced Object- Oriented Programming Programming Right from the Start with Visual Basic.NET 1/e 14.
Object-Oriented Design Simple Program Design Third Edition A Step-by-Step Approach 11.
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 12 Object-Oriented Programming Starting Out with Games & Graphics.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
OO in Context Lecture 13: Dolores Zage. Confused about OO Not alone, there is much confusion about OO many programs are claimed to be OO but are not really.
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  Department of Computer & Information Science Object Based JavaScript.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Chapter 11 An introduction to object-oriented design.
 By the end of this lecture, you should …  Understand the three pillars of Object- Oriented Programming: Inheritance, Encapsulation and Polymorphism.
CPS120: Introduction to Computer Science Lecture 16A Object-Oriented Concepts.
Chapter 11: Abstract Data Types Lecture # 17. Chapter 11 Topics The Concept of Abstraction Advantages of Abstract Data Types Design Issues for Abstract.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
CPRG 215 Introduction to Object-Oriented Programming with Java Module 3- Introduction to Object Oriented Programming concepts Topic 3.1 Fundamental Concepts.
Object-Oriented Design
Object Oriented Programming
Business System Development
JAVA By Waqas.
The Movement To Objects
Systems Analysis and Design
CHAPTER 5 GENERAL OOP CONCEPTS.
Sections Basic Concepts of Programming
The Object-Oriented Thought Process Chapter 1
Chapter 11 Object-Oriented Design
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
Object Oriented Concepts
Chapter 7 Classes & Objects.
Object-oriented Design in Processing
Chapter 9 Classes & Objects.
Chapter 20 Object-Oriented Analysis and Design
Chapter 7 Classes & Objects.
Object-oriented Design in Processing
Object Orientated Programming
CPS120: Introduction to Computer Science
Object-Oriented Programming
Inheritance and Polymorphism
Chapter 7 Classes & Objects.
Object-oriented Design in Processing
CPS120: Introduction to Computer Science
Appendix A Object-Oriented Analysis and Design
Ch. 1 Vocabulary Alice.
Object-oriented Design in Processing
Object Oriented Programming(OOP)
Chapter 20 Object-Oriented Concepts and Principles
Presentation transcript:

Copyright ©2005  Department of Computer & Information Science Object Oriented Concepts

Copyright ©2005  Department of Computer & Information Science Goals Understand objects, their attributes and their methods.Understand objects, their attributes and their methods. Understand the pillars of object- oriented programming as encapsulation, inheritance & polymorphism.Understand the pillars of object- oriented programming as encapsulation, inheritance & polymorphism.

Copyright ©2005  Department of Computer & Information Science OOP Concepts ObjectsObjects AttributesAttributes MethodsMethods EventsEvents Abstraction & ClassesAbstraction & Classes ConstructorsConstructors

Copyright ©2005  Department of Computer & Information Science What is an object? An object is a unique programming entity that has attributes to describe it (like adjectives in grammar) and methods to retrieve/set attribute values (like verbs in grammar).An object is a unique programming entity that has attributes to describe it (like adjectives in grammar) and methods to retrieve/set attribute values (like verbs in grammar).

Copyright ©2005  Department of Computer & Information Science Attributes Programmers store an object’s data in attributes, also called properties.Programmers store an object’s data in attributes, also called properties. Attributes provide us a way to describe an object, similar to adjectives in grammar.Attributes provide us a way to describe an object, similar to adjectives in grammar. We can read property values or change properties, assigning values.We can read property values or change properties, assigning values.

Copyright ©2005  Department of Computer & Information Science Methods Whereas attributes describe an object, methods allow us to access object data. Methods are like verbs in grammar.Whereas attributes describe an object, methods allow us to access object data. Methods are like verbs in grammar. We can manipulate object data, stored in attributes, using methods.We can manipulate object data, stored in attributes, using methods.

Copyright ©2005  Department of Computer & Information Science Events Object-oriented programming is inherently tied to user interaction. Programs record interaction in the form of events.Object-oriented programming is inherently tied to user interaction. Programs record interaction in the form of events. Events are changes in an object’s environment to which it can react.Events are changes in an object’s environment to which it can react.

Copyright ©2005  Department of Computer & Information Science Abstraction One of the chief advantages of object-oriented programming is the idea that programmers can essentially focus on the “big picture” and ignore specific details regarding the inner- workings of an object. This concept is called abstraction.One of the chief advantages of object-oriented programming is the idea that programmers can essentially focus on the “big picture” and ignore specific details regarding the inner- workings of an object. This concept is called abstraction.

Copyright ©2005  Department of Computer & Information Science Classes How do programmers get by implementing abstraction? They use a programming structure called a class.How do programmers get by implementing abstraction? They use a programming structure called a class. A class presents a blueprint of an object, its properties and its methods.A class presents a blueprint of an object, its properties and its methods.

Copyright ©2005  Department of Computer & Information Science Instantiation To create an object based on a class, we create an instance of that class. This process is called instantiation.To create an object based on a class, we create an instance of that class. This process is called instantiation. In Java, JavaScript and other languages, we use a special method called a constructor method to create an instance of an object.In Java, JavaScript and other languages, we use a special method called a constructor method to create an instance of an object.

Copyright ©2005  Department of Computer & Information Science Encapsulation Abstraction in OOP is closely related to a concept called encapsulation.Abstraction in OOP is closely related to a concept called encapsulation. Data and the ways to get at that data are wrapped in a single package, a class. The only way to access such data is through that package. This idea translates to information hiding.Data and the ways to get at that data are wrapped in a single package, a class. The only way to access such data is through that package. This idea translates to information hiding.

Copyright ©2005  Department of Computer & Information Science Inheritance Another of the main tenets of OOP is inheritance. Inheritance allows programmers to create new classes from existing ones.Another of the main tenets of OOP is inheritance. Inheritance allows programmers to create new classes from existing ones. A child class inherits its properties and attributes from its parents, which programmers can change.A child class inherits its properties and attributes from its parents, which programmers can change.

Copyright ©2005  Department of Computer & Information Science Polymorphism Polymorphism describes how programmers write methods to do some general purpose function.Polymorphism describes how programmers write methods to do some general purpose function. Different objects might perform polymorphic methods differently.Different objects might perform polymorphic methods differently.

Copyright ©2005  Department of Computer & Information Science Summary Programming objects are comprised of attributes and methods.Programming objects are comprised of attributes and methods. Classes provide programmers with blueprints of objects.Classes provide programmers with blueprints of objects. To create an object from a class, we use constructor methods to create a class instance.To create an object from a class, we use constructor methods to create a class instance.