Teaching two-dimensional array concepts in Java with image processing examples

  • Authors:
  • Kevin R. Burger

  • Affiliations:
  • Rockhurst University, Kansas City, MO

  • Venue:
  • SIGCSE '03 Proceedings of the 34th SIGCSE technical symposium on Computer science education
  • Year:
  • 2003

Quantified Score

Hi-index 0.02

Visualization

Abstract

Two-dimensional arrays (2d-arrays) are fundamental data structures in many software programs and must be mastered by beginning programming students. Teachers of introductory programming are challenged to devise new and interesting exercises for teaching 2d-array concepts. We believe image processing (IP) examples can provide stimulating, challenging, and fun exercises for students. We describe briefly the new Java2 Image I/O API and show how it can be used to read and write images in GIF, JPEG, and PNG formats. We also provide Java code for an Image class that hides the complexity of this API from the student. We conclude with several sample student exercises that can be used to teach 2d-array programming.