Write client-server classes to calculate the sum

Assignment Help Computer Networking
Reference no: EM13770516

Write client-server classes to calculate the sum of 1 + 2 + 3 + ...+ nwith rmi APIs for one client and one server. The calculation of sum must be written in a remote method in the server programs. The remote method should return the value of: sum to the client.
The client calls the remote method of servers to receive the sum. The client displays the sum on its console. Please copy/paste your java classes and interface under the word:

Below are the programs' skeleton and a sample dialog:

The client class and interface:

import java.rmi.Remote;

//This interface is complete. Do not change it.

publicinterface Project3ServerInterface extends Remote {
publicint calculateSum(int n ) throws java.rmi.RemoteException;
}
import java.rmi.*;
import java.util.*;
public class Project3Client{
//Complete this class.
}
The server classes and interface:
import java.rmi.Remote;
//This interface is complete. Do not change it.
publicinterface Project3ServerInterface extends Remote {
publicint calculateSum(int n ) throws java.rmi.RemoteException;
}
import java.rmi.*;
import java.rmi.server.*;
publicclassCalculateSumServerImplextends UnicastRemoteObject implements Project3ServerInterface {
//Complete this class.
}
import java.rmi.*;
importjava.rmi.server.*;
import java.rmi.registry.Registry;
import java.rmi.registry.LocateRegistry;
importjava.net.*;
publicclass Project3Server{
//Complete this class.
}
A sample dialog:

Display output on the server side:

RMI registry cannot be located at port 16790
RMI registry created at port 16790
Hello Server ready.

Display output on the client side:

Enter a positive integer: 5
Lookup completed
The sum is: 15
Note: The green: 5 is what the user entered.
Note: This is just a sample. Your project should work for any positive integer for n.

Reference no: EM13770516

Questions Cloud

Sales presentation for the business : "Design a short sales presentation for the business you defined for your franchise opportunity analysis. This should be no more than four slides."
Outline a financial plan for your small business : Referring to the same business you either started or purchased in the first assignment, write a 6-8 page paper in which you: Outline a financial plan for your small business.
Research cases of lawsuits related to water damage : Research cases of lawsuits related to water damage on a building project due to leaks, Who were the related parties - owner, architect, contractor , sub, other
Maintaining terrestrial and atmospheric resources : As Newly elected Mayor of Sparksville, the town's citizens are eager to hear what you plan on doing to promote the local economy while maintaining a high level of environmental air quality.
Write client-server classes to calculate the sum : Write client-server classes to calculate the sum of 1 + 2 + 3 + ...+ nwith rmi APIs for one client and one server. The calculation of sum must be written in a remote method in the server programs.
Determine of chance probability and respective payoffs : Draw the decision tree - Determine of chance probability and respective payoffs.
Describe application purpose : Write a 700- to 1,050-word paper on a specific web or mobile application. Describe that application's purpose. How is it used? What changes has it brought about to its users?
Discuss some of the pros and cons of plea bargaining : Discuss some of the pros and cons of plea bargaining (and any others you might be able to think of). If it were feasible within our system, would you support a ban on plea bargains
Define a trade deficit and a trade surplus : Define a trade deficit and a trade surplus. What are the implications of a long-term trade deficit or trade surplus? What techniques are available to correct balance of payment deficit or surplus?

Reviews

Write a Review

Computer Networking Questions & Answers

  Networking and types of networking

This assignment explains the networking features, different kinds of networks and also how they are arranged.

  National and Global economic environment and ICICI Bank

While working in an economy, it has a separate identity but cannot operate insolently.

  Ssh or openssh server services

Write about SSH or OpenSSH server services discussion questions

  Network simulation

Network simulation on Hierarchical Network Rerouting against wormhole attacks

  Small internet works

Prepare a network simulation

  Solidify the concepts of client/server computing

One-way to solidify the concepts of client/server computing and interprocess communication is to develop the requirements for a computer game which plays "Rock, Paper, Scissors" using these techniques.

  Identify the various costs associated with the deployment

Identify the various costs associated with the deployment, operation and maintenance of a mobile-access system. Identify the benefits to the various categories of user, arising from the addition of a mobile-access facility.

  Describe how the modern view of customer service

Describe how the greater reach of telecommunication networks today affects the security of resources which an organisation provides for its employees and customers.

  Technology in improving the relationship building process

Discuss the role of Technology in improving the relationship building process Do you think that the setting of a PR department may be helpful for the ISP provider? Why?

  Remote access networks and vpns

safekeeping posture of enterprise (venture) wired and wireless LANs (WLANs), steps listed in OWASP, Securing User Services, IPV4 ip address, IPV6 address format, V4 address, VPN, Deploying Voice over IP, Remote Management of Applications and Ser..

  Dns

problems of IPV, DNS server software, TCP SYN attack, Ping of Death, Land attack, Teardrop attack, Smurf attack, Fraggle attack

  Outline the difference between an intranet and an extranet

Outline the difference between an intranet and an extranet A programmer is trying to produce an applet with the display shown in Figure 1 below such that whenever one of the checkboxes is selected the label changes to indicate correctly what has..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd