Give an example to show how a Java client will access the attribute giving the number of tasks in the Task Bag object. In what respects does an attribute differ from an instance variable of an object?

What will be an ideal response?


Assume the IDL attribute was called numberOfTasks as in the answer to Exercise 20.1. Then the client uses the method numberOfTasks to access this attribute. e.g
```taskbagRef.numberOfTasks();```
Attributes indicate methods that a client can invoke in a CORBA object. They do not allow the client to make any assumption about the storage used in the CORBA object, whereas an instance variable declares the type of a variable. An attribute may be implemented as a variable or it may be a method that calculates the result. Either way, the client invokes a method and the server implements it.

Computer Science & Information Technology

You might also like to view...

Once Waze converts a spoken command to text, it must determine the correct action to perform, which requires:

a. JSON b. speech recognition c. natural language processing d. speech synthesis

Computer Science & Information Technology

A(n) ________ occurs when your program or computer stops working and you must restart it

Fill in the blank(s) with correct word

Computer Science & Information Technology

Instances of a(n) child movie clip can be inserted into a document's main Timeline and can be modified and animated just like any other symbol instance.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

VMM can be installed in a different forest than the VMM Management Server, however, this requires a two way trust between the cross forest domains.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology