Technieken van de Software Architectuur, VUB ‘98-’99, Part 11 Object Orientation Review.

Slides:



Advertisements
Similar presentations
1 Classes and Objects in Java Basics of Classes in Java.
Advertisements

Final and Abstract Classes
Copyright © 2002 Pearson Education, Inc. Slide 1.
Chapter 7 System Models.
Chapter 6 Structures and Classes. Copyright © 2006 Pearson Addison-Wesley. All rights reserved. 6-2 Learning Objectives Structures Structure types Structures.
Classes, Exceptions, Collections, and Scrollable Controls
0 - 0.
ALGEBRAIC EXPRESSIONS
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULTIPLYING MONOMIALS TIMES POLYNOMIALS (DISTRIBUTIVE PROPERTY)
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Conceptual / semantic modelling
Methoden …\uml.ppt Folie:1 Rainer Kröning Unified Modeling Language.
Programming Language Concepts
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design 1.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 5.
11 Contracts CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 6)
Technieken van de Software Architectuur, VUB ‘98-’99, Part 11 Technieken van de Software Architectuur Patrick Steyaert
1 UML ++ Mohamed T IBRAHIM University of Greenwich -UK.
General OO Concepts Objectives For Today: Discuss the benefits of OO Programming Inheritance and Aggregation Abstract Classes Encapsulation Introduce Visual.
Lecture plan Outline of DB design process Entity-relationship model
Systems Analysis and Design with UML Version 2.0, Second Edition
Addition 1’s to 20.
25 seconds left…...
Test B, 100 Subtraction Facts
Week 1.
Chapter 11 Component-Level Design
New Rubrics? Create Assignment and Project Templates and Send the Assignments in Tk20 Must do before you can use updated rubrics Theresa Dorn.
1 Abstract Class and Packages from Chapter 9 Lecture.
Modeling Main issues: What do we want to build How do we write this down.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Computer Science Dept. Fall 2003 Object models Object models describe the system in terms of object classes An object class is an abstraction over a set.
CS 340 UML Class Diagrams. A model is an abstraction of a system, specifying the modeled system from a certain viewpoint and at a certain level of abstraction.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Principles of Object-Oriented Software Development The language Smalltalk.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
Stéphane Ducasse6.1 Essential Concepts Why OO? What is OO? What are the benefits? What are the KEY concepts? Basis for all the lectures.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 13 Object-Oriented Programming I am surprised.
Object-oriented Programming Concepts
CS 2511 Fall Features of Object Oriented Technology  Abstraction Abstract class Interfaces  Encapsulation Access Specifiers Data Hiding  Inheritance.
Stéphane Ducasse5.1 Smalltalk in a Nutshell OO Model in a Nutshell Syntax in a Nutshell.
Modelling classes Drawing a Class Diagram. Class diagram First pick the classes –Choose relevant nouns, which have attributes and operations. Find the.
Stéphane Ducasse 1 Smalltalk in a Nutshell.
Object-Oriented Analysis and Design
Object Oriented Software Development
Unified Modeling Language, Version 2.0
CS3773 Software Engineering Lecture 04 UML Class Diagram.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 02. Objects,
Smalltalk (and Squeak) Aida Dungan and Rick Shreve.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
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 Unified Modeling Language, Version 2.0 Chapter 2.
Chapter 16: UML Class Diagrams
CMSC 345 Fall 2000 OO Design. Characteristics of OOD Objects are abstractions of real-world or system entities and manage themselves Objects are independent.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
Class Diagrams Revisited. Parameterized Classes Parameterized Classes - are used to represent relationships between templates.
Basic Characteristics of Object-Oriented Systems
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
Systems Analysis and Design With UML 2
Systems Analysis and Design With UML 2
Object Oriented Concepts -I
UML Class Diagram.
Object Oriented System Design Class Diagrams
Presentation transcript:

Technieken van de Software Architectuur, VUB ‘98-’99, Part 11 Object Orientation Review

Technieken van de Software Architectuur, VUB ‘98-’99, Part 12 Review: OO 4An object-oriented application is a set of interacting entities (objects) 4Objects have state and behaviour 4Message passing is the sole communication mechanism between objects 4Objects are grouped into classes 4Classes are grouped into inheritance hierarchies

Technieken van de Software Architectuur, VUB ‘98-’99, Part 13 Review: Object Encapsulation 4Hiding implementation details 4Protecting state information of objects 4Creating objects with encapsulated state/behaviour 4Communicating via a uniform interface

Technieken van de Software Architectuur, VUB ‘98-’99, Part 14 Objects Communicate via Messages assignment paper time professorassistentstudent writeResearchPaper doAssignment reworkIntoPaper

Technieken van de Software Architectuur, VUB ‘98-’99, Part 15 Object Collaboration professor assistent student 2: doAssignment 3: reworkIntoPaper 1: writeResearchPaper

Technieken van de Software Architectuur, VUB ‘98-’99, Part 16 Attributes and Methods 4An object’s interface contains attributes and methods 4Attributes and methods can be public, protected or private 4Methods are shared by all the objects of the class private public person:Person name:String age:Integer checkAge( ) isParentOf(child:Person):Boolean protected

Technieken van de Software Architectuur, VUB ‘98-’99, Part 17 Messages (What) versus Methods (How) Interface (What) Methods (How)

Technieken van de Software Architectuur, VUB ‘98-’99, Part 18 Review: Classes & Instances 4Class: Template for objects that share common characteristics 4Instance: A particular occurrence of an object defined by a class Class Person Book Instance John Doe: Person Succeeding With Objects: Book

Technieken van de Software Architectuur, VUB ‘98-’99, Part 19 Review: Class Generalisation/Specialisation Person EmployeeFreelanceSelf-Employed

Technieken van de Software Architectuur, VUB ‘98-’99, Part 110 Review: Class Relationships Aggregation Association MotherDaughter 1 cardinality FloorBuilding

Technieken van de Software Architectuur, VUB ‘98-’99, Part 111 Review: Message Expression 4Unary messages »Date today »aPoint x 4Binary messages » Keyword messages »array at:1 put:#Oranges Smalltalk Syntax

Technieken van de Software Architectuur, VUB ‘98-’99, Part 112 Smalltalk: Precedence 4Expressions evaluate from left to right 4Evaluation order »Messages within parentheses »Unary messages »Binary messages »Keyword messages

Technieken van de Software Architectuur, VUB ‘98-’99, Part 113 Smalltalk 4Assignment »aSet := Set new 4Blocks »(2 < 3) ifTrue: [a := 4] ifFalse: [a := 5] »anArray do: [ :a | Transcript show:a printString] 4Returning from a method (^) »^name

Technieken van de Software Architectuur, VUB ‘98-’99, Part 114 Convention In Smalltalk we talk about methods. The UML design equivalent is called operations. In the course slides, the conventional translation from Smalltalk syntax to UML syntax is used: 3unary method ‘m’ -> ‘m()’ 3operator method ‘+’ -> ‘plus(arg:argType)’ 3keyword method ‘x:y:’ -> xY(arg1:a1Type, arg2:a2Type) 3private protocol -> private operation 3protected protocol -> protected operation

Technieken van de Software Architectuur, VUB ‘98-’99, Part 115 UML: Tags and Constraints 4Tags are post-it-notes that can be attached by a line to any entity in a UML diagram. »Tags can contain comments, documentation, or semantic information 4Constraints can be used to add additional semantic information to a UML diagram »Denoted between curly braces { } »Usually expressed in OCL »Other constraints also allowed This is a comment. {version = 1.1} {developer=“Tom”} {abstract} {invokes send}