The object-oriented approach to software development facilitates and encourages programming practices that increase reusability, correctness and maintainability in code. This is achieved in Java by providing mechanisms for inheritance, ion and encapsulation. By measuring properties that indicate to what extent these mechanisms are utilised we can determine to a large extent how good a design is. However, because these properties often conflict with other goals such as high cohesion and low coupling it can be difficult for a programmer to recognise the best compromise. We propose the novel approach of treating object-oriented design as a combinatorial optimisation problem, where the goal is maximisation of a set of design metrics. With a view to developing a fully automated design improvement tool we have developed a prototype that uses a small metrics suite combined with automated refactorings to move methods to their optimum positions in the class hierarchy. The action of this simu...