1 of 18

Exploring Conditional Programming

2 of 18

Learning Target & Do Now

LT: Today has 3 focuses relating to Java:

  1. Determine the implementation for logic statements
  2. Determine how conditional branching works
  3. Gain experience playing with these

DN: Pull up Conditional_Explore code� You may also want Branching.java from a previous day

3 of 18

Homework

  • Study for the upcoming Unit 1 Test

Today’s animal:� Emperor tamarin

4 of 18

Exploring Conditional Programming, Day 2

5 of 18

Learning Target & Do Now

LT: Today has 3 focuses relating to Java:

  • Determine the implementation for logic statements
  • Determine how conditional branching works
  • Gain experience playing with these

DN: Pull up your code from yesterday, and continue working

6 of 18

Conditional Programming Day 2

  • Bonus challenge: Is it possible to reduce the number of conditional cases in your code?
    • May help to rewrite code
    • Hint: Nested conditionals

7 of 18

Homework

  • Submit the Exploring Conditional Programming assignment
  • Study for the Unit 1 test

Today’s animal: coelacanth

8 of 18

Conditional Programming Lab

if (readyForMore) {

deeperUnderstanding = true;

}

9 of 18

Learning Target & Do Now

LT: Today, I will gain a better understanding of not only reading code but writing it.

DN: Grab a computer and open today’s page on Google Classroom

10 of 18

Conditional Branching

  • Java can take different paths to complete its execution
  • State of certain code elements can determine path
  • Accomplished with if, else if, and else
    • When the condition is true, execute subsection of code
    • Otherwise, skip it

if( logical comparison )

{

commands that execute when the logical comparison evaluates to true

}

11 of 18

Conditional Branching, cont.

  • Using else if and else statements after an if allows for more branches
    • When an if runs, it will automatically skip the following else ifs and else
  • else if and else are optional
    • else if has a logical condition just like an if statement
    • else has no condition
    • When an else is used, it must be the last branch

12 of 18

Homework

  • Work on Conditionals lab if you feel you are behind
  • Tomorrow is a work day

Today’s animal: Dingiso

13 of 18

Lab Day

14 of 18

Learning Target & Do Now

LT: By the end of today I will feel comfortable with some of the basic rules of writing Java.

DN: Pull up your code from yesterday, and continue working

15 of 18

Homework

  • Submit the Conditional Programming Lab
  • Study!

Today’s animal:� New Guinea singing dog

16 of 18

Unit Test

17 of 18

Learning Target & Do Now

LT: Today I will demonstrate my mastery of the Unit 1 concepts.

DN: Prepare for a test!

18 of 18

Homework

  • None :)

Today’s animal:�glaucus atlanticus�(a.k.a. blue sea dragon)