Professional Documents
Culture Documents
INTRODUCTION TO COMPUTER
SCIENCE
Topic 9: introduction to selection control
KHE-LCD-SGD-00190
INTRODUCTION TO COMPUTER SCIENCE
Introduction
• Statements in Java can be either simple statements or compound
statements.
• Simple statements, such as assignment statements and subroutine call
statements, are the basic building blocks of a program.
• Compound statements, such as while loops and if statements, are used to
organize simple statements into complex structures, which are called
control structures because they control the order in which the statements
are executed.
• Control statements are the statements that define the flow of programs.
• There are 3 types of control statements in Java: Selection, iteration, and
jump statements.
• In this topic, we are going to convert all the selection pseudocode exercises
we have done in the topic 4 to java programs.
KHE-LCD-SGD-00190
INTRODUCTION TO COMPUTER SCIENCE
KHE-LCD-SGD-00190
INTRODUCTION TO COMPUTER SCIENCE
KHE-LCD-SGD-00190
INTRODUCTION TO COMPUTER SCIENCE
10
10
KHE-LCD-SGD-00190
INTRODUCTION TO COMPUTER SCIENCE
Java Program
11
11
Java Program
12
12
KHE-LCD-SGD-00190
INTRODUCTION TO COMPUTER SCIENCE
13
13
14
14
KHE-LCD-SGD-00190
INTRODUCTION TO COMPUTER SCIENCE
THE END
15
15
KHE-LCD-SGD-00190