ABSTRACT

This chapter covers the basic control sequences, including comparisons and iterations. It also covers an introduction to methods, basic polymorphism (overloading), and recursion. The chapter discusses the mathematical abbreviations as well as Boolean expressions, short circuit evaluations, and type casting. All of our programs have followed a single path. That is, they do one step and then the next without regard for our input. If statements are used with limited comparisons, while switch statements are used in multiple cases. A compound statement is a set of statements that are contained between to braces. Recursion means nothing more than repeating the same function from within that function. The goal of any good programmer is to write code that can be reused in several projects. Try to limit each function to a single task. If one function requires a large list of variables, or if it does the job of many functions, then it’s probably too big.