Week 2 Q 2 Programming
Week 2 Q 2 Programming
Department of Education
NESTED IF STATEMENTS
Week 2
3. Write an if-else statement that sets wage per day of 400 for an employee who
has work hours less than or equal to 40, otherwise, wage per day is set to 450.
4. Write an if statement that sets the variable rate to 400 if the boolean variable
over is false.
5. Write an if statement that displays the message “invalid number” if the value is
less than 1. Otherwise, assign 200 to variable num.
Q2 - Week 2
MELC: Demonstrate using Decision constructs in accordance with Java framework.
TLE_ICTJAVA11-12POAD-IIf-i-29
(Government Property. Not for sale)
Page 2 of 4
LEARNING ACTIVITY WORKSHEETS
Grade 12 – Programming NC III
ACTIVITY 3 General Format. (10 points)
Directions: Write the general format of an If-Else-If construct and draw the equivalent
flowchart. Write your answers on the space provided.
Q2 - Week 2
MELC: Demonstrate using Decision constructs in accordance with Java framework.
TLE_ICTJAVA11-12POAD-IIf-i-29
(Government Property. Not for sale)
Page 3 of 4
LEARNING ACTIVITY WORKSHEETS
Grade 12 – Programming NC III
ACTIVITY 4 Algorithm. (10 points)
Directions: Design a flowchart that assigns category to the seats in an
auditorium, depending on the seat number. Write your answers on the space provided.
Q2 - Week 2
MELC: Demonstrate using Decision constructs in accordance with Java framework.
TLE_ICTJAVA11-12POAD-IIf-i-29
(Government Property. Not for sale)
Page 4 of 4