Structure Decision for If Statement
CS1 / Java
Abstract
Very often there are several ways to solve a problem that requires the use of an if statement. This activity is designed to help students become familiar with this issue and make decisions to choose the best structure in terms of both correctness and code efficiency. Students should have learned Boolean expressions. Students should also have learned the syntax of if statements, including single-branch if statements, if-else statements, and multi-branch if statements. (This activity can also be used to introduce if statements as long as adequate time is allocated.)
This activity was developed with NSF support through IUSE-1626765. You may request access to this activity via the following link: IntroCS-POGIL Activity Writing Program.
Level: Undergraduate
Setting: Laboratory
Activity Type: Learning Cycle
Discipline: Computer Science
Course: CS1 / Java
Keywords: if statement
Downloads
Published
How to Cite
Issue
Section
License
Copyright of this work and the permissions granted to users of the PAC are defined in the PAC Activity User License.