ACM Home Page
Please provide us with feedback. Feedback
Digital Library logoTake a look at the new version of this page: [ beta version ]. Tell us what you think.
From concrete to abstract: the power of generalization
Full text PdfPdf (236 KB)
Source Conference on Object Oriented Programming Systems Languages and Applications archive
Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications table of contents
Vancouver, BC, CANADA
SESSION: Educators' symposium table of contents
Pages: 106 - 108  
Year of Publication: 2004
ISBN:1-58113-833-4
Author
Christopher H. Nevison  Colgate University, Hamilton, NY
Sponsors
ACM: Association for Computing Machinery
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 3,   Downloads (12 Months): 25,   Citation Count: 1
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1028664.1028707
What is a DOI?

ABSTRACT

We describe an assignment for students in a software engineering class or advanced programming class with emphasis on design. In the assignment students are given a program that solves a maze, with a display that shows the steps toward the solution. The given program has three variations of an iterative search (implemented using the strategy pattern), depth-first search, breadth-first search, best-first search (the latter using a priority queue). The students are asked to disentangle the problem-specific aspects of this code from the search strategy so as to define an abstract problem solver that can be applied to any problem fitting the model of step-by-step searching of a solution space. This requires three steps: defining appropriate interfaces that specify the information about the problem needed by the abstract solver, defining the abstract solver to find a solution using these interfaces, and defining the maze problem so as to implement these interfaces. With the abstract solver created, students should also be able to implement other problems fitting this model, such as the word-ladder game or a search in a graph for a Hamiltonian circuit, so that the abstract solver can be applied to them. The assignment demonstrates the power of generalization using abstract classes and interfaces as a bridge between concrete problems and the solution algorithm. This assignment is intended for a course in software engineering or an advanced programming course with emphasis on design. Students should already be familiar with object-oriented programming, inheritance, abstract classes and interfaces.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
Gamma, E., Helm, R., Johnson, R., and Vlissides, J. Design Patterns Addison-Wesley, Reading, MA, 1995


Collaborative Colleagues:
Christopher H. Nevison: colleagues