Arrays: Preparing for assessments

Preparing for assessments

Your notes should include:

  • All loops syntax: while, do while, and for.
  • The Scanner class: how to create an object of it and use it’s methods.
  • The Math.random() function.
  • Typical array-processing code highlights:
    • 1D and 2D arrays: how to declare and initialize them.
    • Code snippets to print all the elements, to add columns, rows.
    • Programs designed to create frequency arrays.
    • The code needed to swap elements of an array, to find the max and the min.
    • A short program to simulate rolling dice.
  • StdIn, StdOut and StdDraw short API’s with few examples.
  • The rules to print formatted output, printf.
  • Simple drawings programs.