SNPL1 Woochang Lim What (Variable) + How (Function) = Object Objects are the physical and conceptual things we find in the universe around us. Object-Oriented.

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

1 OBJECT-ORIENTED CONCEPTS. 2 What is an object?  An object is a software entity that mirrors the real world in some way.  A software object in OOP.
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
Chapter 1 Object-Oriented System Development
Object-Oriented Design & Programming Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Introduction to Programming with Java “Object Oriented” Programming Compiling & Running Java Programs.
OOP & JAVA. HelloWorld.java /** * The HelloWorld class is an application that * displays "Hello World!" to the standard output. */ public class HelloWorld.
Object Oriented System Development with VB .NET
OBJECT ORIENTED PROGRAMMING What is Object Oriented Software? Software based on the creation of objects An object is a “black box” which receives and.
Computers: Tools for an Information Age
HST 952 Computing for Biomedical Scientists Lecture 2.
1 CMSC 132: Object-Oriented Programming II Software Development IV Department of Computer Science University of Maryland, College Park.
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
Introduction to Object-oriented Programming Introduction to Object-oriented Programming CMPS 2143.
(c) University of Washington03-1 CSC 143 Java Inheritance Reading: Ch. 10.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Object Oriented Software Development
Programming Languages and Paradigms Object-Oriented Programming.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
C++ Object Oriented 1. Class and Object The main purpose of C++ programming is to add object orientation to the C programming language and classes are.
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
Microsoft Visual Basic 2005: Reloaded Second Edition
Introduction to Object-oriented programming and software development Lecture 1.
BCS 2143 Introduction to Object Oriented and Software Development.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
An Object-Oriented Approach to Programming Logic and Design
Sadegh Aliakbary Sharif University of Technology Fall 2011.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
Introduction to Objects Adapted from “TEN STEPS TO OBJECT-SPEAK” a CPT Tech Talk by Joy Starks September 17, 1999.
Object Oriented Programming with JAVA Arash N. Kia AlZahra University Definitions – Part 1.
SE-1010 Dr. Mark L. Hornick 1 Introduction to Object-Oriented Programming (OOP) Part 1.
Introduction To System Analysis and Design
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
CSCI-383 Object-Oriented Programming & Design Lecture 13.
 OOPLs  Help companies reduce complexity  Increase competition in open markets  Speeds up development  Improves maintenance, resusability, modifiability.
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.
OOP Class Lawrence D’Antonio Lecture 3 An Overview of C++
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
Chapter 12 Object Oriented Design.  Complements top-down design  Data-centered view of design  Reliable  Cost-effective.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
1 Programming Paradigms Object Orientated Programming Paradigm (OOP)
Programming Paradigms Lecturer Hamza Azeem. What is PP ? Revision of Programming concepts learned in CPLB Learning how to perform “Object-Oriented Programming”
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
Salman Marvasti Sharif University of Technology Winter 2015.
Object-Oriented Programming Chapter Chapter
 Objects versus Class  Three main concepts of OOP ◦ Encapsulation ◦ Inheritance ◦ Polymorphism  Method ◦ Parameterized ◦ Value-Returning.
Object Oriented Programming
Introduction to Object-Oriented Programming Lesson 2.
Introduction to OOP CPS235: Introduction.
Introduction To OOP 1.0 Fundamentals Of Java Programming Language 2.0 Exception Handling 3.0 Classes, Inheritance And Polymorphism © 2011 | PN AZRINA.
Objective You will be able to define the basic concepts of object-oriented programming with emphasis on objects and classes by taking notes, seeing examples,
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Testing in OO Environment The reasons for testing is not any different for any of the design and implementation methodologies, including OO methodology.
Object Oriented Paradigm OOP’s. Problems with Structured Programming As programs grow ever larger and more complex, even the structured programming approach.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
Object-Oriented Design
Visit for more Learning Resources
Object Oriented Programming
Sections Basic Concepts of Programming
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
C++.
Advanced Programming Behnam Hatami Fall 2017.
Presentation transcript:

