SlideShare a Scribd company logo
Using Java
MINISTRY OF EDUCATION & HIGHER EDUCATION
COLLEGE OF SCIENCE AND TECHNOLOGY
KHANYOUNIS- PALESTINE
2Presented & Prepared by: Mahmoud R. Alfarra
Home WorkHW 1.1
Be Care
Very Important information
 Programming Life Cycle …
 Algorithms
 Pseudo Code
 Flow Chart
 Practices
 Emank X Mezank
3Presented & Prepared by: Mahmoud R. Alfarra
 Building an application has five sorted stages:
 Thinking
 Planning
 Designing
 Coding
 Testing
4Presented & Prepared by: Mahmoud R. Alfarra
 Thinking Stage is the most important one in
the life cycle of programming because its
result has an occur affect on the following
stages.
 No rules
 No specific language
 Only read, understand, imagine
5Presented & Prepared by: Mahmoud R. Alfarra
 Before writing a program to solve a problem,
it is essential to have a thorough
understanding of the problem and a carefully
planned approach to solving it.
 We have many techniques to represent our
approach before designing and coding
it(Algorithm).
 Pseudo Code
 Flow Chart
6Presented & Prepared by: Mahmoud R. Alfarra
 Designing stage focuses on how the
application will be appeared to users.
7Presented & Prepared by: Mahmoud R. Alfarra
 In this stage, we translate all of the previous
stages to a specific programming language.
8Presented & Prepared by: Mahmoud R. Alfarra
X<=0
yes
F(x)= XF(x)= - X
NO
If (x>=0)
Fx = x;
else
Fx = -x;
 InThis stage, the programmer test his
application by inputting many values and
compare the results with the supposed one.
 If they are not the same … the programmer
must repair his application.
9Presented & Prepared by: Mahmoud R. Alfarra
 Any computing problem can be solved by
executing a series of actions in a specific
order.
 An algorithm is a procedure for solving a
problem in terms of
 The actions to execute and
 The order in which these actions execute.
10Presented & Prepared by: Mahmoud R. Alfarra
In two pages, write what is algorithm, why and how
do they represented ?HW 2.1
 Specifying the order in which statements
(actions) execute in a program is called
program control.
 Program control can be one of three
structures :
 Sequential structure
 Selection structure
 Repetition structure
11Presented & Prepared by: Mahmoud R. Alfarra
 Documented my solution ideas
 Detect the time and space of the solution.
 Help the programmer to determine the
logical errors.
 Comparing between solutions of the same
problem.
12Presented & Prepared by: Mahmoud R. Alfarra
 To represent algorithms we have two ways:
13Presented & Prepared by: Mahmoud R. Alfarra
Algorithms
representation
Pseudo code Flow Chart
 Pseudocode is an informal language that
helps programmers develop algorithms
without having to worry about the strict
details of Programming language syntax.
 Pseudocode is similar to everyday English.
 But it is not an actual computer programming
language.
14Presented & Prepared by: Mahmoud R. Alfarra
 Pseudocode normally describes only statements
representing the actions of the solution.
 Such actions might include input, output or a
calculation.
15Presented & Prepared by: Mahmoud R. Alfarra
If student's grade is greater than or equal to 60
Print "passed"
else
Print "failed"
 Flow Chart is a way to illustrate the step of
solving the problems using shapes.
 Every pseudo code can be represented by
Flow chart.
16Presented & Prepared by: Mahmoud R. Alfarra
In one page, discuss the meaning of Flowchart
and its importance?HW 2.2
17Presented & Prepared by: Mahmoud R. Alfarra
To represent the start and
end of the program
To represent the input and
Output process
To represent the arithmetic
operations
18Presented & Prepared by: Mahmoud R. Alfarra
To represent logical operators
And conditions as (if (x >5))
To represent the flow of
the operations
19Presented & Prepared by: Mahmoud R. Alfarra
Practices
 Write the algorithm to print the average of
