Demonstrate java client and server , JAVA Programming

Assignment Help:

There is no separate homework this week, but you may complete the exercises ahead of time, in which case you only need to attend for long enough to get your work marked off by your tutor. Also, we will arrange an overflow session later in the week for getting tasks marked off. The time for that session will be discussed and set during Monday's lecture.

This exercise will give you some introductory exposure to network programming with sockets. Your task is to demonstrate a minimal server program and client program that can send one small text message to each other. You need to do this in Java and also in C. Note, however, that for this exercise you are free to source example code from anywhere you like, including the internet and fellow students, as long as you can compile it, demonstrate it running, and answer your tutor's questions about how it works.

Task 1 (0.5%)

Demonstrate a Java client and server exchanging one text message in each direction.

Task 2 (0.5%)

Demonstrate a C client and server exchanging one text message in each direction.

Task 3 (0.5%)

Demonstrate your C client exchanging one message in each direction with your Java server, or vice versa.

Further Requirements:

1. Your code must run on the CSEM unix computers to earn marks.

2. Your client code should accept an arbitrary text message from the user, up to at least 40 characters in length, and send it to your server. String input can be as a command-line parameter or as standard input (whichever you prefer - not necessary to do both).

3. Your server should display the incoming client message on-screen. The simplest way to do this is to use System.out.println() in Java or printf() in C to write to standard out.

4. Your server should then send a message back to the client which contains the original message, prepended with a short prefix string. The prefix string should be supplied by the user (again, either as a command-line argument, or read from stdin).

5. Your client should display on-screen the message it receives from the server.

6. You need to be able to show your tutor that you can compile and run the code yourself, and your tutor may ask you some questions about the code to check that you do have some basic understanding of what it is doing.

7. You MUST run your server code ONLY on barker, not on any other CSEM machine. You can log into barker by typing ssh barker from any CSEM student login machine. Address details for barker are:

IP Address: 129.96.22.79

8. Your server MUST use a port number that is equal to YOUR unix uid number. This is to ensure that every student uses a unique port number so we don't get conflicts. To find your unix uid number, type the "id" at the command prompt on any CSEM unix host and use the number displayed after "uid=".

NOTE: Rules 7 and 8 have been specified by the Manager, CSEM Computing Services Group and MUST be complied with by all students. Breaches may attract undesirable consequences.


Related Discussions:- Demonstrate java client and server

Rmi-iiop support dynamic downloading of classes, Does RMI-IIOP support dyna...

Does RMI-IIOP support dynamic downloading of classes? Ans) No, RMI-IIOP doesn't support dynamic downloading of the classes as it is complete with CORBA in DII (Dynamic Interface

Explain multiple initializers and incrementers, Explain Multiple Initialize...

Explain Multiple Initializers and Incrementers ? Sometimes it's essential to initialize several variables before starting a for loop. Similarly you may need to increment more t

Implement the main program with user interface, You can now implement the m...

You can now implement the main program with its user interface for this assignment in the class MovieBrowse. This will provide a simple, command-line, interactive interface to prov

Relation between stack and heap, Relation between Stack and Heap Stack ...

Relation between Stack and Heap Stack and heap are two significant memory areas. Primitives are created on the stack whereas objects are created on heap. This will be further c

Need cocos2d-x developer - puzzle game, cocos2d-x puzzle game for kids P...

cocos2d-x puzzle game for kids Project Description: I am seeking a skilled, reliable, and not very expensive cocos2d-x developer (with experience with iOS, Android, and prefe

Nonrecursive implementations of the min() and floor() method, Write nonrecu...

Write nonrecursive implementations of the min() and floor() methods in BST.java. Make sure to use only one return in your method. Use an insertion sort (discussed in class) to s

Convert psd to android, Convert PSD to Android (UI only, no database) Pr...

Convert PSD to Android (UI only, no database) Project Description: I want someone highly proficient in Photoshop and Android SDK to change series of PSD files into live Andro

#The ArrayList class java, i want a full program with test about the follow...

i want a full program with test about the following: linkedComputers: We will assume that a number of methods are required. These are specified below. String getComputerName() ret

What is struts framework, Struts framework is an open-source framework for ...

Struts framework is an open-source framework for producing the web applications in Java EE, based on MVC-2 architecture. It uses and extends the Java Servlet API. Struts are robust

Luminous jewels, Luminous Jewels - The Polishing Game Byteland county is v...

Luminous Jewels - The Polishing Game Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various lum

Write Your Message!

Captcha
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