Client code for interacting with writeObject and readObject