CS 2511 Fall 2014. Features of Object Oriented Technology  Abstraction Abstract class Interfaces  Encapsulation Access Specifiers Data Hiding  Inheritance.

Slides:



Advertisements
Similar presentations
Based on Java Software Development, 5th Ed. By Lewis &Loftus
Advertisements

C++ Classes & Data Abstraction
Information Hiding Chapter 5: Classes and Objects in Depth.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
1 Fall 2007ACS-1903 Chapter 6: Classes Classes and Objects Instance Fields and Methods Constructors Overloading of Methods and Constructors Scope of Instance.
UML Class Diagram: class Rectangle
CS 2511 Fall  Abstraction Abstract class Interfaces  Encapsulation Access Specifiers Data Hiding  Inheritance  Polymorphism.
 By Wayne Cheng.  Introduction  Five Tenets  Terminology  The foundation of C++: Classes.
1 Review: Two Programming Paradigms Structural (Procedural) Object-Oriented PROGRAM PROGRAM FUNCTION OBJECT Operations Data OBJECT Operations Data OBJECT.
1 Chapter 8 Objects and Classes. 2 Motivations After learning the preceding chapters, you are capable of solving many programming problems using selections,
Classes in C++ Bryce Boe 2012/08/15 CS32, Summer 2012 B.
More C++ Bryce Boe 2013/07/18 CS24, Summer 2013 C.
Principles of Computer Programming (using Java) Review Haidong Xue Summer 2011, at GSU.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
Classes and Class Members Chapter 3. 3 Public Interface Contract between class and its clients to fulfill certain responsibilities The client is an object.
CIT241 Prerequisite Knowledge ◦ Variables ◦ Operators ◦ C++ Syntax ◦ Program Structure ◦ Classes  Basic Structure of a class  Concept of Data Hiding.
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.
Object-Oriented Modeling Using Modified Modeling Language (UML)
CS200 Algorithms and Data StructuresColorado State University Part 4. Advanced Java Topics Instructor: Sangmi Pallickara
Chapter 7 Objects and Classes 1 Fall 2012 CS2302: Programming Principles.
Data Structures Using C++1 Chapter 1 -Software Engineering Principles -ADT and Classes.
Chapter 10 Classes and Objects In-Depth. Chapter 10 A class provides the foundation for creating specific objects, each of which shares the general attributes,
Summing Up Object Oriented Design. Four Major Components: Abstraction modeling real-life entities by essential information only Encapsulation clustering.
Midterm Study Guide COP 4331 and EEL4884 OO Processes for Software Development © Dr. David A. Workman School of EE and Computer Science University of Central.
1 OOP - An Introduction ISQS 6337 John R. Durrett.
CIS 270—Application Development II Chapter 8—Classes and Objects: A Deeper Look.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Introduction to Object Oriented Programming (OOP) Object Oriented programming is method of programming.
OOP Review CS 124.
Object Oriented Programming Session # 03.  Abstraction: Process of forming of general and relevant information from a complex scenarios.  Encapsulation:
Presented by Ted Higgins, SQL Server DBA An Introduction to Object – Oriented Programming.
Defining Classes I Part B. Information hiding & encapsulation separate how to use the class from the implementation details separate how to use the class.
1 Review for Midterm 2 Aaron Bloomfield CS 101-E.
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.
Chapter 11 An introduction to object-oriented design.
1 Inheritance One of the goals of object oriented programming is code reuse. Inheritance is one mechanism for accomplishing code reuse. It allows us to.
INTRODUCTION TO CLASSES & OBJECTS CREATING CLASSES USING C#
Classes CS 162 (Summer 2009). Parts of a Class Instance Fields Methods.
Geoff Holmes and Bernhard Pfahringer COMP206-08S General Programming 2.
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
OOP: Encapsulation &Abstraction
Objects as a programming concept
Object-Oriented Programming Concepts
The Movement To Objects
2.7 Inheritance Types of inheritance
Module 5: Common Type System
Chapter 3: Using Methods, Classes, and Objects
About the Presentations
Object-Orientated Programming
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
SNSCT_CSE_PROGRAMMING PARADIGM_CS206
UML Class Diagram: class Rectangle
Object Oriented Analysis and Design
Object Oriented Analysis and Design
ניתוח מערכות מידע א' הרצאה 3
Corresponds with Chapter 7
OBJECT ORIENTED PROGRAMMING II LECTURE 8 GEORGE KOUTSOGIANNAKIS
Object-Oriented Programming
Object-Oriented Programming
Chapter 5: Classes and Objects in Depth
COP 3330 Object-oriented Programming in C++
Object-Oriented Programming
By Rajanikanth B OOP Concepts By Rajanikanth B
Chapter 5: Classes and Objects in Depth
ITE “A” GROUP 2 ENCAPSULATION.
CSG2H3 Object Oriented Programming
Chapter 5 Classes.
Presentation transcript:

CS 2511 Fall 2014

Features of Object Oriented Technology  Abstraction Abstract class Interfaces  Encapsulation Access Specifiers Data Hiding  Inheritance  Polymorphism

Encapsulation  A software development technique that consists of isolating a system function or a set of data and operations on those data within a module and providing precise specifications for the module -IEEE  Principle of binding processes (Member Method) and data (Member Data) to form an integrated unit is the essence of Encapsulation  Implemented by using the concept of Class

Access/Visibility Specifiers  Used for accessibility of data member and member methods from within and outside the class boundary  Examples: Private Public Protected Default / Package

Data Hiding Process of hiding the members from outside the class Implemented by the concept of “Private” access specifiers Can be accessed only by the member methods of that class where it is defined Data hiding is an important feature of OO programming which allows the data member to be kept safe

Accessors and Mutators  Constructor methods: A new instance of an object is created by calling a constructor method. Values can be passed to a constructor method to set the initial state of an object.  Accessor methods: For every private field we can create a public method that will return its value.  Mutator methods: For every private field we can create a public method that will set its value. If you want a private field to be read only do not create a mutator method for it.

DATE CLASS Present in the java.util package. Some of the methods: boolean after (Date when) boolean before (Date when) int compareTo(Date anotherdate) long getTime() Void setTime() Date d = new Date (y, m, d);

INTERFACE IN UML DIAGRAMS

COMPARABLE INTERFACE Collections.sort(list) int compareTo (Class obj) COMPARATOR INTERFACE Changing the sort order int compare (T obj1, T obj2)