: Maha Sabri Altememe Lecturer : Maha Sabri Altememe Lecture :1 1.

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.
Object Oriented Programming in Java. Object Oriented Programming Concepts in Java Object oriented Programming is a paradigm or organizing principle for.
Unified Modeling Language
Object-Oriented PHP (1)
Objects and Classes First Programming Concepts. 14/10/2004Lecture 1a: Introduction 2 Fundamental Concepts object class method parameter data type.
Object-Oriented Databases
1 Basic Object-Oriented Concepts  Object-Oriented Paradigm What is an Object?  What is a Class?  Constructing Objects from a class Problem Solving in.
Chapter Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Object-oriented Programming Concepts
INTRODUCTION TO JAVA PROGRAMMING Chapter 1. What is Computer Programming?
C++ fundamentals.
CSC238 INTRODUCTION TO OOP Chapter 1.
1.11 Introduction to OOP academy.zariba.com 1. Lecture Content 1.What is OOP and why use it? 2.Classes and objects 3.Static classes 4.Properties, fields.
CSCI-383 Object-Oriented Programming & Design Lecture 15.
Object Oriented Programming
Introduction To System Analysis and design
UFCEUS-20-2 : Web Programming Lecture 5 : Object Oriented PHP (1)
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
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.
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.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
BCS 2143 Introduction to Object Oriented and Software Development.
CSM-Java Programming-I Spring,2005 Objects and Classes Overview Lesson - 1.
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
A class in Java is a software construct that includes fields (also called data fields or class scope variables) to provide data specification, and methods.
Features of Object Oriented Programming Lec.4. ABSTRACTION AND ENCAPSULATION Computer programs can be very complex, perhaps the most complicated artifact.
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
CSCI-383 Object-Oriented Programming & Design Lecture 13.
Object-Oriented Programming
CSSE501 Object-Oriented Development. Chapter 4: Classes and Methods  Chapters 4 and 5 present two sides of OOP: Chapter 4 discusses the static, compile.
Lecture 12 March 16, The Scope of a Variable What if there are two variables with the same name? –A local or block-local variable can have the same.
Learners Support Publications Object Oriented Programming.
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
1 OOP - An Introduction ISQS 6337 John R. Durrett.
Object Oriented Programming: Inheritance Chapter 9.
Tutorial 5 Introducing Code Programming. What is Class Building blocks of a program Provided by VB.Net Framework Class Library Template definition of.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Introduction To OOP 1.0 Fundamentals Of Java Programming Language 2.0 Exception Handling 3.0 Classes, Inheritance And Polymorphism © 2011 | PN AZRINA.
Object-Oriented Concepts Overview. Florida Community College at Jacksonville COP 2551 Object-Oriented Programming OO Concepts Overview Objective Overview.
Starting Out With Java 5 Control Structures to Objects By Tony Gaddis Copyright © 2005, 2005 Pearson Addison-Wesley. All rights reserved. Chapter 6 Slide.
Object Oriented Programming Session # 03.  Abstraction: Process of forming of general and relevant information from a complex scenarios.  Encapsulation:
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
Next Back MAP MAP F-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All.
Java Inheritance in Java. Inheritance Inheritance is a mechanism in which one object acquires all the properties and behaviors of parent object. The idea.
Author: DoanNX Time: 45’.  OOP concepts  OOP in Java.
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.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
Programming Paradigms(Model) Two Paradigms: – Procedural Programming Paradigm – Object Oriented Paradigm Objective of OO approach is to eliminate some.
COMPUTER SCIENCE & TECHNOLOGY DEGREE PROGRAMME FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UVA WELLASSA ‏ Properties of Object Oriented Programming.
Object Oriented Programming in Java Habib Rostami Lecture 2.
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.
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
Object Oriented Programming
Intro to OOP with Java, C. Thomas Wu CHAPTER 2 Introduction to OOP
Objects as a programming concept
Table of Contents Class Objects.
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
C++.
An Overview of Java.
Object Oriented Analysis and Design
Object oriented vs procedural programming
By Rajanikanth B OOP Concepts By Rajanikanth B
Object-Oriented Programming
Object Oriented Programming(OOP)
Presentation transcript:

: Maha Sabri Altememe Lecturer : Maha Sabri Altememe Lecture :1 1

  The 1960s gave birth to structured programming. This is the method encouraged by languages such as C and Pascal. The use of structured languages made it possible to write middling complex programs fairly easily. Structured languages are characterized by their support for stand-alone subroutines, local variables, rich control constructs, and their lack of reliance upon the GOTO. Although structured languages are a powerful tool, even they reach their limit when a project becomes too large. 2 Introduction to Object-Oriented Programming

  Object oriented programming involves programming using objects. An object is a software bundle of related state and behavior. Software objects are often used to model the real-world objects that you find in everyday life. This lesson explains how state and behavior are represented within an object, introduces the concept of data encapsulation, and explains the benefits of designing your software in this manner. For example, a student, circle. 3 What Is Object-Oriented Programming?

 4 Concept: Object have state and behaviors  The state of an object is represented by data fields with their current values.  The behavior of an object is defined by a set of methods. A class can be defined as a template that describes the behaviors that object of its type support.  Every object belongs to (is an instance of) a class  An object may have fields, or variables(The class describes those fields)  An object may have methods (The class describes those methods)

 5 Objects Is a bank account an object? Is an account no. an object? Is a checking account an object?

 6 Example of a class public class Student { String name; int age; void getname(){ } void setage(){ } } State of objectbehaviors of objectobject

  To support the principles of object-oriented programming, all OOP languages have three features in common:  Encapsulation  Polymorphism  Inheritance. 7 Fundamental Principles of OOP

  Encapsulation is used to hide the values or state of a structured data object inside a class. That is the mechanism that binds together code and the data it manipulates, and keeps both safe from outside interference and misuse. In an object-oriented language, code and data may be combined in such a way that a self-contained. When code and data are linked together in this fashion, an object is created. In other words, an object is the device that supports encapsulation. Within an object, code, data, or both may be private to that object or public. 8 Encapsulation

 9 Encapsulation – Example PersonPerson -name : string -age : int -name : string -age : int +Person(string name, int age) +Name : string { get; set; } +Age : TimeSpan { get; set; } +Person(string name, int age) +Name : string { get; set; } +Age : TimeSpan { get; set; }

  Object-oriented programming languages support polymorphism, which is characterized by the phrase "one interface, multiple methods." In simple terms, polymorphism is the attribute that allows one interface to control access to a general class of actions. 10 Polymorphism

  For example: UndergraduateStudent and GraduateStudent are subclasses of Student 11 Count..

  Inheritance is the process by which one object can get the properties of another object. This is important because it supports the concept of classification. If you think about it, most knowledge is made manageable by hierarchical classifications.  For example, a Red apple is part of the classification apple, which in turn is part of the fruit class, which is under the larger class food. 12 Inheritance

  Inheritance let us to create a new class from the existing classes.  The new class is called subclass and the existing class is called superclass.  The subclass inherits the properties of the superclass.  The properties refer to the method or the attribute (data)  Inheritance is ‘is-a’ relation Example: if a Circle inherits the Shape class, hence the Circle is a Shape. (See the next figure) 13 Count..

 14 Count..

  Single inheritance  Is a subclass that derived from a single/one superclass (existing class)  Multiple inheritance  Is a subclass that derived from more than one superclass  Not supported by Java. 15 Count..

16 Single Multiple

17 Q?