1620_lecture_6

1620_lecture_6 - ITEC3620 Object-Based Programming Lecture 6 Boolean Algebra Review Branching selects from two paths Two paths two states true

This preview shows pages 1–9. Sign up to view the full content.

ITEC3620 Object-Based Programming Lecture 6 Boolean Algebra

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Review Branching selects from two paths Two paths two states true (yes) false (no) Diamond contains a condition A condition is a true - false question
3 Relational Operators How to turn integers into true / false ? Greater than > Less than < Equal to == Not equal to != Greater than or equal to >= Less than or equal to <=

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 Relational Operators II “missing” operators a !> b a not greater than b a <= b a less than or equal to b a !< b a not less than b a >= b a greater or equal to b
5 Relational Operators III equivalent operators a > b a greater than b b < a b less than a a >= b a greater or equal to b b <= a b less than or equal to a

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 Compound Conditions Allow us to put two (or more) sub- conditions into a condition AND OR
7 The expression is TRUE if and only if both input variables are TRUE TRUE 1 FALSE 0 TRUE 1 TRUE 1 FALSE 0 FALSE 0 FALSE 0 FALSE 0

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 OR – || The expression is TRUE if either input variable is TRUE TRUE 1 FALSE 0 TRUE 1 TRUE 1 TRUE 1 FALSE 0 TRUE 1 FALSE 0
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/06/2010 for the course INFORMATIO ITEC 1620 taught by Professor Stephenchen during the Winter '10 term at York University.

Page1 / 27

1620_lecture_6 - ITEC3620 Object-Based Programming Lecture 6 Boolean Algebra Review Branching selects from two paths Two paths two states true

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online