Homework from oriented object programming in java language.