implement the clases of the class diagram