OBJECT ORIENTED PROGRAMMING M Taimoor Khan

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

NI LabVIEW Object-Oriented Programming
When is Orientated Programming NOT? Mike Fitzpatrick.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Classes & Objects Computer Science I Last updated 9/30/10.
Object-Oriented Analysis and Design
Chapter 1 Object-Oriented System Development
Introduction To System Analysis and Design
Object-Oriented PHP (1)
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
Chapter Object-Oriented Practices. Agenda Object-Oriented Concepts Terminology Object-Oriented Modeling Tips Object-Oriented Data Models and DBMSs.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Basic OOP Concepts and Terms
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
© Wolfgang Pelz Introduction Object-Oriented Methods: Analysis, Design & Programming Dr. Wolfgang Pelz Dr. Yingcai Xiao The University of Akron.
Data Abstraction and Object- Oriented Programming CS351 – Programming Paradigms.
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.
BACS 287 Basics of Object-Oriented Programming 1.
Introduction To System Analysis and design
Copyright © 2002, Systems and Computer Engineering, Carleton University Intro.ppt * Object-Oriented Software Development Unit 1 Course.
Programming Languages and Paradigms Object-Oriented Programming.
Object Oriented Analysis By: Don Villanueva CS 524 Software Engineering I Fall I 2007 – Sheldon X. Liang, Ph. D.
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.
Object Oriented Programming Lecturer: Andreas P. Adi
Object Oriented Design and Programming Alan Goude Room: Sheaf 9323.
Object Oriented Programming with JAVA Arash N. Kia AlZahra University Definitions – Part 1.
Recap (önemli noktaları yinelemek) from last week Paradigm Kay’s Description Intro to Objects Messages / Interconnections Information Hiding Classes Inheritance.
Unified Modeling Language, Version 2.0
Introduction To System Analysis and Design
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.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
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.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
Dale Roberts Object Oriented Programming using Java - Introduction Dale Roberts, Lecturer Computer Science, IUPUI Department.
Learners Support Publications Object Oriented Programming.
CSC 131 Fall 2006 Lecture # 6 Object-Oriented Concepts.
Abstraction ADTs, Information Hiding and Encapsulation.
Lecture 10 Concepts of Programming Languages Arne Kutzner Hanyang University / Seoul Korea.
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
Object-Oriented Programming Chapter Chapter
1 OOP - An Introduction ISQS 6337 John R. Durrett.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Chapter 1 OBJECT-ORIENTED ANALYSIS AND DESIGN Objectives Describe the book goals and scope Define OOA/D (Object-Oriented Analysis and Design) Illustrate.
ISBN Object-Oriented Programming Chapter Chapter
1 Unified Modeling Language, Version 2.0 Chapter 2.
CMSC 345 Fall 2000 OO Design. Characteristics of OOD Objects are abstractions of real-world or system entities and manage themselves Objects are independent.
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.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
C++ General Characteristics: - Mixed typing system - Constructors and destructors - Elaborate access controls to class entities.
Chapter 12: Support for Object- Oriented Programming Lecture # 18.
1 Advanced Software Architecture Muhammad Bilal Bashir PhD Scholar (Computer Science) Mohammad Ali Jinnah University.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Object Oriented Programming
The Movement To Objects
Object Oriented Programming in Java
Object-Orientated Programming
More Object-Oriented Programming
Basic OOP Concepts and Terms
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Lecture 10 Concepts of Programming Languages
Presentation transcript:

OBJECT ORIENTED PROGRAMMING M Taimoor Khan

Course Description It teaches the concepts of object-oriented programming. Topics include data abstraction, encapsulation, hierarchy via composition and derivation (inheritance), and polymorphism. C++ used for lab work. A computer science major that makes the basis of programming applications.

Course Relevance This course is of key importance to advance to programming as a profession. It gives all the important concepts and practical experience of the programming language. It can be extended to learning other languages like Java, PHP C# etc by using the same knowledge in different syntax

