Teaching two-dimensional array concepts in Java with image processing examples
Kevin R. Burger · 2003
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.