INF/231 INF231 INF 231 WEEK 3 DISCUSSION 1
- ashford university / INF 231
- 24 May 2018
- Price: $8
- Other / Other
INF 231 WEEK 3 DISCUSSION 1
Discussion 1
Interactive Assignment: If-Else Control Flow
Statements |
Provide the definition of an If-Else statement. Identify when
you would you use an If-Else statement in programming.
Consider the Java code below:
if (x > 5)
{
System.out.println("A");
if (x < 10)
System.out.println("B");
}
else
System.out.println("C");
What is displayed if x is:
a.
4;
b.
5;
c.
6;
d.
9;
e.
10;
f.
11
Guided Response: Review several of your
peers’ posts. Respond to at least two of your peers. Compare your answers to
the If-else code analysis, and evaluate your peers’ analysis identifying where
you feel their answer is correct or not correct for a. through f. Provide
reasoning for your evaluative comments.