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.

Slides:



Advertisements
Similar presentations
Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
Advertisements

When is Orientated Programming NOT? Mike Fitzpatrick.
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
CS 211 Inheritance AAA.
Classes & Objects Computer Science I Last updated 9/30/10.
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
1 CS1001 Lecture Overview Homework 3 Homework 3 Project/Paper Project/Paper Object Oriented Design Object Oriented Design.
Object-Oriented Databases v OO systems associated with – graphical user interface (GUI) – powerful modeling techniques – advanced data management capabilities.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Object-oriented Programming Concepts
1 CS1001 Lecture Overview Object Oriented Design Object Oriented Design.
1 Introduction to C++ Programming Concept Basic C++ C++ Extension from C.
Chapter 13: Object-Oriented Programming
OOP in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
C++ fundamentals.
BACS 287 Basics of Object-Oriented Programming 1.
Object Oriented Programming
2.5 OOP Principles Part 1 academy.zariba.com 1. Lecture Content 1.Fundamental Principles of OOP 2.Inheritance 3.Abstraction 4.Encapsulation 2.
Object Oriented Software Development
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 2: Modelling.
Introduction to Object-oriented programming and software development Lecture 1.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 1 Introduction to Object-Oriented Programming and.
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
BCS 2143 Introduction to Object Oriented and Software Development.
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.
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Chapter 7 Objects and Classes 1 Fall 2012 CS2302: Programming Principles.
Object Oriented Programming Concepts. Object Oriented Programming Type of programming whereby the programmer defines the data types of a data structure.
IT 21103/41103 System Analysis & Design. Chapter 05 Object Modeling.
BCS 2143 Object Oriented Design Using UML. Objectives Objects Interactions Finding Classes Relationship Between Classes Attribute and Operation Class.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
1 Programming Paradigms Object Orientated Programming Paradigm (OOP)
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
Learners Support Publications Object Oriented Programming.
Session 02 and 03: C# OOP 1 OOP in C#: Classes and Objects in C#. Object-Oriented Design. UML Class Diagram. Object Interaction. FEN AK IT:
Overview The Basics – Python classes and objects Procedural vs OO Programming Entity modelling Operations / methods Program flow OOP Concepts and user-defined.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 12 Object-Oriented Programming Starting Out with Games & Graphics.
OOP Review CS 124.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
1 CSE Programming in C++. 2 Overview Sign roster list Syllabus and Course Policies Introduction to C++ About Lab 1 Fill Questionnaire.
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
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)
CPS120: Introduction to Computer Science Lecture 16A Object-Oriented Concepts.
1 Inheritance One of the goals of object oriented programming is code reuse. Inheritance is one mechanism for accomplishing code reuse. It allows us to.
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.
CPRG 215 Introduction to Object-Oriented Programming with Java Module 3- Introduction to Object Oriented Programming concepts Topic 3.1 Fundamental Concepts.
Inheritance Modern object-oriented (OO) programming languages provide 3 capabilities: encapsulation inheritance polymorphism which can improve the design,
Programming Logic and Design Seventh Edition
Objects as a programming concept
OOP What is problem? Solution? OOP
Object-Orientated Programming
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Object Oriented Concepts
SNSCT_CSE_PROGRAMMING PARADIGM_CS206
Object Oriented Analysis and Design
Lecture 23 Polymorphism Richard Gesick.
Classes In C#.
Inheritance Basics Programming with Inheritance
Lecture 22 Inheritance Richard Gesick.
Computer Programming with JAVA
CPS120: Introduction to Computer Science
Fundaments of Game Design
CPS120: Introduction to Computer Science
ADVANCED OBJECT-ORIENTED PROGRAMMING
Presentation transcript:

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 that is capable of responding to messages

The Idea of OOP The idea of OOP is to try to approach programming in a more natural way by grouping all the code that belongs to a particular object—such as a checking account or a customer—together

Objects Core to the idea of OOPs is the concept of an object. An object is anything that is relevant to your program A customer, an employee, Inventory, a database, a button, a form, a sale are all potential objects

Benefits of Objects More natural way to look at things Re-usability

Objects/Classes A class is a description of an object. This description can include attributes which describe the class It can also include “methods” which describe things the object can do. In programming an object is an actual instance of a class

Messages Object communicate among themselves by means of messages The also maintain “associative relationships” among themselves

A Class Diagram Class name Field names methods - Means private +Means Public

Login Class in C# class Login { //constructor public Login(string usr, string pass) { Username = usr; Password = pass; Authenticate(); } //private field variables private string username; //public property public string Username { get { return username; } set { username = value; } } private string password; //write only property public string Password { set { password = value; } } private int Authenticate() { //connect to database etc... int valid = 0; if (Username && Password) { valid = 1; } return valid; }

Principles of OOP Abstraction Encapsulation Inheritance Polymorphism

Abstraction The idea of abstraction is that a class represents an “abstract” version of an object A customer class presents the abstract idea of what a customer is A sale class represents an abstract idea of what a sale is

Encapsulation Encapsulation refers to the idea that a class should contain all the properties and methods of an object It also means you should be able to use the object without knowing the details of how it is structured internally

Inheritance Inheritance means you can derive a new object from an existing one It also means that the new object will have access to (will inherit) the properties and methods from the parent object

Inheritance Generalization/ Specialization

Polymorphism Polymorphism means that objects descended from a particular types will behave appropriately For example (a listbox and a button are both descended from the same class called control—but they each will behave differently)