the temperaturesT1,T2,T3.
20Presented & Prepared by: Mahmoud R. Alfarra
Practice 1.1
Read theT1,T2,T3
Calculate the sum by: sum =T1,T2,T3
Calculate the average by : average = sum/3
Print average
Be Care: when the question ask about an algorithm, you can
write pseudo code or Flow chart, its yours
21Presented & Prepared by: Mahmoud R. Alfarra
Practice 1.1
Sum = T1+T2+T3
Start
Read
T1, T2, T3
Average = sum/3
Print
Average
End
This control structure is a
Sequential Structure.
That the statements in a
program are executed
one after the other in the
order in which they are
written.
 Write the algorithm to calculate the average
of the temperaturesT1,T2,T3 and print
(cold)if it less than 17 and print (hot) if it
greater or equal to 17.
22Presented & Prepared by: Mahmoud R. Alfarra
Practice 1.2
Be Care: When the question ask about a specific
representation way, you MUST solve with this way.
23Presented & Prepared by: Mahmoud R. Alfarra
Practice 1.2
Sum = T1+T2+T3
Start
Read
T1, T2, T3
Avg = sum/3
Print Hot
Avg >= 17
Print Cold
End
YesNo
This control
structure is a
selection structure
That the statements
in a program are
executed one after
the other in the
order in which they
are written.
 Write an algorithm to Print the area of a
circle,( area = π * R2 ).
24Presented & Prepared by: Mahmoud R. Alfarra
Practice 1.3
Read the R
Set π = 3.14
Calculate the area by: area = π * R *R
Print area
Arithmetic equation In algorithms, must be simplified (i.e: X2=
X*X) , (2X = 2*X), (2+3X = 2+ 3*x) etc.
25Presented & Prepared by: Mahmoud R. Alfarra
Practice 1.3
π = 3.14
start
Read R
area = π × R ×R
Print area
End
Rewrite this practice,
to calculate the
around of circle and
Print (Max) if it is
greater than 40 and
print (Min) if it is less
than or equal to 40
HW 2.3
 Write an algorithm to accept an integer from
the user and then print it multiple table from
(1 to 12)…
26Presented & Prepared by: Mahmoud R. Alfarra
Practice 1.4
Read the X
Set counter to 1
While counter less than or equal to 12 Repeat
Print X * counter
Set counter = counter +1
27Presented & Prepared by: Mahmoud R. Alfarra
Counter = 1
Start
Read
X
Print (counter *X)
Counter <=12
End
No
Counter = counter +1
Yes
Practice 1.4
1. Write an algorithm to calculate the value of
the F(x) function.
2. Write an algorithm to accept three integers
from the users and print the maximum one.
3. Write an algorithm to print the average of
population of Gaza.
28Presented & Prepared by: Mahmoud R. Alfarra
0
0
x x
F(x)
x x

 
 
