Structural versus behavioral encapsulation