An object-oriented refactoring of Huffman encoding using the Java collections framework
Michael R. Wick · ACM SIGCSE Bulletin · 2003
Computer science has a relatively stable collection of time-tested pedagogical programming examples. With the infusion of object-oriented concepts into the core computer science curriculum, many of these examples are being replaced with newer examples that are more focused on demonstrating the particular object-oriented features of interest. But classic computer science examples can be refactored to include the important object-oriented topics as well, all the while maintaining the time-tested pedagogical benefits of the original example. This paper presents a case study of this refactoring by demonstrating how the classic Huffman encoding example can be modeled to integrate important object-oriented concepts.