![]() ![]() ![]() |
|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The application in this Magercise is a simple message box, like a telephone answering machine. The MessageBox interface has an operation for leaving messages, another for the owner to get the messages, and an attribute for setting the reply that is sent out when a message is left. Here is the IDL file: module MessageModule { typedef sequence<string> MessageSeq; interface MessageBox { attribute string reply; string leaveMessage(in string msg) raises (boxFull); MessageSeq getMessages(); }; };
Your task is to create a PrerequisitesSkeleton Code
Tasks
Examine the generated Java interface in Don't forget to add a constructor. It should take a string argument as a name, and call the superclass constructor to set the name of the object.
Notice how the sequence is generated. No
Modify the
Look at the vbj MBClient servername command param vbj MBClient servername leave message vbj MBClient servername reply reply-messsage vbj MBClient servername get
Finish the skeleton version of
Now compile the program, using
Run the server:
Run the client: See the expected behavior section for more detail on the correct output for your program.
If you happen to have multiple machines, run the program on each and leave and retrieve messages on the other message boxes. Where help exists, the task numbers above are linked to the step-by-step help page. Solution SourceDemonstration
The client part of your program should run something like this: C:\> vbj MBClient myMessages leave "Meet me tonight" C:\> vbj MBClient myMessages leave "Hey,where's that $100 you owe me?" C:\> vbj MBClient myMessages get Here are your messages: Meet me tonight Hey,where's that $100 you owe me? If you leave too many messages, then leaving another message should produce an infomative message (like "BEEEEEEEEEP"). Next MagerciseMagercisesShort CourseCopyright © 1998-1999 MageLang Institute. All Rights Reserved. |