Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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

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

Task 2

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

Task 3

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: DNS Name: barker.csem.flinders.edu.au 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.

Java, Programming

  • Category:- Java
  • Reference No.:- M9525273

Have any Question?


Related Questions in Java

Part a specification - robot simulationpart a

PART A Specification - Robot Simulation PART A Requirements To complete this assignment you will use the supplied eclipse project Robot P1/. It is already set up to execute a simple arm movement loop which you will build ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Assignment - method in our madnessthe emphasis for this

Assignment - "Method in our Madness" The emphasis for this assignment is methods with parameters. In preparation for this assignment, create a folder called Assign_3 for the DrJava projects for the assignment. A Cityscap ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Answer the following question whats the difference public

Answer the following Question : What's the difference public inheritance and private inheritance? What can derived classes inherit from base classes? What cannot be inherited from base classes?

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As