added .java files for server and client