OOPS Object-Oriented Programming in Smalltalk. Practical Sessions 1-5 These sessions introduce you to the Smalltalk Environment, and use the familiar.

Slides:



Advertisements
Similar presentations
Structured Problem Solving Object- Oriented Concepts 1.
Advertisements

OOP - Object Oriented Programming Object Oriented Programming is an approach to programming that was developed to make large programs easier to manage.
Systems Analysis and Design 8th Edition
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
Systems development life cycle & development methodologies
Faculty of Sciences and Social Sciences HOPE Structured Problem Solving Object Oriented Concepts 3 Stewart Blakeway FML 213
Faculty of Sciences and Social Sciences HOPE Structured Problem Solving Object Oriented Concepts 2 Stewart Blakeway FML 213
Chapter 1 Object-Oriented System Development
Structured Problem Solving The SmallTalk Environment.
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
1 Software Testing and Quality Assurance Lecture 10 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
Object Oriented System Development with VB .NET
Structured Problem Solving The Smalltalk Environment.
Fall 2007ACS-1805 Ron McFadyen1 Programming Concepts Chapter 4 introduces more advanced OO programming techniques. Construction of a programs usually requires:
© 2005 Prentice Hall8-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Basic OOP Concepts and Terms
1 of 2 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Structured Problem Solving The SmallTalk Environment.
Structured Problem Solving The SmallTalk Environment.
Chapter Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Session 2 Tables and forms in HTML Adapted by Sophie Peter from original document by Charlie Foulkes.
Object-oriented design Part 4: More UML. Interfaces An interface is a language construct specific to Java Java does not support multiple inheritance Interfaces.
1 Object-Oriented Software Engineering CIS 375 Bruce R. Maxim UM-Dearborn.
Object-Oriented Analysis and Design
BACS 287 Basics of Object-Oriented Programming 1.
The chapter will address the following questions:
Building The Analysis Model. Object-Oriented Analysis The object oriented analysis define all classes, the relationships and behavior associated with.
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
Lecture 7: Objects and Interaction 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271 
Spreadsheets in Finance and Forecasting Presentation 11 Visual Basic.
Can be used with any story to recall important facts and details to summarize the main events.
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.
BCS 2143 Introduction to Object Oriented and Software Development.
Mary McKenzie Sociology UNC Charlotte.  Passive Learning: ◦ What type of learning experience do you think of as being passive?  Active Learning: ◦ What.
User Interface Elements of User Interface Group View.
Introduction to Objects Adapted from “TEN STEPS TO OBJECT-SPEAK” a CPT Tech Talk by Joy Starks September 17, 1999.
SE-1010 Dr. Mark L. Hornick 1 Introduction to Object-Oriented Programming (OOP) Part 1.
Unified Modeling Language, Version 2.0
What Is Object-Orientation?
Lecture # 6 Forms, Widgets and Event Handling. Today Questions: From notes/reading/life? Share Personal Web Page (if not too personal) 1.Introduce: How.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Software Design Deriving a solution which satisfies software requirements.
Object Oriented Programming Concepts. Object Oriented Programming Type of programming whereby the programmer defines the data types of a data structure.
Object-Oriented Design Simple Program Design Third Edition A Step-by-Step Approach 11.
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.
Chapter 12 Support for Object oriented Programming.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
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 4 Basic Object-Oriented Concepts. Chapter 4 Objectives Class vs. Object Attributes of a class Object relationships Class Methods (Operations)
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
Programming Paradigms Different paradigms Procedural paradigm, e.g. Pascal Basic Functional paradigm, e.g. Lisp Declarative paradigm, e.g. Prolog Object-Oriented.
AP Computer Science A – Healdsburg High School 1 Unit 2 - Object-Oriented Programming - Example.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
April 6,  Refine our understanding of ELA  Engage with student exemplars and rubrics and designing constructive feedback  Plan – put knowledge.
Basic Characteristics of Object-Oriented Systems
Chapter 11 An introduction to object-oriented design.
KS4EUHS Key Skills for European Union Hotel Staff.
1 M206 Chapter 31: An Overview of Software Development 1.Defining the problem 2.Analyzing the requirement – constructing initial structural model 3.Analyzing.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
OOP - Object Oriented Programming
Chapter 6 Object Concepts
Types of Programming Languages
Colours.
Basic OOP Concepts and Terms
LEARNING STRATEGIES: TRUE COLOURS The True Colours Test.
LEARNING STRATEGIES: TRUE COLOURS The True Colours Test.
Presentation transcript:

OOPS Object-Oriented Programming in Smalltalk

Practical Sessions 1-5 These sessions introduce you to the Smalltalk Environment, and use the familiar idea of PieEater to examine a number of important concepts. The Environments are there for you to explore, and to ensure that you have understood the basic ideas. The most important of these ideas are summarised in this lecture.

Practical Session 1 Practical Session 1 introduces you to a new environment, and some new PieEaters.

Practical Session 2

Practical Session 1 What you should Learn: Each of the PieEaters is an Object, to which we can send messages. We can inspect the state of each object Messages to objects maybe via buttons or Text, and take the form: Receiver (e.g. Pie1 Walk) All objects in the same class have the same attributes and respond in the same way to each message.

Representing Objects This is an object diagram for an object from the PieEater Class It shows: class attributes messages that can be understood Class of Object: PieEater row 2 column 5 direction ”SE” colour ClrRed pen True Protocol: walk, turnLeft, turnRight, home, green, red, penDown, penUp, inspect

Protocol The Protocol of an object is simply the set of messages that an object can understand, together with the effects of those messages message home left effect  receiver moves to position 1  reduces position value by 1

Practical Session 2 This session introduces you to a new class of object- PastieEater This has a different start position and colour

Practical Session 2

What you should learn: Objects belonging to different classes will have some attributes and/or protocols different. Sometimes classes can share some of the same attributes and protocols. This is called Polymorphism.

Practical Session 3 This introduces you to a new object called FlashPieEater This object can respond to all the messages that PieEater can respond to, but also has one further attribute and additional protocols.

Practical Session 3

What you should learn: Subclasses of objects are objects which have all the attributes of the original class (superclass), but have additional attributes (and protocol) We can construct Class Hierarchy Diagrams

Practical Session 4 Session 4 introduces the idea of message arguments. This is achieved in this case by a colour... widget [“widget” = device] Note that green and red are commands which have been programmed but there are no commands to change the colour to blue, for example.

Practical Session 4

What you should learn Messages to objects may sometimes require an argument to be given. For example the message Pie5 colour: ClrBlack will send a message to Pie5 to change its colour to black. These messages can be programmed into “widgets”

Practical Session 5 In this session we look at different ways of communicating with objects. There is a new widget and a message reply box, for the object’s response,

Practical Session 5

What you should learn: All messages to objects return information (whether you want it or not) The message usually is a description of the state of the object after it has completed the action. We can interrogate objects as to their state, and we can use this idea to get objects to collaborate, by asking one to interrogate another, and act on the outcome.

SameColourAs collaboration sameColourAs: Pie2 colour ClrGreen colour: ClrGreen User Pie1Pie2