Transfer write method from ContactList.java to Contact.java