4. Write an algorithm to calculate how many
IT student success in the Programming 1
course.
29Presented & Prepared by: Mahmoud R. Alfarra
Consider all of the previous practices as home
workHW 2.4
َ‫ر‬ ْ‫َنن‬‫ع‬ ،ُ‫ه‬ْ‫ن‬َ‫ع‬ ‫هللا‬ َ‫ي‬ ِ‫ض‬َ‫ر‬ َ‫ة‬َ‫م‬‫ا‬َ‫م‬ُ‫أ‬ ‫ي‬ِ‫ب‬َ‫أ‬ ْ‫َن‬‫ع‬ُ ِ‫َّلله‬ ‫ا‬ِ‫ى‬‫ن‬ََ ِ ِ‫َّلله‬ ِِ‫نل‬ُ‫س‬ِ‫ه‬‫ن‬ْ‫ي‬َ‫ى‬َ‫ع‬
َِ‫نا‬َ‫ق‬ ،َ‫م‬ِ‫ى‬َ‫س‬َ‫ل‬:(ِِ‫ا‬َ‫م‬‫ن‬ِِّ ‫َّللش‬ ََ ِِ‫نا‬ََ ِ‫ن‬ِ‫إ‬ِ ‫ن‬ِ‫س‬ َ‫م‬‫ن‬َ‫ى‬ََْ‫ش‬‫َّلل‬ ُُ‫ن‬َ‫ف‬ْ‫ر‬َ‫ي‬ِ‫ش‬‫َا‬‫ع‬‫نا‬َ‫س‬
‫َّلل‬ ِ‫ل‬َ‫أ‬ ِ‫ئ‬ِ‫ط‬ْ‫خ‬ُ‫م‬ْ‫ش‬‫َّلل‬ ِ‫م‬ِ‫ى‬ْ‫س‬ُ‫م‬ْ‫ش‬‫َّلل‬ ِ‫د‬ْ‫ب‬َ‫ع‬ْ‫ش‬‫َّلل‬ ِ‫َن‬‫ع‬ْ‫س‬‫َّلل‬َ‫ل‬ َ‫م‬ِ‫د‬َ‫ن‬ ْ‫ن‬ِ‫إ‬َ‫ف‬ ،ِ‫يء‬ِ‫س‬ُ‫م‬ْ‫ش‬َ ِ‫َّلله‬ َ‫ر‬َ‫ف‬ْ‫غ‬َ‫ت‬
‫َة‬‫د‬ ِِ‫َّلل‬َ‫ل‬ ْ َ‫ب‬ِ‫ت‬ُ‫ك‬ ‫ال‬ِ‫إ‬َ‫ل‬ ،‫ا‬َ‫ه‬‫ا‬ََْ‫ش‬َ‫أ‬ ‫ا‬َ‫ه‬ْ‫ن‬ِ‫م‬)‫األلباني‬ ‫حسنـه‬
30Presented & Prepared by: Mahmoud R. Alfarra
Main concepts of
Programming
31Presented & Prepared by: Mahmoud R. Alfarra

More Related Content

PPT
Computer Programming, Loops using Java - part 2
Mahmoud Alfarra
 
PPT
Computer Programming, Loops using Java
Mahmoud Alfarra
 
PPT
7 programming-using-java decision-making220102011
Mahmoud Alfarra
 
PPT
8 programming-using-java decision-making practices 20102011
Mahmoud Alfarra
 
PDF
4 coding from algorithms
hccit
 
PPT
Programing Fundamental
Qazi Shahzad Ali
 
PDF
Algorithm and c language
kamalbeydoun
 
DOCX
programming concept
Nehabhy
 
Computer Programming, Loops using Java - part 2
Mahmoud Alfarra
 
Computer Programming, Loops using Java
Mahmoud Alfarra
 
7 programming-using-java decision-making220102011
Mahmoud Alfarra
 
8 programming-using-java decision-making practices 20102011
Mahmoud Alfarra
 
4 coding from algorithms
hccit
 
Programing Fundamental
Qazi Shahzad Ali
 
Algorithm and c language
kamalbeydoun
 
programming concept
Nehabhy
 

What's hot (20)

PPTX
Algorithm and pseudo codes
hermiraguilar
 
PDF
Algorithms notes 2 tutorials duniya
TutorialsDuniya.com
 
PDF
POLITEKNIK MALAYSIA
Aiman Hud
 
PDF
POLITEKNIK MALAYSIA
Aiman Hud
 
PPSX
Algorithm and flowchart
Sachin Goyani
 
PPTX
Flowchart and algorithem
ehsanullah786
 
PPSX
Problem solving and design
Renée Howard-Johnson
 
PPTX
Toy Interpreter
Dhrumil Panchal
 
PPTX
Algorithm and flowchart
Rabin BK
 
PDF
Fundamentals of programming with C++
Seble Nigussie
 
PPTX
flowchart & algorithms
Student
 
PDF
Computer programming chapter ( 4 )
Ibrahim Elewah
 
PDF
Graphical programming
Bilal Maqbool ツ
 
PPTX
Flowcharts and algorithms
Student
 
PPT
2.3 Apply the different types of algorithm to solve problem
Frankie Jones
 
