Chapter 5 Contract Programming with Protocols