Introduction To Programming Information Technology , 1’st Semester

Slides:



Advertisements
Similar presentations
If Statements, Try Catch and Validation. The main statement used in C# for making decisions depending on different conditions is called the If statement.
Advertisements

Chapter 3A Review boolean fun = true; if(fun) System.out.print(“yeah!”);
Hand Trace and Output for: int digit = 0; int number = 1423; do { digit = number % 10; System.out.println(digit); number = number / 10; } while (number.
Problem Solving 5 Using Java API for Searching and Sorting Applications ICS-201 Introduction to Computing II Semester 071.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Prepared by: Mahmoud Rafeek Al-Farra College of Science & Technology Dep. Of Computer Science & IT BCs of Information Technology Data Mining
Introduction to Computers and Programming Lecture 10: For Loops Professor: Evan Korth New York University.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie July 5, 2005.
Self-Reference - Induction Cmput Lecture 7 Department of Computing Science University of Alberta ©Duane Szafron 1999 Some code in this lecture is.
Introduction to Computers and Programming Lecture 4: Mathematical Operators New York University.
Introduction to Computer Programming Decisions If/Else Booleans.
COMP 14 Introduction to Programming Miguel A. Otaduy May 20, 2004.
Using Java MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Computer Programming 2 Lecture 2: Advanced Array Data Structure Using Methods Prepared & Presented by: Mahmoud Rafeek Alfarra MINISTRY OF EDUCATION & HIGHER.
CIS3931 – Intro to JAVA Lecture Note Set 3 19-May-05.
Using Java MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE Lecture 6 Introduction to classes and objects.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Python – Making Decisions Lecture 02. Control Structures A program that only has one flow is useful but limited. We can use if statements to make these.
Computer Programming 2 Lecture 3: Methods in Advanced & Practices Prepared & Presented by: Mahmoud Rafeek Alfarra MINISTRY OF EDUCATION & HIGHER EDUCATION.
PROGRAMMING LANGUAGES Prof. Lani Cantonjos. PROGRAM - set of step-by-step instructions that tells or directs the computer what to do. PROGRAMMING LANGUAGE.
Using Java MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE Lecture 7 Decision Making : selection statements.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Computer Programming 2 Lecture 1: Advanced Array Data Structure Using Methods Prepared & Presented by: Mahmoud Rafeek Alfarra MINISTRY OF EDUCATION & HIGHER.
5-1 Repetition Statements Repetition statements allow us to execute a statement multiple times Often they are referred to as loops Like conditional statements,
Using Java MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Computer Programming 2 Lecture 5: String Processing Part b: Class StringTokenizer Prepared & Presented by: Mahmoud Rafeek Alfarra MINISTRY OF EDUCATION.
Using Java MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
BIT 115: Introduction To Programming. 2 What’s Due When Listed in Course Schedule Let’s look at that now!
CPS120: Introduction to Computer Science Operations Lecture 9.
Introduction To Programming Information Technology , 1’st Semester
CS101 Computer Programming I Chapter 4 Extra Examples.
Prepared by: Mahmoud Rafeek Al-Farra College of Science & Technology Dep. Of Computer Science & IT BCs of Information Technology Data Mining
Using Java MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE Lecture 9 & 10 Repetition Statements.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Introduction to Java Primitive Types Operators Basic input and output.
Using Java MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE Lecture 15,16 Java’s Methods.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Computer Programming 2 Lecture 10: File streaming (1) Prepared & Presented by: Mahmoud Rafeek Alfarra MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE.
Using Java MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Computer Programming 2 Lecture 9: Object Oriented Programming Array Of Objects Prepared & Presented by: Mahmoud Rafeek Alfarra MINISTRY OF EDUCATION &
Looking inside classes Conditional Statements Week 4.
Computer Programming 2 Lecture 8: Object Oriented Programming Creating Classes & Objects Prepared & Presented by: Mahmoud Rafeek Alfarra MINISTRY OF EDUCATION.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
CS001 Introduction to Programming Day 6 Sujana Jyothi
Using Java MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE Lecture 18 Recursion & Pointers in Java.
Int fact (int n) { If (n == 0) return 1; else return n * fact (n – 1); } 5 void main () { Int Sum; : Sum = fact (5); : } Factorial Program Using Recursion.
Decision making and control structure quiz
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Debugging and Testing Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
Presented By: Mahmoud Rafeek Alfarra
Presented By: Mahmoud Rafeek Alfarra
Printing Lines of Asterisks
OPERATORS (2) CSC 111.
Part a: Fundamentals & Class String
محاضرة 1: مقدمة للمسـاق و مراجعـة للأساسيـات
Presented By: Mahmoud Rafeek Alfarra
Introduction To Programming Information Technology , 1’st Semester
Introduction To Programming Information Technology , 1’st Semester
Presented By: Mahmoud Rafeek Alfarra
Learning Intention I will learn about programming using selection (making choices) with one condition.
CISC181 Introduction to Computer Science Dr
Presented By: Mahmoud Rafeek Alfarra
Introduction To Programming Information Technology , 1’st Semester
QUIZ 5 – RESULT.
Presented By: Mahmoud Rafeek Alfarra
Presentation transcript:

Introduction To Programming Information Technology , 1’st Semester MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE Using Java Introduction To Programming Information Technology , 1’st Semester Lecture 8 Decision Making Practices Teacher: Mahmoud Rafeek Alfarra

Practice 1 Identify and correct the errors in each of the following sets of code: if ( gender == 1 ) System.out.println( "Woman" ); else; System.out.println( "Man" ); while ( z >= 0 ) sum += z; Presented & Prepared by: Mahmoud R. Alfarra

Practice 1 Identify and correct the errors in each of the following sets of code: if ( age >= 65 ); System.out.println( "Age greater than or equal to 65" ); else System.out.println( "Age is less than 65 )"; int x = 1, total; while ( x <= 10 ){ total += x; ++x; } Presented & Prepared by: Mahmoud R. Alfarra

Practice 1 Identify and correct the errors in each of the following sets of code: while ( x <= 100 ) total += x; ++x; while ( y > 0 ) { System.out.println( y ); ++y; } Presented & Prepared by: Mahmoud R. Alfarra

Practice 2 Trace the following program, assuming x =5, y = 8 and x=8, y=5: Presented & Prepared by: Mahmoud R. Alfarra

Practice 2 Determine the output for each of the given sets of code when x is 9 and y is 11 and when x is 11 and y is 9. Presented & Prepared by: Mahmoud R. Alfarra

Practice 2 Determine the output for each of the given sets of code when x is 9 and y is 11 and when x is 11 and y is 9. Presented & Prepared by: Mahmoud R. Alfarra

(‏سَبِّـحِ اسم رَبِّكَـ الأَعْـلَـى) Emank X Mezank ‏يقول رب العزة (سبحانـه) (‏سَبِّـحِ اسم رَبِّكَـ الأَعْـلَـى) Presented & Prepared by: Mahmoud R. Alfarra

Next… Practices Presented & Prepared by: Mahmoud R. Alfarra