Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1028664.1028707acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

From concrete to abstract: the power of generalization

Published: 23 October 2004 Publication History
  • Get Citation Alerts
  • 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.

    Reference

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

    Cited By

    View all
    • (2013)Exploring the Educational Benefits of Introducing Aspect-Oriented Programming Into a Programming CourseIEEE Transactions on Education10.1109/TE.2012.220911956:2(217-226)Online publication date: 1-May-2013
    • (2006)Design of class hierarchiesACM SIGCSE Bulletin10.1145/1124706.112143138:1(288-292)Online publication date: 3-Mar-2006
    • (2006)Design of class hierarchiesProceedings of the 37th SIGCSE technical symposium on Computer science education10.1145/1121341.1121431(288-292)Online publication date: 3-Mar-2006

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    OOPSLA '04: Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
    October 2004
    348 pages
    ISBN:1581138334
    DOI:10.1145/1028664
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 23 October 2004

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. object-oriented design
    2. pedagogy

    Qualifiers

    • Article

    Conference

    OOPSLA04
    Sponsor:

    Upcoming Conference

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)2
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 29 Jul 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2013)Exploring the Educational Benefits of Introducing Aspect-Oriented Programming Into a Programming CourseIEEE Transactions on Education10.1109/TE.2012.220911956:2(217-226)Online publication date: 1-May-2013
    • (2006)Design of class hierarchiesACM SIGCSE Bulletin10.1145/1124706.112143138:1(288-292)Online publication date: 3-Mar-2006
    • (2006)Design of class hierarchiesProceedings of the 37th SIGCSE technical symposium on Computer science education10.1145/1121341.1121431(288-292)Online publication date: 3-Mar-2006

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media