Creating class hierarchies to abstract and specialize behavior