January 2011
Intermediate to advanced
1648 pages
70h 30m
English
After having introduced the notion of types in Chapter 9, we’re now ready to zoom into a type’s members one by one. In this chapter, we focus on methods. Classes and structs act as containers for both data and operations. As you’ll see, all the available members emphasize one of those aspects. For methods, we’re clearly in the latter camp because they consist of code bodies. Users of the type can invoke those methods to carry out certain tasks that can modify state.
We also learn how to declare methods, dealing with concepts ...
Read now
Unlock full access