The School Design Group Tools for people who build schoolsand the teachers who bring them to life

← All toolkits

Part of Computer Programming I

Unit 7: Arrays

Computer Programming II Java, unit 7 of 12

Every program so far has handled one object at a time or a handful of separately named ones. This unit gives students one name for many values, including many objects. It covers declaring and filling an array, reading and writing one slot, the index that does not exist, walking an array with a loop and with for-each, totals and counts and highest and lowest, an array of objects with the count you have to keep yourself, searching from the front, searching a sorted array faster, putting an array in order, and then two dimensional arrays, one cell at a time, printed as a grid and totalled by row and column.

The performance task is The Seating Chart. Students model a real physical grid at least four by four that holds objects of a class they wrote, containing at least one empty cell, then print a report a person can read, search it for a case in the interior, a case on an edge and a case that is not there, and produce a sorted list with the criterion stated. The heaviest criterion is correctness at the boundaries, proven by a completed boundary test table that includes the empty cell and one deliberate index one past the end with the exact machine message recorded.

The fixed length problem is confronted in Lesson 2 rather than discovered. Students put a Python list beside a Java array, try to add an eleventh value to an array of ten, record exactly what the machine says, and write in their own words what a Java array will not do. Every later lesson that hits the limit names it again and names Unit 8. The Arrays utility class is named as something that exists and is not used, because a student who calls a sort method has not developed a sorting algorithm.

The unit runs 18 instructional days.

What's inside

  • A teach plan for each of the 18 lessons, plus a one page substitute plan per lesson
  • The Lesson 2 fixed length confrontation, with the Python list and the Java array side by side
  • Handouts on index out of range, walking an array, for-each and when it will not do, and totals, counts, highest and lowest
  • The partly full array with a separate count, taught as bookkeeping the programmer must do
  • Search and sort written by hand: linear search, search on a sorted array, and one sort developed rather than called
  • Two dimensional array set: one cell, the printed grid, and nested loops that total rows and columns
  • Mid-unit checkpoint with answer key, and answer keys for the graded handouts
  • The Seating Chart task with the boundary test table, the three search cases, the limitation note and the rubric

Who it's for

  • Teachers who want searching and sorting developed by students rather than called from a library
  • Programs preparing students for the Certiport arrays objectives, one and two dimensional
  • AP Computer Science A teachers, since arrays and 2D arrays are among the most heavily tested topics

License, plainly

Adapt it, rename it, put it on your letterhead, use it as your own. The single license covers one classroom or one organization; the school license covers everyone in the building or department. Do not resell it or publish it as a template product. Full terms.

Also useful

Course

Computer Programming II: Java

Twelve units, 180 days, twelve performance tasks, a lesson plan and a substitute plan for every lesson, aimed at Certiport IT Specialist Java.

Course

Computer Programming I

Twelve units, 180 days, 665 documents. Binary to capstone, with a portfolio and interview practice at the end.