Encapsulation. Encapsulation Encapsulation means the bringing together of a set of attributes and methods into an object definition and hiding their implementational.

Slides:



Advertisements
Similar presentations
MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
Advertisements

Lilian Blot Announcements Teaching Evaluation Form week 9 practical session Formative Assessment week 10 during usual practical sessions group 1 Friday.
When is Orientated Programming NOT? Mike Fitzpatrick.
Abstraction Lecture-4. ADT example: London Underground Map.
Encapsulation. Encapsulation Encapsulation means the bringing together of a set of attributes and methods into an object definition and hiding their implementational.
Ch 12: Object-Oriented Analysis
OASIS Reference Model for Service Oriented Architecture 1.0
Systems development life cycle & development methodologies
CS-2135 Object Oriented Programming
Architecture is More Than Just Meeting Requirements Ron Olaski SE510 Fall 2003.
A Brief Introduction to Software Design and Design Quality By Laura Leventhal.
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;
Objects First with Java A Practical Introduction using BlueJ
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Object-oriented Programming Concepts
Structured Data Types and Encapsulation Mechanisms to create new data types: –Structured data Homogeneous: arrays, lists, sets, Non-homogeneous: records.
Object-Orientated Design Unit 3: Objects and Classes Jin Sa.
5.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
UML and Object Oriented Concepts
Pattern Abstract Factory
The Design Discipline.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Object Oriented Programming CS160 - OOP. Objects Objects are a Objects are a way to organize and conceptualize a program as a set of interacting objects.
Object-Oriented Programming and Classes Chapter 7.
Component Technology. Challenges Facing the Software Industry Today’s applications are large & complex – time consuming to develop, difficult and costly.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
ISV for waste management software. setting the goal ●Extending the life cycle through modernization ●Enabling more new business ●Providing extra functionality.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
Object-Oriented Programming with Java Lecture 1: Introduction Autumn, 2007.
Abstraction ADTs, Information Hiding and Encapsulation.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
Views of Data Data – nouns of programming world the objects that are manipulated information that is processed Humans like to group information Classes,
5.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
Designing Classes. Software changes Software is not like a novel that is written once and then remains unchanged. Software is extended, corrected, maintained,
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Copyright © 2002 W. A. Tucker1 Chapter 10 Lecture Notes Bill Tucker Austin Community College COSC 1315.
“everything is an object”. Class Template Code for defining an object Objects are created with NEW keyword (method) Namespace – (disambiguation) Context.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1 Chapter 11 © 1998 by Addison Wesley Longman, Inc The Concept of Abstraction - The concept of abstraction is fundamental in programming - Nearly.
1 CS Programming Languages Class 22 November 14, 2000.
(1) ICS 313: Programming Language Theory Chapter 11: Abstract Data Types (Data Abstraction)
1 Copyright © 1998 by Addison Wesley Longman, Inc. Chapter 10 Abstraction - The concept of abstraction is fundamental in programming - Nearly all programming.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Measurement - part 5 1 An Evaluation of the MOOD Set of Object-Oriented Software Metrics Harrison, Counsell and Nithi IEEE Trans on Soft Eng June 1998.
CSci 162 Lecture 8 Martin van Bommel. Large-scale Programming Up to now we have been writing relatively short programs to solve simple problem Want to.
Object Oriented Programming. OOP  The fundamental idea behind object-oriented programming is:  The real world consists of objects. Computer programs.
Chapter 20 Concepts for Object-Oriented Databases Copyright © 2004 Pearson Education, Inc.
 2005 Pearson Education, Inc. All rights reserved. 1 Classes and Objects: A Deeper Look.
Chapter 11: Abstract Data Types Lecture # 17. Chapter 11 Topics The Concept of Abstraction Advantages of Abstract Data Types Design Issues for Abstract.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
Design Concepts ch-8
CompSci 280 S Introduction to Software Development
Concepts of Object Orientation
11.1 The Concept of Abstraction
Object Oriented Concepts -I
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Anatomy of a Class & Method
SOFTWARE DESIGN AND ARCHITECTURE
The Object Oriented Approach to Design
Object-oriented programming principles
Lecture 9 Concepts of Programming Languages
Abstract Data Types and Encapsulation Concepts
John D. McGregor C8 - Tactics
NAME 436.
Abstraction and Objects
11.1 The Concept of Abstraction
Lecture 9 Concepts of Programming Languages
Chapter 11 Abstraction - The concept of abstraction is fundamental in
Presentation transcript:

Encapsulation

Encapsulation Encapsulation means the bringing together of a set of attributes and methods into an object definition and hiding their implementational structure from the object's users. Therefore, how an object structures and implements its attributes and methods is not visible to other objects using it.

Encapsulation Direct access to an object's attributes is not permitted and any changes to the object's data can only be effected indirectly via a set of publicly available methods. Analogy: Egg ◦ Yolk  attribute ◦ White  method

Bundling & Information Hiding Encapsulation is supported by two subordinate concepts: bundling and information hiding. Bundling is the act of associating a set of methods with a set of data as the only means of affecting the values of the data. Related data and methods are therefore brought together in bundling, thus increasing the cohesiveness of object definition.

Bundling & Information Hiding Information hiding refers to the hiding of internal representation of data and methods from the users of these data and methods. By exercising information hiding, data access on an object is limited to a set of publicly available methods.

Bundling & Information Hiding Information hiding enables the separation of the what from the how of object definition. What specifies what behavior an object is capable of and how specifies how the data and methods of an object are implemented.

Enhanced Software Maintainability By separating what from how, a client’s access to an object is not affected by changes in the internal implementation of the object. This enhances software maintainability. Ilustrasi  stack