Java code for appointment booking