PPTX
Algorithms and flowcharts
Samuel Igbanogu
 
PDF
Introduction to computer_lec_04
Ramadan Babers, PhD
 
PPTX
Algorithm
IHTISHAM UL HAQ
 
PPT
Programming fundamentals lecture 1&2
Raja Hamid
 
DOCX
Oop lab assignment 01
Drjilesh
 
Algorithm and pseudo codes
hermiraguilar
 
Algorithms notes 2 tutorials duniya
TutorialsDuniya.com
 
POLITEKNIK MALAYSIA
Aiman Hud
 
POLITEKNIK MALAYSIA
Aiman Hud
 
Algorithm and flowchart
Sachin Goyani
 
Flowchart and algorithem
ehsanullah786
 
Problem solving and design
Renée Howard-Johnson
 
Toy Interpreter
Dhrumil Panchal
 
Algorithm and flowchart
Rabin BK
 
Fundamentals of programming with C++
Seble Nigussie
 
flowchart & algorithms
Student
 
Computer programming chapter ( 4 )
Ibrahim Elewah
 
Graphical programming
Bilal Maqbool ツ
 
Flowcharts and algorithms
Student
 
2.3 Apply the different types of algorithm to solve problem
Frankie Jones
 
Algorithms and flowcharts
Samuel Igbanogu
 
Introduction to computer_lec_04
Ramadan Babers, PhD
 
Algorithm
IHTISHAM UL HAQ
 
Programming fundamentals lecture 1&2
Raja Hamid
 
Oop lab assignment 01
Drjilesh
 
Ad

Similar to 2 programming-using-java how to built application (20)

PPTX
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
PPT
3 algorithm-and-flowchart
Rohit Shrivastava
 
PPTX
Lec 2 -algorithms-flowchart-and-pseudocode1.pptx
AbdelrahmanRagab36
 
PPTX
programming part 1 introduction to python.pptx
hashini42
 
PDF
Introduction to programming : flowchart, algorithm
Kritika Chauhan
 
PDF
2021 CSE031.Lecture 6.Flow_Charts_Pseudocode.pptx.pdf
CursedPirate
 
PPTX
Csci101 lect00 introduction
Elsayed Hemayed
 
PPTX
Unit-1_PPS_H6nS4p8J1iooinoinoinoink.pptx
rannbirhealer
 
PDF
Intro to Algorithms - Time and Space Complexity
UsmanSajid38
 
PDF
Algorithm
farishah
 
PPT
Comp102 lec 1
Fraz Bakhsh
 
PPT
Data Structures- Part1 overview and review
Abdullah Al-hazmy
 
PPTX
ANALYSIS AND DESIGN OF ALGORITHMS -M1-PPT
AIET
 
PPTX
MODULE1-INTRODUCTION.pptx-COMPUTER PROGRAMING
MarcMiguel2
 
PPTX
UNIT-1.pptx python for engineering first year students
SabarigiriVason
 
PPT
Intro to DSAA.ppt
jumar dimas
 
PDF
Introduction to algorithms
subhashchandra197
 
PPSX
DISE - Programming Concepts
Rasan Samarasinghe
 
PDF
Logic Development and Algorithm.
NandiniSidana
 
PPTX
Algorithm,Pseudocode,Flowchart.pptx
DrThenmozhiKarunanit
 
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
3 algorithm-and-flowchart
Rohit Shrivastava
 
Lec 2 -algorithms-flowchart-and-pseudocode1.pptx
AbdelrahmanRagab36
 
programming part 1 introduction to python.pptx
hashini42
 
Introduction to programming : flowchart, algorithm
Kritika Chauhan
 
2021 CSE031.Lecture 6.Flow_Charts_Pseudocode.pptx.pdf
CursedPirate
 
Csci101 lect00 introduction
Elsayed Hemayed
 
Unit-1_PPS_H6nS4p8J1iooinoinoinoink.pptx
rannbirhealer
 
Intro to Algorithms - Time and Space Complexity
UsmanSajid38
 
