Using class Result (shown below) and making the minor modification that will

 

ensure that objects of this class are serialisable, make method getResults

available via an RMI interface. This method should return a Vector containing

initialised Result objects that are set up by a server program (also to be written

by you) and made available via an implementation object placed in the RMI

registry by the server. The server should store two Result objects in the Vector

contained within the implementation object. Access this implementation object

via a client program and use the methods of the Result class to display the

surname and examination mark for each of the two Result objects. (I.e., employ

'Method 1' from Section 5.4.)

You should find the solution to the above problem relatively straightforward by

simply modifying the code for the Bank example application from this chapter.

class Result implements java.io.Serializable

{

private String surname;

private int mark;

public Result(String name, int score)

{

surname = name;

mark = score;

}

public String getName()

{

return surname;

}

public void setName(String name)

{

surname = name;

}

public int getMark()

{

return mark;

}

public void setMark(int score)

{

if ((score>=0) && (score<>

mark = score;

}

}

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!