[Solved] SOLVED:Assignment 8 Socket programming

$25

File Name: SOLVED:Assignment_8_Socket_programming.zip
File Size: 357.96 KB

SKU: [Solved] SOLVED:Assignment 8 Socket programming Category: Tag:
5/5 - (1 vote)

The goal of this assignment is to gain experience with network programming, specifically with sockets in Java. This assignment will also require you to develop a server and client simultaneously, which is an important skill in itself. The client will allow the user to enter an arbitrary list of integers to be sent to the server. The server will then return a list of integers containing only the prime numbers in the original list.1. [20] Create two classes, one for your client and one for your server. Each class will need a main method so that both classes can be executed.2. [30] Implement your client to prompt the user to enter a list of integers. You can do this however youd like (e.g., command line, GUI). Send the list of integers to the server (hint: see java.net.Socket), and then print the list of prime integers received.3. [30] Implement your server to wait for a socket connection (hint: see java.net.ServerSocket).When a socket is accepted, read a list of integers, determine which in the list are prime, and then send a list containing the prime numbers back to the client. When choosing a data structure and algorithm, take care to avoid unnecessary overhead (e.g., O(n)-time removal of an item from the list). Your server may shut down after completing this process and does not need to support multiple sequential connections.4. [20] Write code that is clear and efficient. Specifically, your code should be indented with respect to code blocks, avoid unnecessarily repetitive code, avoid code that is commented out or otherwise unused, use descriptive and consistent class/method/variable names, etc.5. [+10] (Extra credit) Add security by obfuscating the integers before they are sent over the network and deobfuscating them when they arrive (both when sending from client to server and from server to client). You may use any method of obfuscation youd like, such as a simpleXOR or a Caesar Cipher.Your client output should look something like:Enter a number, blank line to quit:3Enter a number, blank line to quit:4Enter a number, blank line to quit:5Enter a number, blank line to quit:6Enter a number, blank line to quit:7Enter a number, blank line to quit:client sent: [3, 4, 5, 6, 7]client received: [3, 5, 7]Zip the Assignment8 folder in your Eclipse workspace directory, name the .zip file

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] SOLVED:Assignment 8 Socket programming
$25