Object Oriented Programming with JAVA Arash N. Kia AlZahra University Definitions – Part 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

By Waqas Over the many years the people have studied software-development approaches to figure out which approaches are quickest, cheapest, most.
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.
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
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.
Chapter 1 Object-Oriented System Development
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
Object-Oriented Thinking Chapter 1, Object-Oriented Programming in Java, Timothy Budd, 1998 ICS102 Semester
Aalborg Media Lab 21-Jun-15 Software Design Lecture 1 “ Introduction to Java and OOP”
Stéphane Ducasse6.1 Essential Concepts Why OO? What is OO? What are the benefits? What are the KEY concepts? Basis for all the lectures.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
1 Basic Object-Oriented Concepts  Object-Oriented Paradigm What is an Object?  What is a Class?  Constructing Objects from a class Problem Solving in.
Object-oriented Programming Concepts
INTRODUCTION TO JAVA PROGRAMMING Chapter 1. What is Computer Programming?
C++ fundamentals.
Introduction to Object-oriented Programming Introduction to Object-oriented Programming CMPS 2143.
BACS 287 Basics of Object-Oriented Programming 1.
CPT 140 Programming Constructs1 OBJECT ORIENTED TECHNOLOGY Terminology and Basic Concepts.
Introduction To System Analysis and design
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
Introduction to Object-oriented programming and software development Lecture 1.
BCS 2143 Introduction to Object Oriented and Software Development.
Objects and Components. The adaptive organization The competitive environment of businesses continuously changing, and the pace of that change is increasing.
CSM-Java Programming-I Spring,2005 Objects and Classes Overview Lesson - 1.
An Object-Oriented Approach to Programming Logic and Design
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.
Objected Oriented Programming & Design JAVA Shishir Gupta (704) (704)
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.
OOP Class Lawrence D’Antonio Lecture 3 An Overview of C++
SNPL1 Woochang Lim What (Variable) + How (Function) = Object Objects are the physical and conceptual things we find in the universe around us. Object-Oriented.
CS 4850: Senior Project Fall 2014 Object-Oriented Design.
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.
Definition of Object - Oriented Language.. Object-oriented programming (OOP) is a programming language model organized around "objects" rather than "actions"
1 Programming Paradigms Object Orientated Programming Paradigm (OOP)
Object-Oriented Programming with Java Lecture 1: Introduction Autumn, 2007.
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
Learners Support Publications Object Oriented Programming.
Programming Paradigms Lecturer Hamza Azeem. What is PP ? Revision of Programming concepts learned in CPLB Learning how to perform “Object-Oriented Programming”
1 CMIS301 O-O Thinking Understanding O-O Programming by T Budd.
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
Basic Concepts of Object Orientation Object-Oriented Analysis CIM2566 Bavy LI.
S.Ducasse Stéphane Ducasse 1 Essential OO Concepts Stéphane Ducasse.
Introduction to Object-Oriented Programming Lesson 2.
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.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Object-Oriented Design Concepts University of Sunderland.
Chapter 7 Classes and Methods III: Static Methods and Variables Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition)
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (2/2)
Object-Oriented Paradigm (OOP) Course Code: SE 101 Lecture No. 1.
Object Oriented Paradigm OOP’s. Problems with Structured Programming As programs grow ever larger and more complex, even the structured programming approach.
CPS120: Introduction to Computer Science Lecture 16A Object-Oriented Concepts.
Object Oriented Programming in Java Habib Rostami Lecture 2.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Object-Oriented Programming
Object-Oriented Design
Programming paradigms
Object-Orientated Programming
Object Oriented Programming
JAVA By Waqas.
OOP What is problem? Solution? OOP
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Types of Programming Languages
CPS120: Introduction to Computer Science
Object-Oriented Programming
Object Oriented Analysis and Design
CPS120: Introduction to Computer Science
Presentation transcript:

Object Oriented Programming with JAVA Arash N. Kia AlZahra University Definitions – Part 1

Problem of Writing a Software In his keynote address to the 11th World Computer Congress in 1989, renowned computer scientist Donald Knuth said that one of the most important lessons he had learned from his years of experience is that software is hard to write! Small programs seem to be no problem, but scaling to large systems with large programming teams can result in $100M projects that never work and are thrown out

Answer for the problem of writing a software The only solution seems to lie in writing small software units that communicate via well-defined interfaces and protocols like computer chips The units must be small enough that one developer can understand them entirely and, perhaps most importantly, the units must be protected from interference by other units so that programmers can code the units in isolation.

Some statements about OOP Object-oriented programming takes advantage of our perception of world An object is an encapsulated completely-specified data aggregate containing attributes and behavior Data hiding protects the implementation from interference by other objects and defines approved interface An object-oriented program is a growing and shrinking collection of objects that interact via messages You can send the same message to similar objects - the target decides how to implement or respond to a message at run-time Objects with same characteristics are called instances of a class Classes are organized into a tree or hierarchy. Two objects are similar if they have the same ancestor somewhere in the class hierarchy You can define new objects as they differ from existing objects

Benefits of OOP reduced cognitive load (have less to think about and more natural paradigm) isolation of programmers (better team programming) less propagation of errors more adaptable/flexible programs faster development due to reuse of code

Encapsulation The first and most important design principle we can derive from our perception of the real world is called encapsulation. When you look at an animal, you consider it to be a complete entity--all of its behavior and attributes arise strictly from that animal. It is an independent, completely-specified, and self- sufficient actor in the world. You do not have to look behind a big rock looking for another bit of functionality or another creature that is remotely controlling the animal.

Data Hiding Closely associated with encapsulation is the idea of data hiding. The inner construction and mechanism of the human body is not usually available to you when conversing with other humans. You can only interact with human beings through the approved voice-recognition interface. No one can make you not to breath with any kind of message! You can think about and design each object independently as well as force other programmers to interact with your objects only in a prescribed manner

Java Classes and public or private concepts In Java, for example, you will use an actual language construct called a class definition to group variables and functions. You can use access modifiers like private and public to indicate which class members are visible to functions in other objects.

Polymorphism The truly powerful idea behind message sending lies in its flexibility--you do not even need to know what gender the human is to tell them to “wear clothes”. All you need to know is that the receiver of the message is human. The notion that similar, but different, objects can respond to the same message is technically called polymorphism (literally "multiple-forms").

Late Binding Polymorphism is often called late binding because the receiver object binds the message to an appropriate implementation function (method in Java terminology) at run-time when the message is sent rather than at compile-time as functions are. Without polymorphism, encapsulation's value is severely diminished because you cannot effectively delegate, that is, you cannot leave all the details within a self-contained object. You would need to know details of an object to interact with it rather than just the approved communication interface.