ABSTRACT

Java concepts Boolean variables, logical operators and expressions, equality and relational operators, control structures if, if … else, and switch, nesting of control structures, and enumerated data types

Programming skills Design, implement, and test Java programs capable of decision making

Programs you wrote so far did not make any decision. Given fi ve test scores, you know how to write a program to add them to obtain a cumulative test score. If you want to translate the cumulative test score into a letter grade, then you need a control structure that can make decisions based on cumulative test score. Such a control structure is called a selection structure. In this chapter you will learn about various selection structures available in Java. However, the fundamental principles you learn in this chapter can be applied in many scripting languages and programming languages, including C, C++, and C#.