Course Outline  Classes  Polymorphism  Encapsulation  Operators overloading  Method overriding  Templates  Inheritance  Types of classes

Marks Distribution Criteria%age 1 st Sessional10% 2 nd Sessional15% Assignments10% Quizes15% Final Exam50%

Course Flow  Key concepts  Quick Revision  Class practice  Notes  Resource  Labs  Lab Instructor Mr. Waqas Ahmed

Course Textbook(s)  Object Oriented Programming in C++ 4 th Edition by Robert Lafore  How to Program in C++ 7 th Edition by Deitel n Deitel

Object Oriented Programming  An approach to application development  Appropriate for large scale applications with teams of developers  OO Programming paradigm: collection of objects

 The proverb “owning a hammer doesn’t make one an architect” is especially true with respect to object technology  Knowing an object language is necessary but insufficient to create object systems  Its about analyzing system requirements in terms of objects and allocating responsibilities to class objects  How would these objects collaborate with each other  What classes should do what OOAD

 It emphasizes on finding requirements and problems rather than solutions  Object oriented analysis is a process of analyzing requirements in an object oriented paradigm  It approves some of the requirements while discards others  Based on this OOA the OOD is built OOA

 It emphasizes on the conceptual solution in software or hardware that fulfills the requirements  It does not give any implementation details  Design ideas normally exclude low level details that are obvious to the intended customers  Ultimately designs can be implemented in code to give its true and complete realization OOD

How to solve OOP problem  Identify nouns, they are your potential objects (Discard irrelevant ones)  Identify adjectives, they are your potential attributes (Discard irrelevant ones)  Identify verbs, they are your potential behaviors (Discard irrelevant ones)  What is irrelevant!  Classes (Object types)  Map classes (Communication channels)

Case study  A system is required that will allow users to login through their valid name and password. Users will have to register first to use the system. Users will be required to make their profile with their personal data as first name, last name, date of birth and city. Users should be able to add other users as friends. Users can send messages to their friends

The evolution of OOP  Global Variables  Life time spans program execution  Local Variables  Life time limited to execution of a specific routine  Instance variables  Posses data of an object  Static Variables  Visible in single scope  Modules  Allow several subroutines to share a set of static variables  Module Types  Multiple instances of an abstraction  Classes  Families of related abstraction

Why OOP  Reduces conceptual load by reducing amount of detail  Provides fault containment  Can’t use components e.g (class ) in inappropriate ways  Provides independence between components  Design development can be done by more than one person

Keys to OOP  An instance of a class is called object  Languages that are based on classes are called object oriented languages  For example C++  Java  Microsoft.NET framework languages C#, VC++

Benefits of OOP  Promote code reuse  Reduces code maintenance  Simplifies extending applications

Methods  Functions still do the work in OO  But now they  Just know what they need to know  Generally contain less code

Keys to OO Programming  Encapsulation (Data Hiding)  Enable programmer to group data and subroutines (methods) together, hiding irrelevant details from users  Inheritance  Enables a new abstraction ie a derived class to be defined as an extension of an existing abstraction, retaining key characteristics  Dynamic data binding  Enabling use of new abstraction i.e derived classes to exhibit new behavior in context of old abstraction

Initialization and Finalization of Objects  Choosing a constructor  How are constructors supported in the language  Execution order of initialization  E.g with derived classes  Garbage collection  Destructors

Classes and objects  Objects are actors in your application  Refers to individual pieces of data  A class define the data and behavior of object  Objects in your application are instances of a class

Objects  An object is a thing  More precisely an object is the representation of a thing  Has characteristics We call these attributes or properties Properties are just variables rebranded Those things which the object has  Has behavior We call these methods Methods are just functions rebranded Those things which the object does

Inheritance  Defines subclasses  Creates ‘is a’ relationship  E.g Nokia is a cell phone  Resuse common functionality  Specialization  Extend or override common functionality for specific needs

Encapsulation  Treat each object as a black box  Well defined interface of data and methods  Must use this interface in the application  All data is private  Methods can be public, private or protected