Up until now you’ve written two lines of code to light both eyes up in color.
Look at the example on the left!

In this example we get to know a new method:
bob3.setEyes(color1, color2);

This method allows us to turn on both eyes in color with one line of code.


Our new method
bob3.setEyes(color1, color2);

has two parameters: color1 and color2

We replace color1 with the color that eye 1 should have, e.g. WHITE

We replace color2 with the color that eye 2 should have, e.g. ORANGE


We can replace the code in lines 8 and 9 with the statement

bob3.setEyes(WHITE, ORANGE);

Test your new program on your BOB3.


Compile and test your program on BOB3.


1: If both eyes should be lit in orange, can you simply use bob3.setEyes(ORANGE);? 
 You haven’t completed anything yet!
 Super, so far so good…
 Super, you got it all right!
 Sadly not correct…
 One answer is correct
 A couple are correct…
Fahre mit der Maus über die Symbole!