After you have read and studied chapter 5, you should be able to: Implement a selection control using if statements, implement a selection control using switch statements, write boolean expressions using relational and boolean expressions, evaluate given boolean expressions correctly, nest an if statement inside another if statement, describe how objects are compared, choose the appropriate selection control statement for a given task, define and use enumerated constants. | ©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 5 - Chapter 5 Selection Statements Animated Version Introduction to OOP with Java 4th Ed, C. Thomas Wu © The McGraw-Hill Companies, Inc. Objectives After you have read and studied this chapter, you should be able to Implement a selection control using if statements Implement a selection control using switch statements Write boolean expressions using relational and boolean expressions Evaluate given boolean expressions correctly Nest an if statement inside another if statement Describe how objects are compared Choose the appropriate selection control statement for a given task Define and use enumerated constants Chapter 5 - Intro to OOP with Java, C. Thomas Wu ©The McGraw-Hill Companies, Inc. We will study two forms of if statements in this lesson. They are called if-then-else and if-then. Although the compiler does not care how we format the if statements, we will present the recommended style. ©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 5 - The if Statement int testScore; testScore = //get test score input if (testScore We assume there’s some kind of input routine to input test score value and assign it to ‘testScore’. This sample shows how to make a decision on the input value by using an if test. ©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 5 - if ( testScore ) else Then Block Else Block Boolean Expression Intro . | ©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 5 - Chapter 5 Selection Statements Animated Version Introduction to OOP with Java 4th Ed, C. Thomas Wu © The McGraw-Hill Companies, Inc. Objectives After you have read and studied this chapter, you should be able to Implement a selection control using if statements Implement a selection control using switch statements Write boolean expressions using relational and boolean expressions Evaluate given boolean expressions correctly Nest an if statement inside another if statement Describe how objects are compared Choose the appropriate selection control statement for a given task Define and use enumerated constants Chapter 5 - Intro to OOP with Java, C. Thomas Wu ©The McGraw-Hill Companies, Inc. We will study two forms of if statements in this lesson. They are called if-then-else and if-then. Although the compiler does not care how we format the if statements, we will present the .