Question:
(a) Distinguish between UDP and TCP.
(b) You have been asked to design and implement a chat application for a university. Which protocol could you used TCP or UDP? Justify your answer.
(c) Do you think multithreading is important for the chat application?
(d) Prepare a sequence diagram showing the exchange of messages among the objects involved in a chat session.
(e) What is a socket? Why sockets are important? Why a port assignment is necessary during the creation of a socket?