Object-oriented programming principles

Slides:



Advertisements
Similar presentations
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
Advertisements

Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
Inheritance Definition Relationships Member Access Control Data Encapsulation Overloading vs. Overriding Constructors & Destructors.
ISE 582: Web Technology for Industrial Engineers University of Southern California Department of Industrial and Systems Engineering Lecture 4 JAVA Cup.
OOP in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
INTRODUCTION TO JAVA PROGRAMMING Chapter 1. What is Computer Programming?
BACS 287 Basics of Object-Oriented Programming 1.
Abstraction, Inheritance, and Polymorphism in Java.
Programming Languages and Paradigms Object-Oriented Programming.
OBJECT ORIENTED PROGRAMMING CONCEPTS ISC 560. Object-oriented Concepts  Objects – things names with nouns  Classes – classifications (groups) of similar.
Data Structure and Algorithm: CIT231 Lecture 4: ADT and Introduction to Object Oriented Programming (OOP) DeSiaMore DeSiaMorewww.desiamore.com/ifm1.
1. 2 Object-Oriented Concept Class & Object Object-Oriented Characteristics How does it work? Relationships Between Classes Development Tools Advantage.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Programming Languages and Paradigms Object-Oriented Programming.
CS212: Object Oriented Analysis and Design Lecture 15: Inheritance in C++ -II.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 15: Object-Oriented Data Modeling Modern Database Management 9 h Edition Jeffrey A.
Designing Classes Prelude © 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank.
Object-Oriented Data Modeling
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
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.
CS451 - Lecture 2 1 CS451 Lecture 2: Introduction to Object Orientation Yugi Lee STB #555 (816) * Acknowledgement:
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
1 OOP - An Introduction ISQS 6337 John R. Durrett.
Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.
“everything is an object”. Class Template Code for defining an object Objects are created with NEW keyword (method) Namespace – (disambiguation) Context.
Programming Paradigms Different paradigms Procedural paradigm, e.g. Pascal Basic Functional paradigm, e.g. Lisp Declarative paradigm, e.g. Prolog Object-Oriented.
Chapter More on Classes Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg.
AD Lecture #1 Object Oriented Programming Three Main Principles 1 Inheritance Encapsulation Polymorphism.
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
1 Lecture 23: Dynamic Binding (Section ) CSCI 431 Programming Languages Fall 2002 A compilation of material developed by Felix Hernandez-Campos.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
Exceptions and Handling
1 C++ Classes & Object Oriented Programming Overview & Terminology.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
Chapter 11: Abstract Data Types Lecture # 17. Chapter 11 Topics The Concept of Abstraction Advantages of Abstract Data Types Design Issues for Abstract.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Abstract Classes, Abstract Methods, Override Methods
Object-Oriented Modeling
OOP Course - Virtual Trip
Business System Development
The Movement To Objects
CHAPTER 5 GENERAL OOP CONCEPTS.
Python First Edition STARTING OUT WITH Chapter 10 Inheritance
Object-oriented software testing
Introduction to Programming
Controlling execution - iteration
A Lecture for the c++ Course
OOP What is problem? Solution? OOP
Beginning C++ Programming
Arithmetic & other operations
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Sampling Distributions
Inferences About Proportions of Two Groups
Inferences About Means from Two Groups
3 Fundamentals of Object-Oriented Programming
About the Two Different Standard Normal (Z) Tables
Creating and Using Classes
Chapter 10 Thinking in Objects
Understanding How Hypothesis Testing Works
Determining Sample Size
Corresponds with Chapter 7
Inferences About the Population Proportion
Object Oriented Programming
Basic OOP Concepts and Terms
What Is Good Software(Program)?
Object Oriented Analysis and Design
Object-Oriented Programming
The Object Paradigm Classes – Templates for creating objects
Chapter 20 Object-Oriented Concepts and Principles
Presentation transcript:

Object-oriented programming principles A Lecture for the c++ Course Each slide has its own narration in an audio file. For the explanation of any slide, click on the audio icon to start the narration. The Professor‘s C++Course by Linda W. Friedman is licensed under a  Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Oop principles Inheritance, encapsulation, and polymorphism are the basic principles of object-oriented programming. OOP Principles

Inheritance Inheritance is the guiding principle for the relationship between classes. This is an explicit is-a relationship. Examples: Zebra is-a mammal Flower is-a plant Subclass  superclass The more specialized class inherits attributes and behaviors from the more generalized class. OOP Principles

Encapsulation  Encapsulation means that a class is cohesive and self-contained. The purpose of encapsulation is information hiding. If a class is designed well, its definition (implementation) can easily be hidden from other programmers who use the class in their programs; they only need to see the class interface in order to use the class. OOP Principles

Polymorphism  Polymorphism - poly (many) morph (form) - if two (or more) objects have the same interface (what the user of the class sees), but exhibit different behaviors, they are said to be polymorphic. Similar to function / operator overloading. OOP Principles

What vs. how Just like we learned when programming with functions, with classes we also distinguish between the interface and the implementation. Interface - the visible functionality of a class -- the "what" Implementation - the internal functionality and attributes of a class. A class's implementation is hidden from users of the class. -- the "how" OOP Principles

Review What did we learn in this lecture? Plenty. Some terms to jog your memory: base class polymorphism class class attributes class implementation class interface encapsulation information hiding inheritance object OOP Principles