A recent industry survey (Townhidnejad and Hilburn, 2002) has reported that more than fifty percent of a software project's budget is spent on activities related to improving software quality. Industry leaders claim that this is caused by the inadequate attention paid to software quality in the development phase. This paper introduces a static analysis framework which can be used to give beginning students practice in writing better quality Java programs and to assist teaching staff in the marking process. The framework uses both software engineering metrics and relative comparison to judge the quality of students' programs and provide feedback about how solutions might be improved. .