an object-oriented refactoring of huffman encoding using the java collections framework
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.
huffman encoding java collections framework double dispatching object oriented design