lab1 - [mickey@uw1-320-21]$ java Server...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSS 434 Lab Work 1: Java Sockets and Serialization Professor: Munehiro Fukuda Lab work date: See the syllabus 1. Purpose This laboratory work intends to get you used to Java socket programming under the Unix environment. After the professor explains about the LAB-320's machine configuration, the Linux envorinment, and Java sockets, you are to code and run simple client/server programs with Java sockets. 2. Statement of Work Code a client and a server program that exchange an array of doubles as follows. Client: instantiates an array of 100 doubles, initializes all those doubles to 0.0, 1.0, 2.0, 3.0, . . 99.0, and sends this array to the server through a Java socket. The client receives an array of doubles back from the server and prints out each array element. Server: receives an array of doubles, updates each element with its square root, and sends it back to the client. To compile your programs, type: [mickey@uw1-320-20]$ javac Run your server program first and thereafter your client:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: [mickey@uw1-320-21]$ java Server [mickey@uw1-320-20]$ java Client > output Print out your client and server programs as well as output [mickey@uw1-320-21]$ a2ps -PUW1-320-p1 [mickey@uw1-320-20]$ a2ps -PUW1-320-p1 [mickey@uw1-320-20]$ a2ps -PUW1-320-p1 output 3. Related Materials To understand Java sockets, see the slides: p5 - 7 of IPC.ppt For object serialization, use the ObjectOutputStream class. See the slide p9 of IPC.ppt and Java API Documentation For object de-serialization, use the ObjectInputStream class. See the slide p9 of IPC.ppt and Java API Documentation To compute a square root, use Math.sqrt( ). 4. What to Turn in Turn in the following materials at the end of class: 1. Your client and erver programs, (i.e., and 2. Your execution output, (i.e., output) If your time runs out, that is okay. Just turn in what you have....
View Full Document

This document was uploaded on 12/20/2009.

Page1 / 2

lab1 - [mickey@uw1-320-21]$ java Server...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online