Title: Module 6 - More Conditionals and Loops
Course: COP 2551 Intro to Object Oriented Prog > Section: Module 6 - More Conditionals and Loops

Introduction

In Module 5, you learned several statements for creating selection and repetition structures in Java. The while loop for repeating an activity will be expanded in this chapter. The logic of a do-while loop is very similar, but with a distinct twist.

Another repetition structure, the for loop, has specific syntax and grammar. As you continue to explore the selection structure, this module demonstrates the switch statement for making decisions. The only ternary operator in Java is the conditional operator, similar to an if-else statement

Objectives

Upon completion of this module, the student will be able to:

- Examine conditional processing using switch statements.
- Explore the conditional operator.
- Examine an alternative repetition statement, the do loop.
- Examine the special properties of the for loop and situations where it is best used.

Readings & Resources

Chapter 6, Sections 1 - 4 Java Software Solutions: Foundations of Program Design, 8^th Ed., John Lewis and William Loftus.

Assignments and Activities

- Post to the Module 6 Discussion Board
- Complete the Module 6 Ungraded Activities
- Complete the Module 6 Quiz