var EII1 = new example (
  "Example II.1",
  "This example shows how you can define your very own method (function); in this case <CODE>circle()</CODE>. \
  The result of the program is a linearly growing circle.",
  "exampleII1",
"int r;<BR />\
 <BR />\
void draw() {<BR />\
  circle(width/2, height/2, r);<BR />\
  r++;<BR />\
}<BR />\
 <BR />\
void circle(int x, int y, int r) {<BR />\
  ellipseMode(CENTER);<BR />\
  ellipse(x, y, r*2, r*2);<BR />\
}");


var EII2 = new example (
  "Example II.2",
  "This example shows how different functions can have the same name; and that they can \
  be distinghuished on the basis of their arguments.",
  "exampleII2",
"void draw() {<BR />\
  fill(255, 0, 0);<BR />\
  circle(40, height/2, 40);<BR />\
 <BR />\
  fill(0, 255, 0);<BR />\
  circle(width, height/2);<BR />\
 <BR />\
  fill(0, 0, 255);<BR />\
  circle();<BR />\
}");


var EII3 = new example (
  "Example II.3",
  "This program illustrates how a function can return a value: in this example the speed of the mouse. The program redraws the screen in a grey value that corresponds to the mouse speed: the faster the mouse, the lighter the screen.",
  "exampleII3",
"void draw () {<BR />\
   background(4 * mouseSpeed());<BR />\
}<BR />\
 <BR />\
int mouseSpeed() {<BR />\
  return((int) dist(mouseX,mouseY,pmouseX,pmouseY));<BR />\
}");


var EII4 = new example (
  "Example II.4",
  "This small program shows how to do mouse interaction within Processing. \
  If the function <CODE>mousePressed()</CODE> exists, then it is called immediately (and automatically) \
  after a mouse click.\
  You can also create functions <CODE>mouseMoved()</CODE> and <CODE>mouseDragged()</CODE>, with evident meanings. \
  These functions are called automatically, just as the functions <CODE>setup()</CODE> and <CODE>draw()</CODE> are called automatically.",
  "exampleII4",
"void setup() {<BR />\
  size(200, 200);<BR />\
}<BR />\
 <BR />\
void draw() {}<BR />\
 <BR />\
void mousePressed() {<BR />\
  background(102);<BR />\
  line(width/2, height/2, mouseX, mouseY);<BR />\
}");


var AII1 = new assignment (
  "Assignment II.1",
  "Make a program that draws a circle in the center of the output screen, \
  such that the radius of the circle equals the distance from its center to \
  the current position of the mouse (i.e. the mouse is always on the edge of \
  the circle). Use a 'home-made' function <CODE>circle()</CODE>.",
  "assignmentII1",
  dateII);


var AII2 = new assignment (
  "Assignment II.2",
  "Make a similar program, however the radius of the circle is dragged with the mouse. \
  Dragging means moving the mouse while keeping the button pressed. \
  So you start with a circle in the middle with some default radius; and this radius can be \
  altered by dragging it. Use the built-in Processing function <CODE>mouseDragged()</CODE>.",
  "assignmentII2",
  dateII);


var AII3 = new assignment (
  "Lab Assignment II.3",
  "Make a program that draws a circle on the position of the mouse pointer, where the size of \
  the circle depends on the speed of the mouse: the faster the mouse, the larger the circle. \
  No clicking of the mouse required.",
  "assignmentII3",
  dateII);


var AII4 = new assignment (
  "Assignment II.4",
  "Make a program that draws a line between the current 'click' position of the mouse and the \
  previous one. Initially there is no line; just a dot in the center of the window.",
  "assignmentII4",
  dateII);

var AII5 = new assignment (
  "Assignment II.5",
  "Make a 'snow shovel' program that continuously draws snow randomly within the center section of the screen. \
  By dragging the mouse over it, the snow can be wiped.",
  "assignmentII5",
  dateII);