Algorithm
farishah
 
Comp102 lec 1
Fraz Bakhsh
 
Data Structures- Part1 overview and review
Abdullah Al-hazmy
 
ANALYSIS AND DESIGN OF ALGORITHMS -M1-PPT
AIET
 
MODULE1-INTRODUCTION.pptx-COMPUTER PROGRAMING
MarcMiguel2
 
UNIT-1.pptx python for engineering first year students
SabarigiriVason
 
Intro to DSAA.ppt
jumar dimas
 
Introduction to algorithms
subhashchandra197
 
DISE - Programming Concepts
Rasan Samarasinghe
 
Logic Development and Algorithm.
NandiniSidana
 
Algorithm,Pseudocode,Flowchart.pptx
DrThenmozhiKarunanit
 
Ad

More from Mahmoud Alfarra (20)

PPT
Chapter 10: hashing data structure
Mahmoud Alfarra
 
PPT
Chapter9 graph data structure
Mahmoud Alfarra
 
PPT
Chapter 8: tree data structure
Mahmoud Alfarra
 
PPT
Chapter 7: Queue data structure
Mahmoud Alfarra
 
PPT
Chapter 6: stack data structure
Mahmoud Alfarra
 
PPT
Chapter 5: linked list data structure
Mahmoud Alfarra
 
PPT
Chapter 4: basic search algorithms data structure
Mahmoud Alfarra
 
PPT
Chapter 3: basic sorting algorithms data structure
Mahmoud Alfarra
 
PPT
Chapter 2: array and array list data structure
Mahmoud Alfarra
 
PPT
Chapter1 intro toprincipleofc#_datastructure_b_cs
Mahmoud Alfarra
 
PPT
Chapter 0: introduction to data structure
Mahmoud Alfarra
 
PPTX
3 classification
Mahmoud Alfarra
 
PPT
6 programming-using-java decision-making20102011-
Mahmoud Alfarra
 
PPT
5 programming-using-java intro-tooop20102011
Mahmoud Alfarra
 
PPT
4 programming-using-java intro-tojava20102011
Mahmoud Alfarra
 
PPT
3 programming-using-java introduction-to computer
Mahmoud Alfarra
 
PPT
1 programming-using-java -introduction
Mahmoud Alfarra
 
PPTX
تلخيص النصوص تلقائيا
Mahmoud Alfarra
 
PDF
4×4×4 لتحصيل التميز
Mahmoud Alfarra
 
PPTX
Data preparation and processing chapter 2
Mahmoud Alfarra
 
Chapter 10: hashing data structure
Mahmoud Alfarra
 
Chapter9 graph data structure
Mahmoud Alfarra
 
Chapter 8: tree data structure
Mahmoud Alfarra
 
Chapter 7: Queue data structure
Mahmoud Alfarra
 
Chapter 6: stack data structure
Mahmoud Alfarra
 
Chapter 5: linked list data structure
Mahmoud Alfarra
 
Chapter 4: basic search algorithms data structure
Mahmoud Alfarra
 
Chapter 3: basic sorting algorithms data structure
Mahmoud Alfarra
 
Chapter 2: array and array list data structure
Mahmoud Alfarra
 
Chapter1 intro toprincipleofc#_datastructure_b_cs
Mahmoud Alfarra
 
Chapter 0: introduction to data structure
Mahmoud Alfarra
 
3 classification
Mahmoud Alfarra
 
6 programming-using-java decision-making20102011-
Mahmoud Alfarra
 
5 programming-using-java intro-tooop20102011
Mahmoud Alfarra
 
4 programming-using-java intro-tojava20102011
Mahmoud Alfarra
 
3 programming-using-java introduction-to computer
Mahmoud Alfarra
 
1 programming-using-java -introduction
Mahmoud Alfarra
 
تلخيص النصوص تلقائيا
Mahmoud Alfarra
 
4×4×4 لتحصيل التميز
Mahmoud Alfarra
 
Data preparation and processing chapter 2
Mahmoud Alfarra
 

