Home Segments Top Top Previous Next

193: Mainline

Suppose, for example, that you want the rating instance method—the one that is to be defined for the Movie class in Segment 194—to work on a Movie instance named by a variable, m, you write the following:

m.rating() 

Note that the rating instance method, as defined in this segment, happens to have no ordinary arguments.