Object Oriented Analysis and Design

Slides:



Advertisements
Similar presentations
Object Oriented Programming
Advertisements

Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
Module 8 “Polymorphism and Inheritance”. Outline Understanding Inheritance Inheritance Diagrams Constructors in Derived Classes Type Compatibility Polymorphism.
Objectives Introduction to Inheritance and Composition (Subclasses and SuperClasses) Overriding (and extending), and inheriting methods and constructors.
Chapter 10: Introduction to Inheritance
Object-Oriented PHP (1)
1 CS1001 Lecture Overview Homework 3 Homework 3 Project/Paper Project/Paper Object Oriented Design Object Oriented Design.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
1 Chapter 7 l Inheritance Basics l Programming with Inheritance l Dynamic Binding and Polymorphism Inheritance.
Object Oriented Concepts in Java Objects Inheritance Encapsulation Polymorphism.
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.
C++ fundamentals.
 By Wayne Cheng.  Introduction  Five Tenets  Terminology  The foundation of C++: Classes.
2.5 OOP Principles Part 1 academy.zariba.com 1. Lecture Content 1.Fundamental Principles of OOP 2.Inheritance 3.Abstraction 4.Encapsulation 2.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Taken from slides of Starting Out with C++ Early Objects Seventh Edition.
“is a”  Define a new class DerivedClass which extends BaseClass class BaseClass { // class contents } class DerivedClass : BaseClass { // class.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
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.
Introduction to Object Oriented Programming. Object Oriented Programming Technique used to develop programs revolving around the real world entities In.
Features of Object Oriented Programming Lec.4. ABSTRACTION AND ENCAPSULATION Computer programs can be very complex, perhaps the most complicated artifact.
Inheritance in the Java programming language J. W. Rider.
OOP: Encapsulation,Abstraction & Polymorphism. What is Encapsulation Described as a protective barrier that prevents the code and data being randomly.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Learners Support Publications Object Oriented Programming.
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
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.
Classes, Interfaces and Packages
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
Object orientation and Packaging in Java Object Orientation and Packaging Introduction: After completing this chapter, you will be able to identify.
Author: DoanNX Time: 45’.  OOP concepts  OOP in Java.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (2/2)
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
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.
COMPUTER SCIENCE & TECHNOLOGY DEGREE PROGRAMME FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UVA WELLASSA ‏ Properties of Object Oriented Programming.
Notices Assn 2 is due tomorrow, 7pm. Moodle quiz next week – written in the lab as before. Everything up to and including today’s lecture: Big Topics are.
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Inheritance Modern object-oriented (OO) programming languages provide 3 capabilities: encapsulation inheritance polymorphism which can improve the design,
Object-Oriented Programming
Modern Programming Tools And Techniques-I
Object-Oriented Design
OOP: Encapsulation &Abstraction
Object-Oriented Programming Concepts
Reuse Separate classes could be developed for all the different objects that are needed in each program. However that would be wasteful. Often many functionalities.
JAVA By Waqas.
CHAPTER 5 GENERAL OOP CONCEPTS.
Inheritance and Polymorphism
OOP What is problem? Solution? OOP
Inheritance Modern object-oriented (OO) programming languages provide 3 capabilities: encapsulation inheritance polymorphism which can improve the design,
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Object Oriented Analysis and Design
Inheritance Basics Programming with Inheritance
Object Oriented Programming
Computer Programming with JAVA
Inheritance and Polymorphism
Object Oriented Analysis and Design
Eighth step for Learning C++ Programming
Object-Oriented PHP (1)
Object-Oriented Programming
Lecture 10 Concepts of Programming Languages
Object Oriented Programming(OOP)
Computer Science II for Majors
Presentation transcript:

Object Oriented Analysis and Design Object Oriented programming in C++

Encapsulation Wrapping up data and functions into single unit Advantages Restrict access to its internal data Easy maintenance

Encapsulation class Student { private : int AM; int EM; public : void ReadMarks() cout<<"Enter Assignment Marks : "; cin>>AM; } }; Because both data members and faction members are included in a single class , this supports encapsulation

Abstraction Advantages Hiding complexity by hiding unnecessary details Restrict access to its internal operations Hiding implementation complexity Provide simple interface

Abstraction Abstraction is provided using access specifies class Student { private : int AM; int EM; } Abstraction is provided using access specifies Public - members declared as Public are accessible from outside the Class through an object of the class. Protected - members declared as Protected are accessible from outside the class BUT only in a class derived from it. Private - members are only accessible from within the class.

Inheritance Forming a new class from an existing class as new class acquires the old class information Advantages Code reusability Reduce development time and effort Provide specialization Extendibility Can extend an already made classes by adding new features

Inheritance

Polymorphism Polymorphism is the ability of an object to take on many forms. Allowing operators and functions to behave differently in different context. Same name can used to deferent functions Two types of Polymorphism Overloading Overriding

Overloading Ability to create multiple methods of the same name with different implementations. Use deferent parameters

Overriding Allows a subclass or child class to provide a specific implementation of a method that is already provided by one of its super classes or parent classes

Dynamic binding Also known as late binding Code associated with a given procedure call is not known until the time of call at run time

Message Request to perform an operation Communication among objects Function call Return msg Communication among objects

Benefits of OOP Eliminate redundant code Developing extensible software for future changes Encapsulation and abstraction helps to develop secure programs Software complexity can easily manage