Object Oriented Programming Development

Slides:



Advertisements
Similar presentations
Object Oriented Programming
Advertisements

EDUC4417 Senior Computers Dr. Mumbi Kariuki January 28, 2004 Object-Orientation David Cuillerier.
Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
When is Orientated Programming NOT? Mike Fitzpatrick.
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
1 Object Oriented Programming Development - Week 5 z By: Marc Conrad University of Luton z z Room: D104.
Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
1 CIS601: Object-Oriented Programming in C++ Note: CIS 601 notes were originally developed by H. Zhu for NJIT DL Program. The notes were subsequently revised.
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 Object-oriented concepts.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
1 Introduction to C++ Programming Concept Basic C++ C++ Extension from C.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
OOP in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Distribution of Marks Internal Sessional Evaluation Assignments – 10 Quizzes – 10 Class Participation Attendence – 5 Mid – Term Test – 25 External Evaluation.
OBJECT ORIENTED PROGRAMMING
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
BACS 287 Basics of Object-Oriented Programming 1.
1 Object Oriented Programming Development z By: Marc Conrad University of Luton z z Room: D104.
COMPUTER PROGRAMMING. Introduction to C++ History Merges notions from Smalltalk and notions from C The class concept was borrowed from Simular67 Developed.
OOP- OBJECT OBJECT PROGRAMMING By KRATI SHARMA 02 XI-B ✏✏✏✏ ☺☻☺☻☺☻☺ ✏✏✏✏
UFCEUS-20-2 : Web Programming Lecture 5 : Object Oriented PHP (1)
Programming Languages and Paradigms Object-Oriented Programming.
Introduction to Object-oriented programming and software development Lecture 1.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
Welcome to OBJECT ORIENTED PROGRAMMIN Date: 10/09/2014 Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
An Object-Oriented Approach to Programming Logic and Design
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.
Stephenson College DP 96 1 Object-Orientation by Derek Peacock.
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++
1 Object Oriented Programming Development - Week 3 z By: Marc Conrad University of Luton z z Room: D104.
What is Object-Oriented?  Organization of software as a collection of discreet objects that incorporate both data structure and behavior.
MADE BY :-- SHAHNAWAZ KHAN RAVINDER SINGH ABHIJEET AUGSTINE MADE BY :-- SHAHNAWAZ KHAN RAVINDER SINGH ABHIJEET AUGSTINE PRESENTATIONONC++PRESENTATIONONC++
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Summing Up Object Oriented Design. Four Major Components: Abstraction modeling real-life entities by essential information only Encapsulation clustering.
Programming Paradigms Lecturer Hamza Azeem. What is PP ? Revision of Programming concepts learned in CPLB Learning how to perform “Object-Oriented Programming”
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.
1 Object Oriented Programming Development z By: Marc Conrad University of Luton z z Room: D104.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science)
Copyright 2006 Oxford Consulting, Ltd1 January Introduction to C++ Programming is taking A problem Find the area of a rectangle A set of data.
Lecture 2: Review of Object Orientation. © Lethbridge/La ganière 2005 Chapter 2: Review of Object Orientation What is Object Orientation? Procedural.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Lecturer: Nguyen Thi Hien Software Engineering Department Home page: hienngong.wordpress.com Chapter 2: Language C++
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
CSCI 171 Presentation 15 Introduction to Object–Oriented Programming (OOP) in C++
Testing in OO Environment The reasons for testing is not any different for any of the design and implementation methodologies, including OO methodology.
Object Oriented Paradigm OOP’s. Problems with Structured Programming As programs grow ever larger and more complex, even the structured programming approach.
Introduction to Object Oriented Programming Lecture-3.
Structure A Data structure is a collection of variable which can be same or different types. You can refer to a structure as a single variable, and to.
1 n Object Oriented Programming. 2 Introduction n procedure-oriented programming consists of writing a list of instructions and organizing these instructions.
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
Object Oriented Programming Development
Programming paradigms
Object Oriented Programming
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
Sachin Malhotra Saurabh Choudhary
CHAPTER 5 GENERAL OOP CONCEPTS.
GENERAL OOPs CONCEPTS.
Object Oriented Programming
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Object Oriented Analysis and Design
Object oriented vs procedural programming
CIS601: Object-Oriented Programming in C++
BCA-II Object Oriented Programming using C++
Object-Oriented PHP (1)
Presentation transcript:

Object Oriented Programming Development

What are we doing today? Introduction of: the lecturer Objects Basic Terminology C++ the module