SNPL1 Woochang Lim What (Variable) + How (Function) = Object Objects are the physical and conceptual things we find in the universe around us. Object-Oriented Thinking An Introduction to Object-Oriented Programming

SNPL2 History - Simula (1960s): Idea of objects to simulate real-world entities - SmallTalk (1970s): Using software objects for developing applications s: Other object-oriented programming (OOP) languages – C++, Eiffel. Problems in the software development - Software is difficult to develop, modify, and maintain. - Most software are delivered late and over budget. - Programmers are still having to create software from the ground-up because of no code reuse. Solutions - Structured programming - Object-Oriented Programming (OOP) Differences between the structured programming and the OOP - Structured programming: Data and functions are separately. - OOP: The related data and functions are replaced together within one unit.

SNPL3 Objects – A Black Box Object: Like a “black box” - Data+Code - Data: Information which the instructions operates on - Code(function): Sequences of computer instructions - Non-OOP languages: Data and code(function) are separately. State and behavior of an object - State of an object: One of the possible conditions in which an object may exists e.g. Light bulb: on/off - Behavior of an object: Set of operations the object can perform on itself e.g. Printer: Print whatever it receives No need to look inside an object – Information hiding

SNPL4 Classes and Messages Class: A generic definition for a set of similar objects Class provides the specifications for the objects behaviors and attributes. Objects are instances of a class. Example of Class: Animal Attributes: Having four legs and a tail Behaviors: Sleeping and eating Objects: Cat, elephant, and horse Messages: Requests for the receiver objects to carry out the indicated method or behavior and return the result of that action to the sender objects Example of Message: A “person” object sends the “light bulb” object a message to turn on. The “light bulb” object has a behavior that will change its state from off to on. The “light bulb” object turns itself on and indicates to the “person” object that its new state is on.

SNPL5 Encapsulation and Inheritance Encapsulation: The process of hiding the details of an object The only access to manipulate the object data is through its interface. It protects an object’s internal state from other programs. Also, other programs are protected from changes in the object. Therefore, it reduces the ripple effect. Inheritance: A code reuse mechanism to build new objects out of old ones. Inheritance defines a relationship among classes where one class shares the structure and behavior on one or more classes. Example of Inheritance: The class “feline” inherits all the behavior and attributes of the class “animal.” And the class “feline” also has a meow behavior that was not in the class “animal.” It provides a more flexible and adaptable system and enables polymorphism. “Software is not written, it is re-written.”

SNPL6 Polymorphism Polymorphism: Having many forms It provides the ability to use a single message to invoke many different kinds of behavior. Example of Polymorphism: A class “shape” with a draw behavior The draw behavior will draw any instances of shape. Classes “triangle,” “rectangle,” and “circle” are inheritances of the “shape.” Within these inherited classes of “triangle,” “rectangle,” and “circle,” the draw behavior is rewritten to draw a triangle, rectangle, and circle, respectively. If a “triangle” object calls the draw behavior, a triangle will be drawn. For the “rectangle,” a rectangle will be drawn. And a circle is drawn for the “circle” object. Therefore, the individual implementation of each different shape is hidden behind a single interface or behavior, “draw.”

SNPL7 Object-Oriented Languages C++: An object-oriented version of C - It is compatible with C. C++ has all merits of the C languages. Easy to use for the C programmer - Compilation language: Fast execution and small code size Smalltalk: A pure object-oriented language. - It runs on the virtual machine. - It provides a rich class library. Java: Latest, flashiest object-oriented language - It is designed as a portable language that can run on any web-enabled computer via that computer’s Web browser. (The standard Internet and Intranet programming language) - Mixture of C++ and Smalltalk It has the syntax of C++, making it easy to learn. It runs on a Smalltalk-style virtual machine.