Question

Objects communicate by sending messages each other. How message-passing is implanted in object oriented context?

  1. Objects communicate by sending messages each other. How message-passing is implanted in object oriented context?

Homework Answers

Answer #1

Message passing is a kind of convey data or information between objects. A message is a kind of request for the execution of a function. To convey the message, we need three things object, the method in that object and the information. For example

class student{

private int marks;

public void store_marks(int marks){

this.marks = marks;

}

public int get marks(){

return marks;

}

}

Student st = new student();

st.store_marks(4);

st, object calls the method store marks and sends the data 4 as a message. this is called message passing. Methods of a object is called using . operator

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Which option best describes the object-oriented programming paradigm? A :Objects describe data aspects of entities related...
Which option best describes the object-oriented programming paradigm? A :Objects describe data aspects of entities related to the problem. An object-oriented program describes how those entities differ from each other. B :Objects describe data aspects of entities related to the problem. An object-oriented program describes how those entities communicate with each other. C :Objects describe data and functional aspects of entities related to the problem. An object-oriented program describes how those entities differ from each other. D :Objects describe data...
How do neurons communicate with each other and the rest of the body
How do neurons communicate with each other and the rest of the body
Two objects are electrically attracting each other. Which of the following is possible? Select all apply!!!...
Two objects are electrically attracting each other. Which of the following is possible? Select all apply!!! A one object is negatively charged, and the other object is neutral B both objects are negatively charged C one object is positively charged, and the other object is negatively charged D both objects are positively charged E both objects are electrically neutral F one object is positively charged, and the other object is neutral
Two objects are floating in a region free of other gravitating bodies. The first object has...
Two objects are floating in a region free of other gravitating bodies. The first object has a mass of 1.4x10^15kg and a radius of 19000m. The second object has a mass of 4.9x10^16kg and a radius of 13000m. They initially rest with a distance of 810000m apart. A) Determine the force acting on each object initially B) b/c their mutual gravitational attraction, the two objects will drift towards each other and collide. Determine the speed of each at the instant...
If you were interested in studying how brain regions communicate with each other during a particular...
If you were interested in studying how brain regions communicate with each other during a particular activity, you might first use __________ to look at whole-brain activation and identify a brain region of interest. Then, if you wanted to identify where neurons in that brain region are sending signals to, you could use __________. Group of answer choices Immunohistochemistry; antisense oligonucleotides Transcranial Magnetic Stimulation (TMS); microelectrodes Functional Magnetic Resonance Imaging (fMRI); anterograde tracing with fluorescent microscopy Structural Magnetic Resonance Imaging...
Two identical objects, each with a mass M, are attached to each other via a spring...
Two identical objects, each with a mass M, are attached to each other via a spring with a spring constant k. The two objects are oscillating such that one is always moving in the opposite direction and with the same speed as the other. If the two objects were made to oscillate with a higher amplitude, A. the total mechanical energy would increase B. the average kinetic energy of each object would increase C. the average potential energy of the...
Two objects, A and B, are brought into contact with each other. The initial temperature of...
Two objects, A and B, are brought into contact with each other. The initial temperature of object A is 230 K. The heat capacity of object A is a constant 3 J/K and the heat capacity of object B is a constant 4 J/K. Through the exchange of heat the two objects eventually obtain a common nal temperature of 320 K. 1)The initial temperature of object B was ____ K. 2) The amount of heat exchanged during the process of...
Two objects (m1 = 5.30 kg and m2 = 2.75 kg) are connected by a light...
Two objects (m1 = 5.30 kg and m2 = 2.75 kg) are connected by a light string passing over a light, frictionless pulley as in the figure below. The 5.30-kg object is released from rest at a point h = 4.00 m above the table. (a) Determine the speed of each object when the two pass each other, (b) Determine the speed of each object at the moment the 5.30-kg object hits the table. (c) How much higher does the...
Two objects move towards each other along a straight line and collide inelastically. It is known...
Two objects move towards each other along a straight line and collide inelastically. It is known that the ratio of their kinetic energies is n. What should be the ratio of their massess fo the objects to move after the collision in the direction of motion of the object with the smallest kinetic energy? Please explain solutions.
1.Make a class whose objects each represent a battery. The only attribute an object will have...
1.Make a class whose objects each represent a battery. The only attribute an object will have is the battery type (one letter). Also, the class has to include the following services for its objects: determine if two batteries are equal change battery type get battery type display battery information 2.Make a class whose objects each represent a box of batteries (use dynamic memory and draw the class diagram). Also, the class has to include the following services for its objects:...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT