Open a new folder. Copy all the source files of the Hello example to the folder. Modify the sayHello method so that an argument, a name string, is passed in as argument, and the return string is the string “Hello! “ concatenated with the name string.
What will be an ideal response?
```
// A simple RMI interface file - M. Liu
import java.rmi.*;
public interface HelloInterface extends Remote {
/**
* This remote method returns a message.
* @param message a string.
* @return a String message which is “Hello “ concatenated
* with the parameer message.
*/
public String sayHello(String message) throws java.rmi.RemoteException;
} //end interface
import java.rmi.*;
import java.rmi.server.*;
/**
* This class implements the remote interface HelloInterface.
* @author M. L. Liu
*/
public class HelloImpl extends UnicastRemoteObject
implements HelloInterface {
public HelloImpl() throws RemoteException {
super( );
}
public String sayHello(String message) throws RemoteException {
return "Hello" + message;
}
} // end class
```
You might also like to view...
Which of the following is false?
a. A string can be defined to store any data type. b. Class string provides bounds checking in its member function at. c. Class string’s overloaded [] operator returns a vector element as an rvalue or an lvalue, depending on the context. d. An exception is thrown if the argument to string’s at member function is an invalid subscript.
The digital signature standard is a __________ standard that uses the secure hash algorithm.
A. IEEE B. NIST C. ISO D. ITIL
3D printing is ________.
A. printing illusions on paper B. ? used to make solid products C. for kids to play with D. the same as 2D printing
A demarc is the point in a telephone network where the maintenance responsibility passes from a telephone company to the subscriber (unless the subscriber has purchased inside wiring maintenance)
Indicate whether the statement is true or false