Lecture 2
13
Messages (reprise)
•Ask an object to work for you: send it a message
•Bank.java (line 126)
• atm.println(“sorry, . . . ”)        this Bank object sends a  println message      to object atm of type Terminal asking it to print a String on the screen
•Java syntax:   object.message(info)
•   println(String something)                 method in Terminal.java does the work
•Trust Terminal.java to do the right thing