Object-Based Design/Programming An Informal Introduction and Overview CS340100, NTHU Yoshi.

Slides:



Advertisements
Similar presentations
When is Orientated Programming NOT? Mike Fitzpatrick.
Advertisements

Systems Analysis and Design 8th Edition
Overview1 History of Programming Languages n Machine languages n Assembly languages n High-level languages – Procedure-oriented – Object-oriented/Event-driven.
Wednesday, 10/2/02, Slide #1 CS 106 Intro to CS 1 Wednesday, 10/2/02  QUESTIONS (on HW02 – due at 5 pm)??  Today:  Review of parameters  Introduction.
Algorithms and Problem Solving-1 Algorithms and Problem Solving Mainly based on Chapter 6: “Problem Solving and Algorithm Design” from the Book: “Computer.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Basic OOP Concepts and Terms
Chapter Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Systems Analysis & Design Sixth Edition Systems Analysis & Design Sixth Edition Toolkit Part 5.
1 Introduction to C++ Programming Concept Basic C++ C++ Extension from C.
OOP in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
 By Wayne Cheng.  Introduction  Five Tenets  Terminology  The foundation of C++: Classes.
Classes in C++ Bryce Boe 2012/08/15 CS32, Summer 2012 B.
1.11 Introduction to OOP academy.zariba.com 1. Lecture Content 1.What is OOP and why use it? 2.Classes and objects 3.Static classes 4.Properties, fields.
Introduction to Object Oriented Design. Topics Designing Your Own Classes Attributes and Behaviors Class Diagrams.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
Microsoft Visual Basic 2005: Reloaded Second Edition
Object Orientation An Object oriented approach views systems and programs as a collection of interacting objects. An object is a thing in a computer system.
The Software Development Life Cycle: An Overview Presented by Maxwell Drew and Dan Kaiser Southwest State University Computer Science Program.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
Chapter 6 Object-Oriented Java Script JavaScript, Third Edition.
Chapter 7 Objects and Classes 1 Fall 2012 CS2302: Programming Principles.
Object-Oriented Programming
Systems Analysis & Design 7 th Edition Chapter 5.
Systems Analysis and Design 8 th Edition Chapter 6 Object Modeling.
1 3/2/05CS250 Introduction to Computer Science II Composition and friend Functions.
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
Basic OOP Concepts and Terms. In this class, we will cover: Objects and examples of different object types Classes and how they relate to objects Object.
Singleton and Basic UML CS340100, NTHU Yoshi. What is UML Unified Modeling Language A standardized general-purpose modeling language in the field of software.
Session 02 and 03: C# OOP 1 OOP in C#: Classes and Objects in C#. Object-Oriented Design. UML Class Diagram. Object Interaction. FEN AK IT:
1.
: Maha Sabri Altememe Lecturer : Maha Sabri Altememe Lecture :1 1.
1 OOP - An Introduction ISQS 6337 John R. Durrett.
Slide 1 Object-Oriented Analysis and Design Attempts to balance emphasis on data and process Uses Unified Modeling Language (UML) for diagramming Use-case.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 27 I Love this Class.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
1 CSE Programming in C++. 2 Overview Sign roster list Syllabus and Course Policies Introduction to C++ About Lab 1 Fill Questionnaire.
Object Oriented Programming Session # 03.  Abstraction: Process of forming of general and relevant information from a complex scenarios.  Encapsulation:
Introduction to Computers Lesson 13A. home Computer Program A set of instructions or statements, also called code, to be carried out by the computer’s.
Copyright ©2005  Department of Computer & Information Science Object Based JavaScript.
An Introduction to Programming with C++ Fifth Edition Chapter 14 Classes and Objects.
Unified Modeling Language (UML)
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)
OOP in C# - part 1 OOP in C#: –Object Interaction. –Inheritance and Polymorphism (next module). FEN 20121UCN Technology: Computer Science.
Chapter 11 An introduction to object-oriented design.
Computer science Object-Oriented Programming. Overview There are several words that are important: class object instance field property method event.
CPS120: Introduction to Computer Science Lecture 16A Object-Oriented Concepts.
Seventh step for Learning C++ Programming CLASS Declaration Public & Private Constructor & Destructor This pointer Inheritance.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Introduction to OO Programming Andy Wang Object Oriented Programming in C++ COP 3330.
Section 2.1: Programming paradigms
Objects as a programming concept
Table of Contents Class Objects.
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Section 2.1: Programming paradigms
Introduction to Object-oriented Program Design
Introduction to Computer Programming
Object-Oriented Programming
Object-Oriented Programming
CS2011 Introduction to Programming I Methods (I)
C++ Programming ㅎㅎ String OOP Class Constructor & Destructor.
Classes and Objects VB.net.
Object-Oriented Programming
By Rajanikanth B OOP Concepts By Rajanikanth B
Basic OOP Concepts and Terms
Chapter 5.
ㅎㅎ Sixth step for Learning C++ Programming Pointer new, delete String
Presentation transcript:

Object-Based Design/Programming An Informal Introduction and Overview CS340100, NTHU Yoshi

5

4,5,6

Let’s Start with an Example Let x be an Integer – int x = 1; How do you “get the next number”?

Solution Write a function next int next(int number) { return number+1; } … int nextNum = next(x); Any other way?

Integer as an Object Actually, integer can be treated as an “Object” Why not – int nextNumber = x.next(); What do you get in this example?

Another Example Let’s think about “Linked List” How to get B’s “next node”? i.e., node C ABCD

Solutions – function next //Data structure Node typedef struct { Node* next; int value; } Node; //Function next Node next(Node* node) { return node->next; }

Solution – Object-based //Blueprint of a node class Node { private int value; private Node nextNode; public Node next() { return nextNode; } … //Method next b.next();

Object-Based Design All the things are individual objects Three main properties in OOP – Encapsulation – Inheritance – Polymorphism

Give Me Examples (You give me)

Let’s See the Descriptions on Wikipedia A class is a noun… – A blueprint to create objects, aka object factory – Describes the state and behavior that the objects of the class all share. – Encapsulates state through data placeholders called attributes Attributes = member variables = instance variables – Encapsulates behavior through reusable sections of code called methods Behavior = operation = member method = instance method Usually represents a verb (why?)

Review the class Node class Node { private int value; private Node nextNode; public Node next() { return nextNode; }

Summary We have explained Object-Based Design, but we are still far from Object-Oriented Programming (why?) We will study OOP and modeling tools (UML) in the following courses Also, we will study Design Patterns (subset)

Homework Use your pencil and paper to write down an example of blueprint and instances, and indicate which parts are attributes and which are operations

References _science) _science)