Touch of Class: Learning to Program Well with Objects and Contracts