class dia and method design