Assignment title: Java


TCP and UDP Q To enable the student to understand and extend Distributed Computing applications, using the Java programming language and C# .NET utilising the Transmission Control Protocol (TCP) as well as User Datagram Protocol (UDP).

Brief: Part 1.

Q1. Produce and explain a console based Java program which sends a UDP packet to the port number 4567 at IP address 194.81.104.123

Q2. Produce and explain a console based Java program which receives the UDP packet sent by Q1.

Q3. Modify the two Java programs produced in Q1 and Q2 to run on an actual computer using two console windows. Show and explain your modifications and produce a screenshot as evidence of your programs running.

Q4. Produce and explain a console based C# program which sends a UDP packet to the port number 4567 at IP address 194.81.104.123

Q5. Produce and explain a console based C# program which receives the UDP packet sent by Q4.

Q6. Modify the two C# programs produced in Q4 and Q5 to run on an actual computer using two console windows. Show and explain your modifications and produce a screenshot as evidence of your programs running.

Q7. Produce and explain a console based Java program which sends a TCP packet to the port number 2345 at IP address 194.81.104.234 Q8. Produce and explain a console based Java program which receives the TCP packet sent by Q7.

Q9. Modify the two JAVA programs in Q7 and Q8 to run on an actual computer using two console windows. Show and explain your modifications and produce a screenshot as evidence of your programs running.

Q10. Produce and explain a console based C# program which sends a TCP packet to the port number 4321 at IP address 194.81.104.141

Q11. Produce and explain a console based C# program which receives the TCP packet sent in the question above. Q12. Modify the two programs in Q10 and Q11 to run on a single computer using two console windows. Show and explain your modifications and produce a screenshot as evidence of your programs running.

Part 2.

Q13. Modify the C# program in Q4 so it can send a UDP packet to the Java program in Q2. Q14. Modify the Java program in Q7 so it can send a TCP packet to the C# program in Q11.

Q15. Modify either the programs in Q13 or Q14 to run on an actual computer using two console windows. Show and explain your modifications and produce a screenshot as evidence of your programs running.

Q16. Show the JAVA UDP Multicast application exchanging messages with the C# UDP multicast application. Part 3

Q17. Modify the JAVA UDP peer-to-peer application to include text fields for port numbers (local and remote) and the IP address (remote). Explain how these modifications works. Show two instances of this application exchanging messages.

Q18. Create a C# UDP peer- to-peer application, by modifying the C# UDP 'client' to include text fields for port numbers (local and remote) and the IP address (remote). Explain how these modifications works. Show two instances of this application exchanging messages.

Q19. Modify the JAVA TCP client so it has text fields for a username, server IP address and server port number. Show two instances of this application exchanging messages through the multi-threaded JAVA TCP server. The username should be prepended to the message sent. Explain how you implemented your modifications. Q20. Modify the C# TCP client so it has text fields for a username, server IP address and server port number. Show two instances of this application exchanging messages through the multi-threaded C# TCP server. The username should be prepended to the message sent. Explain how you implemented your modifications.

Deliverables A report needs to submitted to TurnitIn by 23:59 on 18th January, 2015. Your report should include the following sections: 1. Part 1: Explanation of Java and C# TCP and UDP implementation.

2. Part 2: Multiplatform chat using Java and C#.

3. Part 3: Modifications to chat applications.

4. Appendices. This should include annotated source code of your modifications.

Please note that the work you produce must be your own and you may be asked for a viva. EJS