We have called this unit 'Java in the small' after atermcoined by DeRemer and Kron in a 1976 paper.This refers to the programming of the internal parts of programs, in particular the contentsofmethods.
The previous unit introduced the idea of objectscommunicating through the invocation of methods on objects. In this unit you will learn:
how to write the internal parts of methods;
the different types of data that the language provides;
the facilitiesfor altering the flow of program execution.
Our discussion is still within the framework that we adoptedinthe previous unit. The code we show here is assumed to be embedded in methods that access, and sometimes modify,instance variables. Methods are in turncontained in classes, which we discussindetail in Unit3.
Our objective is to create code that will be easy to read (whether by the original writer or somebody else),aswell as easytomaintain.Ofcourse, it must also be correct!