Decision Making

by

Introduction

This lesson introduces students to java programming concepts of decision making. They will learn programming constructs like if statements, if else statements, compound relational tests, nested if statements. They will also use the multipath switch structure.

Let us understand the following:

1). that codes will execute sequentially by default.

2). More complex codes will require conditional execution. This involves the execution of a statement or a block of code based on a condition being met. If statements, if else statements, nested if else statements, switch structure.

3). Some codes may need repetitive execution. This is reserved for the next lesson where we will take a deeper look at loops in java and how the same block of code can be repeated a given number of times. Examples of iteration include for loops, while loops, for … while loops.

4). Transfer is generally regarded as poor programming style, but it refers to where the point of execution jumps to another point in the program. This creates difficulty and discontinuity in the logic of the program making it hard to understand. break, continue, and return.

Lesson Time

Class time
1 Class Period

Industries / Subjects / Grades

Industries / Pathways
  • Information and Communication Technologies Information and Communication Technologies
Grade Levels
  • 10
  • 11
  • 12
  • Post-Secondary
  • Adult

Standards and Objectives

Standards

California's 2008 CTE Standards (2)

Related Instructional Objectives (SWBAT...)

  • After completing this lesson students will be able to code, analyze, and use decision making constructs in java language programming.
  • Students will be able to distinguish between the various program flow control types.

Get access to the rest of this Lesson and over 3000 more!

Create a Free Account or now!