PROGRAMMING PARADIGMS A Programming Paradigms defines the Methodology of designing and implementing programs using the key feature and building blocks of a Programming Language . Types 1. Procedural Programming 2. Object Based Programming 3. Object Oriented Programming

Procedural Programming A Program in a procedural language is a list of instruction where each statements tells the computer to do something. The focus is on the Processing, the Algorithm needed to perform the desired computation.

Object Based Programming In this programming data and its associated meaningful function as enclosed in one single entity a class. Classes enforce information hiding and abstraction thereby separating the implementation details & uses the interface.

Object Oriented Programming This programming paradigm is support of object based programming. It offers all the features of object based programming and overcomes its limitations by implementing inheritance so that real world relations among objects can be represented programmatically.

What is Object Oriented Programming? Identifying objects and assigning responsibilities to these objects. Objects communicate to other objects by sending messages. Messages are received by the methods of an object An object is like a black box. The internal details are hidden.

What is an object? Tangible Things as a car, printer, ... Roles as employee, boss, ... Incidents as flight, overflow, ... Interactions as contract, sale, ... Specifications as colour, shape, …

So, what are objects? an object represents an individual, identifiable item, unit, or entity, either real or abstract, with a well-defined role in the problem domain. Or An "object" is anything to which a concept applies. Etc.

Why do we care about objects? Modularity - large software projects can be split up in smaller pieces. Reuseability - Programs can be assembled from pre-written software components. Extensibility - New software components can be written or developed from existing ones.

Example: The Person class #include<string> #include<iostream> class Person{ char name[20]; int yearOfBirth; public: void displayDetails() { cout << name << " born in " << yearOfBirth << endl; } //... }; private data public processes

The two parts of an object Object = Data + Methods or to say the same differently: An object has the responsibility to know and the responsibility to do. = +

Basic Terminology Abstraction is the representation of the essential features of an object. These are ‘encapsulated’ into an abstract data type. Encapsulation is the practice of including in an object everything it needs hidden from other objects. The internal state is usually not accessible by other objects.

Basic Terminology: Inheritance Inheritance means that one class inherits the characteristics of another class. This is also called a “is a” relationship: A car is a vehicle A dog is an animal A teacher is a person

2. Inheritance Concepts Derive a new class (subclass) from an existing class (base class or superclass). Inheritance creates a hierarchy of related classes (types) which share code and interface. 15

Inheritance Examples

Types of Inheritance Single Multiple Multilevel Hierarchical Hybrid

Basic Terminology: Polymorphism Polymorphism means “having many forms”. It allows different objects to respond to the same message in different ways, the response specific to the type of the object. E.g. the message displayDetails() of the Person class should give different results when send to a Student object (e.g. the enrolment number).

Types of Polymorphism Compile time/ Static Polymorphism Function Overloading Run time/ Dynamic Polymorphism Virtual Function Operator Overloading

Basic Terminology: Modularity Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules For example the computer system comprises CPU, Monitor, Keyboard , Mouse & Speakers etc. Now these parts are complete unit in themselves, yet they are a subpart of computer. This is Modularity .

Basic Terminology: Behaviour and Messages The most important aspect of an object is its behaviour (the things it can do). A behaviour is initiated by sending a message to the object (usually by calling a method).

The two steps of Object Oriented Programming Making Classes: Creating, extending or reusing abstract data types. Making Objects interact: Creating objects from abstract data types and defining their relationships.

Historical Notes C++ owes most to C. Other ancestors are Simula67 and Algol68. First versions of C++ in 1980 under the name “C with classes”. Since 1983 the name C++ is used. 1990: ANSI/ISO 9899 defines a standard for C 1998: ISO/IEC 14882 specifies the standard for C++ C++ 1987

C++ and C C is a subset of C++. Advantages: Existing C libraries can be used, efficient code can be generated. But: C++ has the same caveats and problems as C (e.g. pointer arithmetic,…). C++ can be used both as a low level and as a high level language. We focus on the high level aspects.

C++ and Java Java is a full object oriented language, all code has to go into classes. C++ - in contrast - is a hybrid language, capable both of functional and object oriented programming. So, C++ is more powerful but also more difficult to handle than Java.

Advantages of OOPs Re use of Code It model real world well Program are easy to understand Easy redesign & Extension

Disadvantages of OOPs The relations among classes become artificial as times The OOPs Program’s design is tricky. To program with OOP, Programmer proper Skil.

Module Outline Introduction The non object oriented basics Classes Design Approaches Testing Inheritance Aggregation Polymorphism Multifile Development

Thank You