View this PageEdit this Page (locked)Attachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

Arrays - Teaching Tips

Talk about why you wouldn't want to create a variable when you have lots of related data (such as the pixels in a picture or samples in a sound or grades for a student). You could create a variable for each grade (grade1, grade2, grade3, grade4) but a better way is to use an array of grades. With an array you can give one name to a collection of data and still access each element using an index (grade[0], grade[1]).

You can point out real arrays such as lines of people, a game board, chairs in an auditorium, and egg cartons.


Link to this Page