object oriented design pattern test