Sprint 5

Roadmap:

  • Team assignments: Section A; Section B
  • Start: 2nd half of class, Thu 11/1
  • End: Quiz in 1st half of class, Thu 11/16
  • Requirements Due: beginning of class, Thu 11/16

Rationale:

In the previous sprint, we learned how create and interact with lists. The particular type of list we used was the ArrayList. This name arises from a more fundamental concept in Java: an array. Like a list, an array is a sequence of variables, indexed starting at 0, all of the same data type and individual elements of the array may be changed. Unlike a list, an array is created with a particular length (what we called size for ArrayList) and once created, that length cannot change. Thus when we address problems with arrays, we avoid situations where we would need to add or remove elements (in those situations, using an ArrayList would make a lot more sense). Also unlike ArrayList, arrays can be of any type, whether an object type or a native data type.

You might be wondering why we would bother using a more primitive, constrained sequential collection when something more advanced is available. The reason is that since arrays are fundamental concept, they appear throughout the Java language. Take the String API for example. There are 6 methods that return sequences, and they are all arrays (none are ArrayList). ArrayList is a bit simpler to understand and offers more flexibility, but to be proficient in Java, you must also have experience working directly with arrays.

Responsibilities (What you need to know):

  • (7.1) Understand what an array is
  • (7.1) Be able to declare (create) an array of any data type using a length
  • (7.1) Be able to declare (create) an array using explicit initial values
  • (7.1) Be able to determine the value of an individual array element
  • (7.1) Be able to assign/reassign a value to an individual array element
  • (7.1) Be able to determine the bounds of an array (0 to one less than the length of the array)
  • (7.1) Understand that arrays are objects, so array variables are references to an array
  • (7.1) Understand that arrays may be passed into methods as arguments/parameters
  • (7.1) Understand that arrays may be returned by methods
  • (7.2) Be able to read and write the enhanced for loop for arrays
  • (7.2) Understand that in the enhanced for loop, array elements may not be changed
  • (7.3) Be able to use the common array algorithms
    • filling an array
    • calculating the sum and average
    • determining the minimum and maximum values (without sorting)
    • counting the occurrences of an item or pattern in an array
  • (7.3) Use the Arrays.toString() method when printing an array
  • Use the Arrays.sort() method to sort an array
  • (7.6) Understand what a two-dimensional (2D) array
  • (7.6) Be able to work with 2D arrays: declaration, determination, assignment, as with 1D arrays
  • (7.6) Be able to visualize 2D arrays using row and column notation

Requirements (What you need to do):

Individual Requirements:

  • Understand the concepts on the Responsibilities list.

Team Requirements:

  • Complete the code in this project. All instructions are contained in the project comments.

Resources:

Learning Resources:

References:

Practice:

More information may be posted later; use expert requests to ask for additional materials

Reality Check:

In a flipped classroom we might adopt this schedule:

  • Homework for Tuesday:
      • Read Ch. 7.1-7.3 or watch videos
      • Solve problems on 1D arrays in reading
      • Complete warm-up on String and int arrays
      • Start requirements: ValuesInRange, WordChain, HalfNeighbor, Median
  • Tuesday in class:
      • Complete started warm-ups and requirements
  • Homework for Thursday:
      • Read Ch. 7.6 or watch videos
      • Solve problems on 2D arrays in reading
      • Complete warm-ups: NestedLoops
  • Thursday in class:
      • Complete warm-ups and requirements - get work checked.
  • Homework for Tuesday:
      • Solve as many “more practice” problems as time permits
  • Tuesday in class:
      • More practice
      • Engage in quiz review exercises
  • Homework for Thursday:
      • Practice and review for quiz
  • Thursday in class:
      • Take quiz