var EIV2 = new example (
  "Example IV.2",
  "Another example showing the use of an array. \
  It draws some circles with random colors. Note that \
  to do this, we do not need to store the colors in an array, \
  but it was done as an example.",
  "exampleIV2",
"int[] a = new int[4];<BR />\
 <BR />\
for (int i=0; i < a.length; i++) {<BR />\
  a[i] = (int) random (255);<BR />\
}<BR />\
 <BR />\
for (int i=0; i < a.length; i++) {<BR />\
  fill (a[i]);<BR />\
  int x = r + 2*i*r;<BR />\
  ellipse(x, height/2, r*2, r*2);<BR />\
}");


var EIV3 = new example (
  "Example IV.3",
  "This example program displays a row of circles with different colors. \
  The colors of the circles are stored in an array. \
  When you click the mouse, the colors are permuted. \
  The examples shows how you can store a number of variables in an array, \
  and how you can manipulate them. \
  The sample code that you see here simply permutes an array with numbers when the mouse is pressed.",
  "exampleIV3",
"void mousePressed() {<BR />\
  for (int i=0; i < a.length; i++) {<BR />\
    int j = (int) random (a.length);<BR />\
    int foo = a[i];<BR />\
    a[i] = a[j];<BR />\
    a[j] = foo;<BR />\
  }<BR />\
}");


var AIV2 = new assignment (
  "Assignment IV.2",
  "Make a program that draws a series of circles that follow the mouse pointer. \
  The first circle slowly follows the mouse pointer, the second circle follows \
  the first circle, etc.",
  "assignmentIV2",
  dateIV);


var AIV3 = new assignment (
  "Lab Assignment IV.3",
  "Draw a row of squares with random grey values. Each square gradually gets \
  darker and darker, until it is black, whereafter it turns lighter and lighter, etc. \
  Suggestion: store the 'color-direction' of each square in an array - that expresses whether it \
  turns lighter or darker at that moment.",
  "assignmentIV3",
  dateIV);