Chapter4_1-ControlStructuresIntro

Chapter4_1-ControlStructuresIntro - Chapter 4 Control...

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

Introduction Chapter 4: Control structures

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

View Full Document
Introduction to OOP Dr. S. GANNOUNI & Dr. A. TOUIR Page 2 Objectives What are control structures Relational Operators Logical operators Boolean expressions Conditional (Decision) statements Loop statements
Introduction to OOP Dr. S. GANNOUNI & Dr. A. TOUIR Page 3 What are Control Structures Without control structures, a computer would evaluate the instructions in a program step-by-step Control structures allow: Defining which instructions are evaluated Changing the order in which instructions are evaluated and Controlling the “flow” of the program Control structures include: Block statements (anything contained within curly brackets) Decision statements Loops

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

View Full Document
Introduction to OOP Dr. S. GANNOUNI & Dr. A. TOUIR Page 4 Relational Operators Relational operators produce boolean values. == Equal to != Not equal to < Less than <= Less than or equal to > Greater than >= Greater than or equal to
Introduction to OOP Dr. S. GANNOUNI & Dr.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern