##Comments to Ex. 3 and 4: I couldn't resist the temptation of enhancing the client and server programs further.
This resulted in the following features: You can quit as client without shutting down the server or other connected clients. You can see (like a CHAT program) when the other clients send a message (this message is of course sent by the server handled by the Subject in the Observer pattern)...