Recently uploaded (20)

PDF
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
PPTX
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
PDF
Sunset Boulevard Student Revision Booklet
jpinnuck
 
PDF
1.Natural-Resources-and-Their-Use.ppt pdf /8th class social science Exploring...
Sandeep Swamy
 
PPTX
Odoo 18 Sales_ Managing Quotation Validity
Celine George
 
PPTX
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
PDF
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
PPTX
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
PPTX
PREVENTIVE PEDIATRIC. pptx
AneetaSharma15
 
PPTX
How to Manage Global Discount in Odoo 18 POS
Celine George
 
DOCX
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
PPTX
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
PDF
Types of Literary Text: Poetry and Prose
kaelandreabibit
 
PPTX
TEF & EA Bsc Nursing 5th sem.....BBBpptx
AneetaSharma15
 
PPTX
Congenital Hypothyroidism pptx
AneetaSharma15
 
PPTX
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 
PPTX
Care of patients with elImination deviation.pptx
AneetaSharma15
 
PPTX
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 
PDF
PG-BPSDMP 2 TAHUN 2025PG-BPSDMP 2 TAHUN 2025.pdf
AshifaRamadhani
 
PDF
3.The-Rise-of-the-Marathas.pdfppt/pdf/8th class social science Exploring Soci...
Sandeep Swamy
 
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
Sunset Boulevard Student Revision Booklet
jpinnuck
 
1.Natural-Resources-and-Their-Use.ppt pdf /8th class social science Exploring...
Sandeep Swamy
 
Odoo 18 Sales_ Managing Quotation Validity
Celine George
 
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
PREVENTIVE PEDIATRIC. pptx
AneetaSharma15
 
How to Manage Global Discount in Odoo 18 POS
Celine George
 
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
Types of Literary Text: Poetry and Prose
kaelandreabibit
 
TEF & EA Bsc Nursing 5th sem.....BBBpptx
AneetaSharma15
 
Congenital Hypothyroidism pptx
AneetaSharma15
 
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 
Care of patients with elImination deviation.pptx
AneetaSharma15
 
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 
PG-BPSDMP 2 TAHUN 2025PG-BPSDMP 2 TAHUN 2025.pdf
AshifaRamadhani
 
3.The-Rise-of-the-Marathas.pdfppt/pdf/8th class social science Exploring Soci...
Sandeep Swamy
 

