I think you have got it, but you need some pairs of round brackets () to get it to compile.
You need something in the Foo class, and something in the baar() method. I sometimes call such methods go(), as in new TreeNursery().go() in
this post (last block of code, line 43).