defined roles of character.java and wordprocessor.java