Object-Oriented Programming

Slides:



Advertisements
Similar presentations
By Waqas Over the many years the people have studied software-development approaches to figure out which approaches are quickest, cheapest, most.
Advertisements

General OO Concepts Objectives For Today: Discuss the benefits of OO Programming Inheritance and Aggregation Abstract Classes Encapsulation Introduce Visual.
Objectives Introduction to Inheritance and Composition (Subclasses and SuperClasses) Overriding (and extending), and inheriting methods and constructors.
ITEC200 – Week03 Inheritance and Class Hierarchies.
1 CS1001 Lecture Overview Homework 3 Homework 3 Project/Paper Project/Paper Object Oriented Design Object Oriented Design.
What is an object? Your dog, your desk, your television set, your bicycle. Real-world objects share two characteristics: They all have state and behavior;
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Object-oriented Programming Concepts
OOP in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
Chapter 7 - Generalization/Specialization and Inheritance1 Chapter 7 Generalization/Specialization and Inheritance.
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 Introduction to Object-oriented Programming CMPS 2143.
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
Inheritance using Java
Object-Oriented Programming Concepts
Introduction to Object-oriented programming and software development Lecture 1.
OOPs Object oriented programming. Based on ADT principles  Representation of type and operations in a single unit  Available for other units to create.
Introduction to Object Oriented Programming. Object Oriented Programming Technique used to develop programs revolving around the real world entities In.
Recap (önemli noktaları yinelemek) from last week Paradigm Kay’s Description Intro to Objects Messages / Interconnections Information Hiding Classes Inheritance.
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.
CS200 Algorithms and Data StructuresColorado State University Part 4. Advanced Java Topics Instructor: Sangmi Pallickara
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.
Object Oriented Programming Principles Lecturer: Kalamullah Ramli Electrical Engineering Dept. University of Indonesia Session-3.
Chapter 12 Support for Object oriented Programming.
 Objects versus Class  Three main concepts of OOP ◦ Encapsulation ◦ Inheritance ◦ Polymorphism  Method ◦ Parameterized ◦ Value-Returning.
(1) ICS 313: Programming Language Theory Chapter 12: Object Oriented Programming.
OOPs Object oriented programming. Abstract data types  Representationof type and operations in a single unit  Available for other units to create variables.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Introduction to Object Oriented Programming (OOP) Object Oriented programming is method of programming.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Java Programming, Second Edition Chapter Twelve Advanced Inheritance Concepts.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
1 n Object Oriented Programming. 2 Introduction n procedure-oriented programming consists of writing a list of instructions and organizing these instructions.
Object Oriented Programming in Java Habib Rostami Lecture 2.
Chapter 12: Support for Object- Oriented Programming Lecture # 18.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Introduction to Object-oriented Programming
Design Patterns: MORE Examples
Object-Oriented Design
Programming paradigms
Object-Oriented Programming Concepts
JAVA By Waqas.
CHAPTER 5 GENERAL OOP CONCEPTS.
OOP What is problem? Solution? OOP
Object Oriented Programming in Java
Object-Oriented Programming
Inheritance Modern object-oriented (OO) programming languages provide 3 capabilities: encapsulation inheritance polymorphism which can improve the design,
Week 4 Object-Oriented Programming (1): Inheritance
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
INTRODUCTION TO OOP Objective:
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
Types of Programming Languages
Object Oriented Analysis and Design
Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach
MSIS 670 Object-Oriented Software Engineering
More Object-Oriented Programming
Testing with OO OO has several key concepts:
Parameter Passing Actual vs formal parameters
DEV-08: Exploring Object-oriented Programming
Polymorphism Professor Hugh C. Lauer CS-2303, System Programming Concepts (Slides include materials from The C Programming Language, 2nd edition, by Kernighan.
Workshop for Programming And Systems Management Teachers
Introducing Java.
Object Oriented Analysis and Design
Object-Oriented PHP (1)
Object-Oriented Programming
Jim Fawcett CSE687 – Object Oriented Design Spring 2014
C++ Object Oriented 1.
Presentation transcript:

Object-Oriented Programming www.studymafia.org Seminar On Object-Oriented Programming Submitted To: Submitted By: www.studymafia.org www.studymafia.org 1 1

Content  What is an Object?  What is a Class? What is a Message? Why OOP? Design Principles of OOP  Requirements of Object-Oriented language Step by step explanation Conclusion References

What is an Object? An object is a software bundle of related variables and methods. Software objects are often used to model real-world objects you find in everyday life. Visual representation of a software object A bicycle modeled as a software object

What is a Class? A class is a blueprint or prototype that defines the variables and the methods common to all objects of a certain kind.  Class is an implementation of an abstract data type and so encapsulates both data and operations.  Object is run-time instance of class. Classes just sit there, objects do the real work. Memory is allocated for Objects not for Classes.

What is a Message? Software objects interact and communicate with each other using messages.  The object to which the message is addressed (YourBicycle)  The name of the method to perform (changeGears)  Any parameters needed by the method (lowerGear)

Save development time (and cost) by reusing code 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

To be object oriented, a language must support  Encapsulation  Inheritance  Dynamic Binding Some of the popular OO languages are C++ Smalltalk Java Eiffel FORTRAN90 CLOS(Common Lisp Object System) Ada95 Modula-3

Encapsulation: Packaging an object's variables within the protective custody of its methods is called encapsulation. Often, for practical reasons, an object may wish to expose some of its variables or hide some of its methods. Access Levels: Specifier Class Subclass Package World Private X Protected Public

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

What is Inheritance? A class inherits state and behavior from its superclass. Inheritance provides a powerful and natural mechanism for organizing and structuring software programs. Super Class Subclasses

Properties: Benefits: Each subclass inherits state (in the form of variable declarations) from the superclass. Subclasses can add variables and methods to the ones they inherit from the superclass. Subclasses can also override inherited methods and provide specialized implementations for those methods. You are not limited to just one layer of inheritance. The inheritance tree, or class hierarchy, can be as deep as needed. Benefits: Re-Usability Subclasses provide specialized behaviors from the basis of common elements provided by the superclass. Through the use of inheritance, programmers can reuse the code in the superclass many times. Can define Abstract Classes Programmers can implement superclasses called abstract classes that define "generic" behaviors.

A B Types of Inheritance: A C B A-1 B-1 C A-2 B-2 AB Multiple Inheritance Multi-level Inheritance A C B A-1 B-1 C A-2 B-2 Multiple Multi-level Inheritance AB

Dynamic Binding:  Dynamic binding occurs when the type of variable changes at run-time. A common way for a variable to change its type is via assignment. Bike:= MoutainBike is safe MountainBike:=Bike is not safe MountainBike is declared to have all the features of Bike so the assignment does no harm.  A variable that starts life of the type Bike may be attached to any object that is a kind of Bike, including MountainBike,RacingBike,…  A variable that starts life of the type MountainBike can only be attached to MountainBike objects but does not include RacingBike or general Bike.

 The ability to appear in many forms. Polymorphism:  The ability to appear in many forms.  In object-oriented programming, polymorphism refers to a programming language's ability to process objects differently depending on their data type or class. It is the ability to redefine methods for derived classes. E.g. e-bike Acceleration system. Electronically / Mechanically

Conclusions In this paper the basis for the development of software intelligent agents from the programming point of view has been presented. Two alternatives were presented.

References www.google.com www.wikipedia.com www.studymafia.org www.pptplanet.com

Thanks