Chapter 1: Introduction to Object Oriented Paradigm Software Crisis


Agents, Responsibility, Messages and Methods



Yüklə 379,92 Kb.
Pdf görüntüsü
səhifə5/10
tarix26.06.2023
ölçüsü379,92 Kb.
#135215
1   2   3   4   5   6   7   8   9   10
C Chapter1

Agents, Responsibility, Messages and Methods 
The person whom I request to solve my problem is an agent (florist) and the agent possesses my 
messages to my grandmother. It is responsibility of florist to satisfy my request. There are some 
methods- some algorithm or set of operations used by florist to do this. I may not know the detail about 
the method used by florist to send flowers to my grandmother. So, this information is hidden to my 
inspection. So, our first principle of object-oriented problem solving is the vehicle by which activities are 
re-initiated. 
Action is initiated in object-oriented programming by the transmission of message to an agent 
can object responsible for the action. The messages encode the request for an action and is 
accompanied by any additional information (arguments) needed to carry out the request. The receiver is 
the agent to whom the message is sent. If the receiver accepts the message, it accepts the responsibility 
to carry out the indicated action. In response to a message, the receiver will perform some method to 
satisfy the request. 
Computation as Simulation 
In object-oriented framework we never mention memory addresses, variables, assignments or 
any of the conventional programming terms. Instead, we speak of objects, messages and responsibilities 
for some action. 
Object Oriented programming in Dan Ingall’s memorable phrase: - 
“Instead of bit- grinding processor, plundering data structures, we have a universe of well-behaved 
objects that courteously ask each other to carry out their various desires.” 
This view of programming as creating a universe is in many ways similar to a style of computer 
simulation called “discrete event-driven simulation”. In brief in a discrete event-driven simulation the 
user creates computer models of the various elements of simulation, describes how they will interact 
with one another and sets them moving. This is identical to the average object-oriented program, in 
which the user describes what the various entities in the universe for program are, and how they will 
interact with one another and finally sets them in motion. Thus, in object-oriented programming, we 
have the view that computation is simulation 




Yüklə 379,92 Kb.

Dostları ilə paylaş:
1   2   3   4   5   6   7   8   9   10




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin