Smalltalk

Smalltalk - Object Oriented Paradigm Languages The central...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Object Oriented Paradigm Languages The central design goal is to build inherent abstraction into the system, moving all the attached implementation details from the user level to the system level . In addition to the built-in abstraction security, the OOP aims at code sharing via the “ inheritance The basic philosophy of the OOP is to include the data objects manipulating code within the objects themselves (i.e., as their behavior), hence shifting the algorithmic solution encoding from the traditional user domain to the lively data domain, via a message based system, where the user order the data to change their states (and possibly other associated data objects states, in the process), to achieve a desired final state (solution). mechanism. All data elements in the system are built as Abstract Data Types (ADTs). Hence, data can be viewed as “live” “objects”; they have “states” and “protocol” of commands that allow them to messages (commands) to change theirs own states, as well as other objects’ states. Everything in the system is considered to be an “object”, (ADT), which is an instance of some class.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
We can easily draw the relation between data as ADTs and live objects. ADT : Data Structure Set of Operations (to hold the type values) (works on the type) Object : “State” “Protocol” (current object’s value) (Behavioral Commands) OOP’s Vocabulary: 1) Object ”: Encapsulated “state” and a “protocol” (behavior). 2) Class ”: An abstraction (object) that describes a set of other objects that have the same behavior (protocol), but might be at different states (values), at a given time. Such objects can be spawned (instantiated) from the class via an instantiation process. 3) Instance ”: An object instantiated from some class, its protocol is defined in its instantiating class, yet it has its own state . 4) object’s protocol ”: The set of commands or messages that the object can respond to, defining its behavior.
Background image of page 2
5) messages ”: They are commands which are sent from one object to another, asking it to act on its state or other objects states. 6) Methods : They are the concrete implementation (body code) of the above messages. A message is a procedure like call and the method the implementation of such procedure. 7) Inheritance ”: The Smalltalk system defines a class hierarchy of classes with each having zero or more subclasses. Each subclass “inherits” all of its parent class internal definitions ( violation of abstraction! ), and it might redefined some of them, superseding the inherited definitions. Hence, we can easily define new classes as subclasses of exiting classes, without extensive duplication of code, i.e., sharing al parent classes’ definitions, for free. Subtyping
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 15

Smalltalk - Object Oriented Paradigm Languages The central...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online