2 programming-using-java how to built application

  • 1. Using Java MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE
  • 2. 2Presented & Prepared by: Mahmoud R. Alfarra Home WorkHW 1.1 Be Care Very Important information
  • 3.  Programming Life Cycle …  Algorithms  Pseudo Code  Flow Chart  Practices  Emank X Mezank 3Presented & Prepared by: Mahmoud R. Alfarra
  • 4.  Building an application has five sorted stages:  Thinking  Planning  Designing  Coding  Testing 4Presented & Prepared by: Mahmoud R. Alfarra
  • 5.  Thinking Stage is the most important one in the life cycle of programming because its result has an occur affect on the following stages.  No rules  No specific language  Only read, understand, imagine 5Presented & Prepared by: Mahmoud R. Alfarra
  • 6.  Before writing a program to solve a problem, it is essential to have a thorough understanding of the problem and a carefully planned approach to solving it.  We have many techniques to represent our approach before designing and coding it(Algorithm).  Pseudo Code  Flow Chart 6Presented & Prepared by: Mahmoud R. Alfarra
  • 7.  Designing stage focuses on how the application will be appeared to users. 7Presented & Prepared by: Mahmoud R. Alfarra
  • 8.  In this stage, we translate all of the previous stages to a specific programming language. 8Presented & Prepared by: Mahmoud R. Alfarra X<=0 yes F(x)= XF(x)= - X NO If (x>=0) Fx = x; else Fx = -x;
  • 9.  InThis stage, the programmer test his application by inputting many values and compare the results with the supposed one.  If they are not the same … the programmer must repair his application. 9Presented & Prepared by: Mahmoud R. Alfarra
  • 10.  Any computing problem can be solved by executing a series of actions in a specific order.  An algorithm is a procedure for solving a problem in terms of  The actions to execute and  The order in which these actions execute. 10Presented & Prepared by: Mahmoud R. Alfarra In two pages, write what is algorithm, why and how do they represented ?HW 2.1
  • 11.  Specifying the order in which statements (actions) execute in a program is called program control.  Program control can be one of three structures :  Sequential structure  Selection structure  Repetition structure 11Presented & Prepared by: Mahmoud R. Alfarra
  • 12.  Documented my solution ideas  Detect the time and space of the solution.  Help the programmer to determine the logical errors.  Comparing between solutions of the same problem. 12Presented & Prepared by: Mahmoud R. Alfarra
  • 13.  To represent algorithms we have two ways: 13Presented & Prepared by: Mahmoud R. Alfarra Algorithms representation Pseudo code Flow Chart
  • 14.  Pseudocode is an informal language that helps programmers develop algorithms without having to worry about the strict details of Programming language syntax.  Pseudocode is similar to everyday English.  But it is not an actual computer programming language. 14Presented & Prepared by: Mahmoud R. Alfarra
  • 15.  Pseudocode normally describes only statements representing the actions of the solution.  Such actions might include input, output or a calculation. 15Presented & Prepared by: Mahmoud R. Alfarra If student's grade is greater than or equal to 60 Print "passed" else Print "failed"
  • 16.  Flow Chart is a way to illustrate the step of solving the problems using shapes.  Every pseudo code can be represented by Flow chart. 16Presented & Prepared by: Mahmoud R. Alfarra In one page, discuss the meaning of Flowchart and its importance?HW 2.2
  • 17. 17Presented & Prepared by: Mahmoud R. Alfarra To represent the start and end of the program To represent the input and Output process To represent the arithmetic operations
  • 18. 18Presented & Prepared by: Mahmoud R. Alfarra To represent logical operators And conditions as (if (x >5)) To represent the flow of the operations
  • 19. 19Presented & Prepared by: Mahmoud R. Alfarra Practices
  • 20.  Write the algorithm to print the average of the temperaturesT1,T2,T3. 20Presented & Prepared by: Mahmoud R. Alfarra Practice 1.1 Read theT1,T2,T3 Calculate the sum by: sum =T1,T2,T3 Calculate the average by : average = sum/3 Print average Be Care: when the question ask about an algorithm, you can write pseudo code or Flow chart, its yours
  • 21. 21Presented & Prepared by: Mahmoud R. Alfarra Practice 1.1 Sum = T1+T2+T3 Start Read T1, T2, T3 Average = sum/3 Print Average End This control structure is a Sequential Structure. That the statements in a program are executed one after the other in the order in which they are written.
  • 22.  Write the algorithm to calculate the average of the temperaturesT1,T2,T3 and print (cold)if it less than 17 and print (hot) if it greater or equal to 17. 22Presented & Prepared by: Mahmoud R. Alfarra Practice 1.2 Be Care: When the question ask about a specific representation way, you MUST solve with this way.
  • 23. 23Presented & Prepared by: Mahmoud R. Alfarra Practice 1.2 Sum = T1+T2+T3 Start Read T1, T2, T3 Avg = sum/3 Print Hot Avg >= 17 Print Cold End YesNo This control structure is a selection structure That the statements in a program are executed one after the other in the order in which they are written.
  • 24.  Write an algorithm to Print the area of a circle,( area = π * R2 ). 24Presented & Prepared by: Mahmoud R. Alfarra Practice 1.3 Read the R Set π = 3.14 Calculate the area by: area = π * R *R Print area Arithmetic equation In algorithms, must be simplified (i.e: X2= X*X) , (2X = 2*X), (2+3X = 2+ 3*x) etc.
  • 25. 25Presented & Prepared by: Mahmoud R. Alfarra Practice 1.3 π = 3.14 start Read R area = π × R ×R Print area End Rewrite this practice, to calculate the around of circle and Print (Max) if it is greater than 40 and print (Min) if it is less than or equal to 40 HW 2.3
  • 26.  Write an algorithm to accept an integer from the user and then print it multiple table from (1 to 12)… 26Presented & Prepared by: Mahmoud R. Alfarra Practice 1.4 Read the X Set counter to 1 While counter less than or equal to 12 Repeat Print X * counter Set counter = counter +1
  • 27. 27Presented & Prepared by: Mahmoud R. Alfarra Counter = 1 Start Read X Print (counter *X) Counter <=12 End No Counter = counter +1 Yes Practice 1.4
  • 28. 1. Write an algorithm to calculate the value of the F(x) function. 2. Write an algorithm to accept three integers from the users and print the maximum one. 3. Write an algorithm to print the average of population of Gaza. 28Presented & Prepared by: Mahmoud R. Alfarra 0 0 x x F(x) x x     
  • 29. 4. Write an algorithm to calculate how many IT student success in the Programming 1 course. 29Presented & Prepared by: Mahmoud R. Alfarra Consider all of the previous practices as home workHW 2.4
  • 30. َ‫ر‬ ْ‫َنن‬‫ع‬ ،ُ‫ه‬ْ‫ن‬َ‫ع‬ ‫هللا‬ َ‫ي‬ ِ‫ض‬َ‫ر‬ َ‫ة‬َ‫م‬‫ا‬َ‫م‬ُ‫أ‬ ‫ي‬ِ‫ب‬َ‫أ‬ ْ‫َن‬‫ع‬ُ ِ‫َّلله‬ ‫ا‬ِ‫ى‬‫ن‬ََ ِ ِ‫َّلله‬ ِِ‫نل‬ُ‫س‬ِ‫ه‬‫ن‬ْ‫ي‬َ‫ى‬َ‫ع‬ َِ‫نا‬َ‫ق‬ ،َ‫م‬ِ‫ى‬َ‫س‬َ‫ل‬:(ِِ‫ا‬َ‫م‬‫ن‬ِِّ ‫َّللش‬ ََ ِِ‫نا‬ََ ِ‫ن‬ِ‫إ‬ِ ‫ن‬ِ‫س‬ َ‫م‬‫ن‬َ‫ى‬ََْ‫ش‬‫َّلل‬ ُُ‫ن‬َ‫ف‬ْ‫ر‬َ‫ي‬ِ‫ش‬‫َا‬‫ع‬‫نا‬َ‫س‬ ‫َّلل‬ ِ‫ل‬َ‫أ‬ ِ‫ئ‬ِ‫ط‬ْ‫خ‬ُ‫م‬ْ‫ش‬‫َّلل‬ ِ‫م‬ِ‫ى‬ْ‫س‬ُ‫م‬ْ‫ش‬‫َّلل‬ ِ‫د‬ْ‫ب‬َ‫ع‬ْ‫ش‬‫َّلل‬ ِ‫َن‬‫ع‬ْ‫س‬‫َّلل‬َ‫ل‬ َ‫م‬ِ‫د‬َ‫ن‬ ْ‫ن‬ِ‫إ‬َ‫ف‬ ،ِ‫يء‬ِ‫س‬ُ‫م‬ْ‫ش‬َ ِ‫َّلله‬ َ‫ر‬َ‫ف‬ْ‫غ‬َ‫ت‬ ‫َة‬‫د‬ ِِ‫َّلل‬َ‫ل‬ ْ َ‫ب‬ِ‫ت‬ُ‫ك‬ ‫ال‬ِ‫إ‬َ‫ل‬ ،‫ا‬َ‫ه‬‫ا‬ََْ‫ش‬َ‫أ‬ ‫ا‬َ‫ه‬ْ‫ن‬ِ‫م‬)‫األلباني‬ ‫حسنـه‬ 30Presented & Prepared by: Mahmoud R. Alfarra
  • 31. Main concepts of Programming 31Presented & Prepared by: Mahmoud R. Alfarra