Unit 01
Programming
K.A.D.D. Kodikara. (53/20/02)
HND 53
British College of Applied Studies. (Kandy)
A beginner's guide
1
Outline
What we’re covering?
• Algorithms
• Pseudo code
• Flowcharts
• Basics of Java Programming
2
Algori
thm
3
Example
How to prepare instant noodles.
4
Pseudocode
5
How to write comments in Pseudocode?
/* comment here */
Basic keywords used in Pseudocode.
start
stop
input
if - then - else If - else - end if
display
print
6
Exampl
Algorith
e Pseudoco
m de
1. Assume student marks is 65. /* find student pass or fail */
2. If students’ marks greater than or start
equal 50, display “PASS”. marks = 65
3. If is not display “FAIL” if (marks >= 50) then
display “PASS”
else
display “FAIL”
end if
stop 7
Flowchart
8
Basic symbols for creating
flowchart
Oval - Start or Stop
Arrow - Flow and direction
Parallelogram - Input or Output
Diamond - Decision
Rectangle - Process
9
Exam Flowc
hart
ple start
Algorit marks = 65
hm
1. Assume student marks is 65.
No
2. If student marks greater than or marks >= 50 display “FAIL”
equal 50, display “PASS”.
3. If is not display “FAIL”
Yes
display “PASS”
stop
10
Basics of
Java
Programmi
ng
11
Who invented the Java?
James Gosling is a father
of Java programming
language.
He invented Java
programming language
in 1991 at Sun
Microsystems company.
12
Simple Dynamic
Object Oriented Secured
Distributed Architecture Neutral
Robust Portable
Interpreted High Performance
Multithreaded
13
Data types of Java
Programming language.
Data Type
Primitive Reference
byte
short String
int Font
long Color
float
double
boolean
char 14
References
• Nuzrath, M., 2021. Nuzrath sir YouTube channel. [online] [Link]. Available at:
<[Link] [Accessed 24 June 2021].
• GeeksforGeeks. 2021. How to write a Pseudo Code? - GeeksforGeeks. [online] Available at:
<[Link] [Accessed 24 June 2021].
• [Link]. 2021. Flowchart Tutorial (with Symbols, Guide and Examples). [online]
Available at: <[Link] [Accessed 24 June
2021].
• [Link]. 2021. Java (programming language) - Wikipedia. [online] Available at:
<[Link] [Accessed 25 June 2021].
15
Any doubts?
16
Thank You!
17