Friday, October 9, 2026

AL ICT Lesson 11.3: Internet of Things (IoT) | Notes Tamil Medium Class Study Guide PDF Notes Exam Zoom Class

ЁЯЪк G.C.E. A/L ICT – Competency 11.1 | IoT Part 3

Door Detection, Reed Switch, Sensors, Actuators, Analog/Digital Signals, Physical Computing & Development Flow

Reed Switch Door Detection Sensor Actuator Analog vs Digital Physical Computing Exam Focus
⚡ Quick Answers | SEO / AEO / Featured Snippet Style Revision ▼

Reed Switch роОрой்ро▒ாро▓் роОрой்рой?

Magnetic field рооூро▓роо் open/close роЖроХுроо் switch. Door detection-ро▓் magnet роЙроЯрой் рокропрой்рокроЯுрод்родрок்рокроЯுроо்.

Door Detection роОрок்рокроЯி ро╡ேро▓ை роЪெроп்роХிро▒родு?

Reed switch digital input роЖроХ Arduino/microcontroller-роХ்роХு роЪெро▓்роХிро▒родு. Door open роЖройாро▓் LED/Buzzer ON роЪெроп்ропро▓ாроо்.

Sensor роОрой்ро▒ாро▓் роОрой்рой?

Physical quantity-роР detect/measure роЪெроп்родு electrical signal роЖроХ рооாро▒்ро▒ுроо் input device.

Actuator роОрой்ро▒ாро▓் роОрой்рой?

Control signal рокெро▒்ро▒ рокிро▒роХு physical action роЪெроп்ропுроо் output device. Example: Fan, Motor, Relay.

Analog vs Digital

Analog = continuous values. Digital = discrete states, рокொродுро╡ாроХ 0/1.

Physical Computing роОрой்ро▒ாро▓் роОрой்рой?

Software рооூро▓роо் physical electronic components-роР sense рооро▒்ро▒ுроо் control роЪெроп்ро╡родு.

Most important exam concept:
Input → Processing → Output

Sensor → Microcontroller → Actuator

Door Detection & Reed Switch

ЁЯЪк 26. Example 4 – Door Open/Close Detection ▼

Syllabus-ро▓்:

Detection of opening/closing a door using a reed switch / magnetic switch

NIE Teacher’s Guide-ро▓ுроо் “read switch” роОрой்ро▒ு роХுро▒ிрок்рокிроЯрок்рокроЯ்роЯாро▓ுроо், рокொродுро╡ாроХ роЗроЩ்роХு reed switch роОрой்рокродே рокொро░ுро│்.

Syllabus Term

Reed switch / magnetic switch

Use

Door open/close state detect роЪெроп்родро▓்

Input Type

Digital Input

Output

LED / Buzzer / Alarm / Message

ЁЯз▓ 27. Reed Switch роОрой்ро▒ாро▓் роОрой்рой? ▼

Reed switch роОрой்рокродு magnetic field рооூро▓роо் open/close роЖроХுроо் switch.

рокொродுро╡ாроХ:

Magnet Reed Switch

роЖроХிроп роЗро░рог்роЯுроо் роЪேро░்рои்родு рокропрой்рокроЯுрод்родрок்рокроЯுроХிро▒родு.

Door-ро▓் роЕрооைрок்рокு

Door │ │ Magnet │ └────────── Door Frame │ │ Reed Switch │ └──────────

Door рооூроЯрок்рокроЯுроо் рокோродு

Magnet рооро▒்ро▒ுроо் reed switch роЕро░ுроХிро▓் ро╡ро░ுроо்.

Door родிро▒роХ்роХுроо்рокோродு

Magnet рооро▒்ро▒ுроо் reed switch ро╡ிро▓роХுроо்.

Memory Trick:
Magnet роЕро░ுроХிро▓் ро╡рои்родாро▓் reed switch роиிро▓ை рооாро▒ுроо்.
ЁЯФО 28. Door Detection Logic ▼

System Flow

Door ↓ Reed Switch ↓ Digital Input ↓ Microcontroller ↓ Decision ↓ Alarm / LED / Message

Example 1

Door Closed

LED OFF

Door Open

LED ON

Example 2

Door Open

Buzzer ON

Door Closed

Buzzer OFF

роХுро▒ிрок்рокு: HIGH/LOW value роОрои்род роиிро▓ைропிро▓் ро╡ро░ுроо் роОрой்рокродு circuit wiring-роРрок் рокொро▒ுрод்родродு. Pull-up / pull-down arrangement рооро▒்ро▒ுроо் wiring method-роР рокொро▒ுрод்родு logic рооாро▒ро▓ாроо்.
ЁЯУЭ 29. Door Detection – Pseudocode ▼
START Read reed switch IF door is open Turn ON LED ELSE Turn OFF LED REPEAT
Exam Answer Style:
Read digital input from reed switch → check door state → control output device → repeat continuously.

Applications & System Building Blocks

ЁЯУК 30. рооூрой்ро▒ு рооுроХ்роХிроп Applications – роТро░ே рокாро░்ро╡ைропிро▓் ▼
Application Input Processing Output
LED control Switch / program Microcontroller LED
Automatic light LDR Microcontroller LED
Automatic fan Temperature sensor Microcontroller Fan
Door detection Reed switch Microcontroller LED / Buzzer
роЗродுродாрой் роЗрои்род competency-ропிрой் рооிроХ рооுроХ்роХிропрооாрой Input → Process → Output concept.
ЁЯз▒ 31. Building Blocks of a Digital / Embedded System ▼

роТро░ு basic system-роР роЗро╡்ро╡ாро▒ு роиிройைро╡ிро▓் ро╡ைрод்родுроХ்роХொро│்ро│ுроЩ்роХро│்:

INPUT ↓ ┌─────────────────┐ │ Microcontroller │ │ Processing │ └─────────────────┘ ↓ OUTPUT

Input Examples

LDR, Temperature sensor, Push button, Reed switch, Motion sensor

Processing

Microcontroller, Program / Decision logic

Output Examples

LED, Buzzer, Fan, Motor, Relay

Sensors, Actuators & Signals

ЁЯУб 32. Sensor роОрой்ро▒ாро▓் роОрой்рой? ▼

Sensor роОрой்рокродு physical quantity-роР detect/measure роЪெроп்родு electrical signal/data роЖроХ ро╡ро┤роЩ்роХுроо் component.

Sensor Detects
LDRLight
Temperature sensorTemperature
PIR sensorMotion
Ultrasonic sensorDistance
Reed switchMagnetic / door state
роиிройைро╡ிро▓் ро╡ைроХ்роХ:
Sensor = Input device
⚙️ 33. Actuator роОрой்ро▒ாро▓் роОрой்рой? ▼

Actuator роОрой்рокродு control signal роХிроЯைрод்род рокிро▒роХு physical action роЪெроп்ропுроо் device.

Examples

Motor Fan Relay Servo motor Solenoid LED рокோрой்ро▒ output devices
Memory Trick:
Sensor → роЙрогро░்роХிро▒родு
Actuator → роЪெропро▓்рокроЯுроХிро▒родு
ЁЯФД 34. Sensor + Controller + Actuator Model ▼

IoT/Embedded systems-ро▓் рооிроХро╡ுроо் рооுроХ்роХிропрооாрой model:

Physical World ↓ Sensor ↓ Microcontroller ↓ Decision ↓ Actuator ↓ Physical Action

Example – Smart Fan

Room Temperature ↓ Temperature Sensor ↓ Arduino ↓ Temperature > 30°C ↓ Relay ↓ Fan
Exam phrase:
Sensor reads the physical world. Microcontroller makes the decision. Actuator performs the physical action.
ЁЯОЪ️ 35. Analog vs Digital Input ▼
Analog Input Digital Input
Continuous value Discrete states
рокро▓ values рокொродுро╡ாроХ 0 / 1
Light intensity Button
Temperature Reed switch
LDR Digital switch
ADC рооூро▓роо் reading рокெро▒ро▓ாроо் Digital read рокропрой்рокроЯுрод்родро▓ாроо்
Easy Memory Trick:
Analog = роЕро│ро╡ு рооாро▒ிроХ்роХொрог்роЯே роЗро░ுроХ்роХுроо்
Digital = роиிро▓ை 0/1
ЁЯМб️ 36. Analog vs Digital Example ▼

Temperature – Analog-type physical quantity

Temperature 25.1°C 25.2°C 25.3°C 25.4°C ...

роЗродு рокோрой்ро▒ родொроЯро░்роЪ்роЪிропாроХ рооாро▒роХ்роХூроЯிроп роЕро│ро╡ுроХро│் Analog-type physical quantity роЖроХுроо்.

Door Switch – Digital state

Door switch OPEN CLOSED

роЗродுрокோрой்ро▒ роЗро░рог்роЯு родெро│ிро╡ாрой роиிро▓ைроХро│் Digital state роЖроХுроо்.

↔️ 37. Digital Input vs Digital Output ▼

Digital Input

Board родроХро╡ро▓ைрок் рокெро▒ுроХிро▒родு.

Example: Button → Arduino

Digital Output

Board control signal роЕройுрок்рокுроХிро▒родு.

Example: Arduino → LED

рооிроХ роОро│ிродாроХ:
Input = роЙро│்ро│ே ро╡ро░ுроо் data
Output = ро╡ெро│ிропே роЪெро▓்ро▓ுроо் control/data

Arduino Pins & System Comparison

ЁЯУЯ 38. Arduino Pin Types – Exam Table ▼
Feature Function
Analog Input Variable analog signals read роЪெроп்роп
Digital Input Digital state read роЪெроп்роп
Digital Output Output device control роЪெроп்роп
RX Serial data receive роЪெроп்роп
TX Serial data transmit роЪெроп்роп
USB Computer connection / program upload
Power Electrical power ро╡ро┤роЩ்роХ
Reset Program execution-роР reset роЪெроп்роп
Arduino Uno official documentation-ро▓் digital I/O рооро▒்ро▒ுроо் RX/TX serial pins рокро▒்ро▒ிроп details ро╡ро┤роЩ்роХрок்рокроЯ்роЯுро│்ро│рой.
ЁЯТ╗ 39. Traditional Computer vs Embedded System – роЗрой்ройுроо் родெро│ிро╡ாроХ ▼

Traditional Computer

роТро░ு student рокропрой்рокроЯுрод்родுроо் laptop: Keyboard, Mouse, CPU, RAM/Storage, Operating System, Applications, Monitor. рокро▓ ро╡роХைропாрой ро╡ேро▓ைроХро│ைроЪ் роЪெроп்роп рооுроЯிропுроо்.

Embedded System

Automatic fan: Temperature Sensor → Microcontroller → Driver → Fan. роХுро▒ிрок்рокிроЯ்роЯ control task-роХ்роХாроХ ро╡роЯிро╡рооைроХ்роХрок்рокроЯ்роЯுро│்ро│родு.

Traditional Computer Keyboard Mouse ↓ CPU ↓ RAM / Storage ↓ Operating System ↓ Applications ↓ Monitor
Embedded System Temperature Sensor ↓ Microcontroller ↓ Driver ↓ Fan
Traditional Computer Embedded System
General-purpose Specific control task
Many tasks possible One main task
User interacts through OS/apps Direct physical control
Example: Laptop Example: Automatic fan

Physical Computing & Development Flow

ЁЯМН 40. Physical Computing ▼

NIE Teacher’s Guide-ро▓் Physical Computing роОрой்ро▒ concept роХுро▒ிрок்рокிроЯрок்рокроЯுроХிро▒родு.

Physical Computing роОрой்ро▒ாро▓்?
Software program рооро▒்ро▒ுроо் physical electronic components роЖроХிропро╡ро▒்ро▒ை роЗрогைрод்родு real-world objects-роР sense рооро▒்ро▒ுроо் control роЪெроп்ро╡родு.

Example

Software Only

Python/Arduino code роороЯ்роЯுроо் computer screen-ро▓் роУроЯுро╡родு: Software.

Physical Computing

Sensor → Program → Motor рооூро▓роо் physical world-роР control роЪெроп்родாро▓்: Physical Computing.

ЁЯза 41. Development System-ро▓் Software роПрой் родேро╡ை? ▼

Board роороЯ்роЯுроо் роЗро░ுрои்родாро▓் роЕродு роироородு application logic-роР родாройாроХ роЕро▒ிропாродு. роЕродро▒்роХு instructions/program роХொроЯுроХ்роХ ро╡ேрог்роЯுроо்.

Board-роХ்роХு: “Temperature 30°C-роХ்роХு рооேро▓் роЪெрой்ро▒ாро▓் fan ON роЪெроп்.” роОрой்ро▒ு program роЪெроп்роп ро╡ேрог்роЯுроо்.
Conclusion:
Hardware + Software
↓
Useful Application
ЁЯЫа️ 42. Program Development Flow ▼

NIE Teacher’s Guide роЗрои்род process-роР flowchart-ро▓் роЖро░роо்рокிрод்родு, source code роЙро░ுро╡ாроХ்роХி, compile роЪெроп்родு, microcontroller-роХ்роХு program роЪெроп்ро╡родாроХ ро╡ро┤ிроХாроЯ்роЯுроХிро▒родு.

рооுро┤ு Flow

Problem ↓ Understand Requirements ↓ Algorithm ↓ Flowchart ↓ Source Code ↓ Compile ↓ Upload / Program Board ↓ Test ↓ Observe Output ↓ Debug / Improve
Exam Keywords:
Problem → Algorithm → Flowchart → Source Code → Compile → Upload → Test → Debug

Full Development Examples

ЁЯТб 43. Example – Automatic Light рооுро┤ு Development Process ▼

Problem

роЗро░ுроЯ்роЯாроХுроо்рокோродு LED ON роЖроХ ро╡ேрог்роЯுроо்.

Input

LDR

Process

Arduino

Output

LED

Algorithm

Read LDR ↓ Compare with threshold ↓ Dark? ├── Yes → LED ON └── No → LED OFF

Implementation

LDR ↓ Analog Input ↓ Arduino ↓ Program ↓ Digital Output ↓ LED
ЁЯМб️ 44. Example – Automatic Fan рооுро┤ு Development Process ▼

Requirement

Temperature > 30°C роОрой்ро▒ாро▓் fan ON.

Input

Temperature sensor

Processor

Microcontroller

Output

Fan through suitable driver/relay

Algorithm

Read temperature ↓ temperature > 30? / \ Yes No ↓ ↓ Fan ON Fan OFF
Fan/Motor-роР роиேро░роЯிропாроХ microcontroller pin-роХ்роХு роЗрогைроХ்роХாрооро▓் driver/relay рокропрой்рокроЯுрод்родுро╡родு рокாродுроХாрок்рокாрой рооுро▒ை.
ЁЯЪи 45. Example – Smart Door ▼

Requirement

Door open роЖройро╡ுроЯрой் LED/Buzzer ON.

Input

Reed switch

Processing

Arduino

Output

LED / Buzzer

System Flow

Door ↓ Reed Switch ↓ Digital Input ↓ Arduino ↓ Decision ↓ LED/Buzzer
Exam Answer Structure:
Input: Reed switch
Processing: Microcontroller/Arduino
Decision: Check door open/close state
Output: LED or Buzzer
ЁЯПЖ Final Exam Memory Map | Sections 26–45 ▼

Door Detection

Reed switch + Magnet → Digital Input → Arduino → LED/Buzzer

Sensor

Physical quantity → Electrical signal. Input device.

Actuator

Control signal → Physical action. Output device.

Analog

Continuous values. Example: Temperature, Light intensity.

Digital

Discrete states. Example: OPEN/CLOSED, HIGH/LOW.

Physical Computing

Software + hardware роЗрогைрои்родு real world-роР control роЪெроп்родро▓்.

Development Flow

Problem → Algorithm → Code → Compile → Upload → Test → Debug

Core Concept

Input → Process → Output / Sensor → Controller → Actuator

ЁЯОУ SRI LANKA ONLINE ICT CLASSES · р╖Б්‍р╢╗ී р╢╜ංр╢Ъා р╢Фр╢▒්р╢╜р╢║ිр╢▒් ICT р╢┤р╢▒්р╢нි · роЗро▓роЩ்роХை роЖрой்ро▓ைрой் ICT ро╡роХுрок்рокுроХро│்

Online ICT Classes in Sri Lanka – O/L, A/L, Cambridge, Edexcel, Python, Web Development & Digital Marketing

Island-wide online classes and home-visit classes in English, Sinhala (р╖Гිංр╖Др╢╜) and Tamil (родрооிро┤்) – for school students, university students, BIT / BSc / IT final-year project students, beginners and business owners.

ЁЯТм WhatsApp Us Now ▶ Watch Free Tutorials

What is ITClassSL? ITClassSL is a Sri Lankan ICT training service offering online and home-visit classes for G.C.E. O/L ICT, G.C.E. A/L ICT, Cambridge IGCSE / A Level, Pearson Edexcel, Python, Java, PHP & MySQL, web design, Microsoft Office, university and BIT final-year project guidance, and digital marketing. Classes run in English, Sinhala and Tamil, as individual or group sessions, anywhere in Sri Lanka. Contact: WhatsApp +94 72 962 2034 · itclasssl@gmail.com.

ЁЯЪА Learn Today. Build Tomorrow.

Looking for ICT classes in Sri Lanka, online ICT tuition, A/L ICT online class, computer classes near me or BIT project help? We provide practical, exam-focused and career-focused IT training with past papers, model papers, step-by-step coding and one-to-one support.

ЁЯТб Our ICT Training & Services in Sri Lanka

ЁЯПл School ICT Classes (Grade 1 – 13)

Online and home-visit ICT lessons for Sri Lankan school students.

  • G.C.E. O/L ICT (р╖Гාр╢╕ාр╢▒්‍р╢║ р╢┤ෙр╖Е ICT / роЪாродாро░рог родро░ ICT)
  • G.C.E. A/L ICT (р╢Лр╖Гр╖Г් р╢┤ෙр╖Е ICT / роЙропро░்родро░ ICT)
  • GIT (General Information Technology)
  • Term test papers, past papers & revision

ЁЯдЦ Programming & AI

Learn to code from zero to project level.

  • Python, C, Java, PHP, JavaScript
  • HTML, CSS, jQuery & AJAX
  • AI & machine-learning basics
  • Problem solving & algorithms

ЁЯОУ University & Final-Year Project Guidance

Technical guidance for BIT, BSc, IT and ICT students.

  • BIT / UCSC / UoM final-year projects
  • PHP & MySQL, Python, Java projects
  • Project ideas, proposal & documentation
  • System design & database design

ЁЯМР Web Design & Development

Websites and database-driven applications for individuals and businesses.

  • Website design & development
  • WordPress & Blogger
  • PHP & MySQL web applications
  • Website SEO & maintenance

ЁЯУв Digital Marketing

Grow your brand online in the Sri Lankan market.

  • Facebook page & Facebook Ads
  • Instagram, Reels, TikTok & YouTube
  • SEO & content creation
  • LinkedIn branding & campaign planning

ЁЯТ╗ Computer & IT Skills

Essential computer skills from beginner to advanced.

  • Computer fundamentals
  • MS Word, Excel & PowerPoint
  • Excel formulas & macros
  • Oracle / MySQL / MS SQL, AWS, Linux

ЁЯЧг️ English · р╖Гිංр╖Др╢╜ · родрооிро┤் – Classes in Your Language

English

Online ICT classes in Sri Lanka, A/L ICT online class, O/L ICT tuition, computer classes, Python classes, web design course, BIT project guidance, digital marketing course Sri Lanka, home visit ICT teacher, Cambridge & Edexcel ICT / Computer Science.

р╖Гිංр╖Др╢╜

р╖Б්‍р╢╗ී р╢╜ංр╢Ъාр╖Аේ р╢Фр╢▒්р╢╜р╢║ිр╢▒් ICT р╢┤р╢▒්р╢нි, р╢Лр╖Гр╖Г් р╢┤ෙр╖Е ICT р╢Фр╢▒්р╢╜р╢║ිр╢▒් р╢┤р╢▒්р╢нි, р╖Гාр╢╕ාр╢▒්‍р╢║ р╢┤ෙр╖Е ICT р╢┤р╢▒්р╢нි, р╢┤р╢╗ිр╢Ьр╢лр╢Ъ р╢┤р╢▒්р╢нි, р╢┤р╢║ිр╢нр╢▒් (Python) р╢┤්‍р╢╗ෝр╢Ь්‍р╢╗ැр╢╕ිр╢▒් р╢┤р╢▒්р╢нි, р╖Аෙр╢╢් р╢Ер╢йр╖Аි р╢▒ිр╢╗්р╢╕ාр╢лр╢║, р╖Аිр╖Б්р╖Ар╖Аිр╢п්‍р╢║ාр╢╜ р╢Ер╖Ар╖Гр╢▒් р╖Ар╖Гр╢╗ р╖А්‍р╢║ාр╢┤ෘр╢нි р╢╕ාр╢╗්р╢Ьෝр╢┤р╢пේр╖Бр╢▒р╢║, р╢йිр╢вිр╢зр╢╜් р╢╕ාр╢Ър╢зිр╢▒් р╢┤ාр╢ир╢╕ාр╢╜ාр╖А, р╢▒ිр╖Ар╖Гр╢з р╢┤ැр╢╕ිр╢л р╢Лр╢Ьр╢▒්р╖Ар╢▒ ICT р╢Ьුр╢╗ුр╖Ар╢╗р╢║ා.

родрооிро┤்

роЗро▓роЩ்роХைропிро▓் роЖрой்ро▓ைрой் ICT ро╡роХுрок்рокுроХро│், роЙропро░்родро░ ICT роЖрой்ро▓ைрой் ро╡роХுрок்рокு, роЪாродாро░рог родро░ ICT ро╡роХுрок்рокு, роХрогிройி ро╡роХுрок்рокுроХро│், рокைродாрой் (Python) роиிро░ро▓ாроХ்роХ ро╡роХுрок்рокு, роЗрогைропродро│ ро╡роЯிро╡рооைрок்рокு, рокро▓்роХро▓ைроХ்роХро┤роХ роЗро▒ுродிропாрог்роЯு родிроЯ்роЯ ро╡ро┤ிроХாроЯ்роЯро▓், роЯிроЬிроЯ்роЯро▓் рооாро░்роХ்роХெроЯ்роЯிроЩ் рокропிро▒்роЪி, ро╡ீроЯ்роЯிро▒்роХு ро╡рои்родு роХро▒்рокிроХ்роХுроо் ICT роЖроЪிро░ிропро░்.

ЁЯУЪ Learn With Your Curriculum

Sri Lankan local syllabus, Pearson Edexcel and Cambridge programmes – ICT and Computer Science.

ЁЯЗ▒ЁЯЗ░ Sri Lankan Local Curriculum

  • Grade 1 – Grade 11 ICT
  • G.C.E. O/L ICT · р╖Гා/р╢┤ෙр╖Е ICT · роЪா/род ICT
  • G.C.E. A/L ICT · р╢Л/р╢┤ෙр╖Е ICT · роЙ/род ICT
  • GIT classes
  • Term test preparation, model papers & notes
  • English / Sinhala / Tamil medium

ЁЯУШ Pearson Edexcel

  • iPrimary Computing
  • iLowerSecondary Computing
  • International GCSE ICT
  • International GCSE Computer Science
  • International A Level IT
  • International A Level Computer Science

ЁЯУЧ Cambridge

  • Cambridge Primary & Lower Secondary Computing
  • Cambridge IGCSE ICT
  • Cambridge IGCSE Computer Science
  • Cambridge O Level Computer Science
  • AS & A Level IT
  • AS & A Level Computer Science

ЁЯТ╗ Programming & Software Development Classes

Python ProgrammingC ProgrammingJava Programming PHPJavaScriptHTML & CSS jQuery & AJAXASP.NETVB.NET VB6MySQLMS SQL Server MS AccessOracle DatabaseDatabase Design SQL QueriesSoftware DevelopmentSoftware Testing

ЁЯОУ BIT, BSc & University Final-Year IT Project Guidance

ЁЯзС‍ЁЯТ╗ Project Development

  • BIT / BSc / IT / ICT projects
  • PHP & MySQL projects
  • Python & Java projects
  • Web application & database projects

ЁЯУД Documentation & Practical

  • Project ideas & proposals
  • System architecture & database design
  • Assignment guidance
  • Technical documentation & viva preparation

ЁЯза AI & Smart Applications

  • AI application concepts
  • Machine-learning modules
  • Automation applications
  • Step-by-step coding support

ЁЯУК Database, Cloud & IT Professional Training

Oracle DatabaseMySQLMicrosoft SQL Server Microsoft AccessAWS CloudLinux UNIXWindows ServerDevOps SREAutomationFreelancing Skills

ЁЯУ▒ Digital Marketing & Social Media Training (р╢йිр╢вිр╢зр╢╜් р╢╕ාр╢Ър╢зිр╢▒් · роЯிроЬிроЯ்роЯро▓் рооாро░்роХ்роХெроЯ்роЯிроЩ்)

Facebook Page SetupFacebook AdsInstagram Marketing Instagram ReelsTikTok MarketingYouTube Channel Setup Social Media ManagementContent CreationSEO LinkedIn BrandingCampaign PlanningHashtag Strategy Insights & Engagement

ЁЯЦе️ Microsoft Office & Digital Skills (р╢┤р╢╗ිр╢Ьр╢лр╢Ъ р╢┤р╢▒්р╢нි · роХрогிройி ро╡роХுрок்рокுроХро│்)

MS WordMS ExcelMS PowerPoint Excel FormulasExcel Macros & AutomationComputer Fundamentals Digital LiteracyMultimedia Presentations

ЁЯзн How to Join – 4 Simple Steps

  1. Message us on WhatsApp – tell us your grade / course, medium (English, Sinhala or Tamil) and your goal.
  2. Choose your format – online class (island-wide), home-visit class, individual or small group.
  3. Get your plan – schedule, syllabus coverage, notes, past papers or project roadmap.
  4. Start learning – live practical sessions with support between classes.

⭐ Why Join Our ICT Classes?

ЁЯМН Online & Home Visit
Study from anywhere in Sri Lanka or at home.
ЁЯСе Individual & Group
One-to-one or small group classes.
ЁЯЧг️ English / р╖Гිංр╖Др╢╜ / родрооிро┤்
Learn in the medium you are comfortable with.
ЁЯУЪ School & University
O/L, A/L, Cambridge, Edexcel, BIT, BSc.
ЁЯУЭ Past & Model Papers
Exam-focused practice and revision.
ЁЯТ╗ Practical Coding
Build real programs, websites and projects.

❓ Frequently Asked Questions – ICT Classes in Sri Lanka

Do you conduct online ICT classes for O/L and A/L students in Sri Lanka?

Yes. We conduct online ICT classes for G.C.E. O/L and A/L students island-wide, and also offer home-visit individual classes. Classes cover the syllabus, past papers, model papers and revision.

Which languages are the classes taught in? (р╖Гිංр╖Др╢╜ / родрооிро┤் / English)

Classes are available in English, Sinhala and Tamil medium. / р╢┤р╢▒්р╢нි р╢Йංр╢Ь්‍р╢╗ීр╖Гි, р╖Гිංр╖Др╢╜ р╖Гр╖Д р╢пෙр╢╕р╖Е р╢╕ාр╢░්‍р╢║р╢║ෙр╢▒් р╢┤р╖Ар╢нී. / ро╡роХுрок்рокுроХро│் роЖроЩ்роХிро▓роо், роЪிроЩ்роХро│роо் рооро▒்ро▒ுроо் родрооிро┤் рооொро┤ிроХро│ிро▓் роироЯைрокெро▒ுроо்.

Do you teach Cambridge and Pearson Edexcel ICT and Computer Science?

Yes. We support Cambridge Primary to A Level and Pearson Edexcel iPrimary to International A Level, including IGCSE ICT, IGCSE Computer Science and O Level Computer Science.

Can you help with BIT, BSc or IT final-year projects?

Yes. We give technical guidance on project ideas, system design, database design, PHP & MySQL, Python and Java development, and documentation for BIT, BSc, IT and ICT students.

Can I learn Python, PHP, web design or digital marketing as a complete beginner?

Yes. Courses start from absolute beginner level and move step by step to practical projects. No previous experience is needed.

What are the class fees and schedules?

Fees and timetables depend on the subject, grade and whether you choose individual or group classes. Message us on WhatsApp (+94 72 962 2034) for current details.

How can I contact ITClassSL?

WhatsApp or call +94 72 962 2034, email itclasssl@gmail.com, or message us on Facebook and the other platforms listed below.

ЁЯУЮ Ready to Start Learning?

Book your online ICT class or ask about programming courses, university project guidance and digital marketing training.

ЁЯУ▒ Call / WhatsApp: +94 72 962 2034

ЁЯУз Email: itclasssl@gmail.com

ЁЯТ╗ Skype: ITClassSL

ЁЯТм Contact Us on WhatsApp

ЁЯМР Our Online Learning Platforms

Tutorials, notes, project guides and learning resources.

ITClassSL — ICT Training | Computer Classes | Programming | University Project Guidance | Digital Marketing

Learn • Practice • Build • Grow ЁЯЪА

Popular searches: online ICT classes Sri Lanka · A/L ICT online class · O/L ICT tuition · Cambridge IGCSE ICT Sri Lanka · Edexcel Computer Science Sri Lanka · BIT final year project help · PHP MySQL project guidance · Python classes Sri Lanka · web design course Sri Lanka · digital marketing course Sri Lanka · home visit ICT teacher
р╖Гිංр╖Др╢╜: р╢Фр╢▒්р╢╜р╢║ිр╢▒් ICT р╢┤р╢▒්р╢нි · р╢Лр╖Гр╖Г් р╢┤ෙр╖Е ICT · р╖Гාр╢╕ාр╢▒්‍р╢║ р╢┤ෙр╖Е ICT · р╢┤р╢╗ිр╢Ьр╢лр╢Ъ р╢┤р╢▒්р╢нි · р╖А්‍р╢║ාр╢┤ෘр╢нි р╢╕ාр╢╗්р╢Ьෝр╢┤р╢пේр╖Бр╢▒р╢║ · р╢йිр╢вිр╢зр╢╜් р╢╕ාр╢Ър╢зිр╢▒්
родрооிро┤்: роЖрой்ро▓ைрой் ICT ро╡роХுрок்рокுроХро│் · роЙропро░்родро░ ICT · роЪாродாро░рог родро░ ICT · роХрогிройி ро╡роХுрок்рокுроХро│் · родிроЯ்роЯ ро╡ро┤ிроХாроЯ்роЯро▓் · роЯிроЬிроЯ்роЯро▓் рооாро░்роХ்роХெроЯ்роЯிроЩ்

Thursday, October 8, 2026

Java Programming Notes - Class 2: Control Flow, Methods & OOP CSC102S3 Course Title: Computer Programming I Online Class English and Tamil Medium

☕ Java Programming – Class 2 Notes

Control Flow • Methods • OOP Fundamentals • Problem Solving Exercises

Selection (if/switch) Loops (for/while) Methods Classes & Objects Mini Project
ЁЯФА Part A – Selection Statements (Making Decisions) ▼

Normally Java runs statements top-to-bottom (sequence). Selection statements change that order by checking a boolean condition (true/false).

A.1 The if Statement

Runs a block only when the condition is true.

int age = 20; if (age >= 18) { System.out.println("You are eligible to vote."); } System.out.println("Program finished.");
⚠️ Common Mistakes:
• if (x = 5) is an error. Use == to compare.
• Never put a semicolon after the condition: if (age >= 18); creates an empty body.

A.2 The if...else Statement

Chooses between two paths. Exactly one block always executes.

if (n % 2 == 0) { System.out.println(n + " is Even"); } else { System.out.println(n + " is Odd"); }

A.3 The else if Ladder

For more than two possibilities. Java checks top-to-bottom and runs the first true branch.

if (marks >= 75) System.out.println("A"); else if (marks >= 65) System.out.println("B"); else if (marks >= 55) System.out.println("C"); else System.out.println("Fail");
ЁЯТб Order matters! Always test the most restrictive condition first. If you wrote marks >= 55 first, a student with 90 marks would incorrectly get "C".

A.4 Nested if

An if inside another if. Used when a second decision depends on the first.

if (age >= 18) { if (hasTestPassed) { System.out.println("Licence issued."); } else { System.out.println("Please pass the driving test first."); } } else { System.out.println("You are too young to apply."); }

A.5 The switch Statement

Cleaner than else if when comparing one variable against exact constant values.

switch (day) { case 1: System.out.println("Monday"); break; case 2: System.out.println("Tuesday"); break; case 3: System.out.println("Wednesday"); break; default: System.out.println("Invalid day"); }
⚠️ Without break, execution "falls through" into the next case. Fall-through can be used intentionally to group cases (e.g., case 6 and case 7 both printing "Weekend").
ЁЯТб Ternary Operator (one-line if/else):
String result = (marks >= 40) ? "Pass" : "Fail";
ЁЯФБ Part B – Repetition (Loops) ▼

Every loop needs three things: (1) Initialisation, (2) Condition, and (3) Update. Forgetting the update causes an infinite loop.

Loop Comparison

LoopCondition CheckedMin RunsBest Used When
forBefore each iteration0Number of repetitions is known
whileBefore each iteration0Repeat until something happens
do...whileAfter each iteration1Must run at least once (menus, validation)

B.1 The for Loop

// Print 1 to 10 for (int i = 1; i <= 10; i++) { System.out.println(i); } // Count down for (int i = 10; i >= 1; i--) { ... } // Step by 2 (even numbers) for (int i = 2; i <= 20; i += 2) { ... }

B.2 The while Loop

int i = 1; while (i <= 5) { System.out.println(i); i++; // Don't forget this! }

B.3 The do...while Loop

do { System.out.print("Enter a positive number: "); number = input.nextInt(); } while (number <= 0); // Note the semicolon!

B.4 Nested Loops

A loop inside another loop. The inner loop completes fully for each outer iteration.

// Triangle pattern for (int i = 1; i <= 5; i++) { for (int j = 1; j <= i; j++) { System.out.print("*"); } System.out.println(); } // Output: * ** *** **** *****

B.5 break vs continue

break

Immediately terminates the entire loop. Control goes to the statement after the loop.

continue

Skips the rest of the current iteration and jumps to the next one. The loop itself continues.

⚠️ Common Loop Mistakes:
• Infinite loop: forgetting i++
• Off-by-one: using < instead of <=
• Semicolon after header: for(...); creates an empty body
✏️ Problem-Solving Exercises (1–10) ▼

Combine selection and repetition. Add import java.util.Scanner; and create Scanner input = new Scanner(System.in); where needed.

Ex 1–3: Numbers, Even, Odd

// Ex 1: Print 1-100 for (int i = 1; i <= 100; i++) System.out.print(i + " "); // Ex 2: Even numbers (efficient - step by 2) for (int i = 2; i <= 100; i += 2) System.out.print(i + " "); // Ex 3: Odd numbers for (int i = 1; i <= 100; i += 2) System.out.print(i + " ");

Ex 4: Multiplication Table

int n = input.nextInt(); for (int i = 1; i <= 10; i++) { System.out.println(n + " x " + i + " = " + (n * i)); }

Ex 5: Sum of Numbers (Accumulator)

int sum = 0; for (int i = 1; i <= n; i++) sum += i; System.out.println("Sum = " + sum);

Ex 6: Factorial

long fact = 1; // Use long! int overflows after 12! for (int i = 2; i <= n; i++) fact *= i; System.out.println(n + "! = " + fact);

Ex 7: Largest of 3 Numbers

int largest = a; // Assume a is largest if (b > largest) largest = b; if (c > largest) largest = c; System.out.println("Largest = " + largest);

Ex 8: Prime Number Check

boolean isPrime = true; if (n <= 1) isPrime = false; else { for (int i = 2; i * i <= n; i++) { if (n % i == 0) { isPrime = false; break; } } }

Ex 9: Reverse a Number

int rev = 0; while (n > 0) { int digit = n % 10; // Get last digit rev = rev * 10 + digit; // Build reversed n = n / 10; // Drop last digit }

Ex 10: Palindrome Check

int original = n; // Keep a copy! // ... reverse logic from Ex 9 ... if (original == rev) System.out.println("Palindrome"); else System.out.println("NOT a Palindrome");
⚙️ Part C – Methods (Reusable Code Blocks) ▼

Methods let you reuse code, break problems into parts, and make programs easier to read and test.

Method Anatomy

public static int add(int a, int b) { return a + b; }
PartExampleMeaning
Access modifierpublicWho can call it
staticstaticBelongs to class (callable from main)
Return typeintType of value returned (void = nothing)
NameaddcamelCase verb
Parametersint a, int bInputs (type + name)
Body{ return a+b; }The code that runs

Key Concepts

Parameters vs Arguments

Parameters are in the definition. Arguments are actual values passed in the call.

Pass by Value

Java passes a copy. Changing a parameter inside a method does NOT change the original variable.

void Methods

Return nothing. Just perform an action. Cannot be assigned to a variable.

Local Variables

Declared inside a method. Exist only during that method's execution. Not visible outside.

Overloading

Same name, different parameters. Java picks the right one based on arguments.

Calling Methods

Methods can call other methods. E.g., sumOfSquares() calls square() twice.

⚠️ A non-void method MUST return a value on every path. Missing return = compile error.
ЁЯПЧ️ Part D – OOP Fundamentals (Classes & Objects) ▼

OOP organises programs around objects that combine data (fields) and behaviour (methods).

ЁЯТб Analogy: A class is like an architect's blueprint. An object is an actual house built from that blueprint. One blueprint → many houses.

D.1 Class Definition

class Student { String name; // Field (instance variable) int age; // Field }

D.2 Creating Objects

Student s1 = new Student(); s1.name = "Kamal"; s1.age = 20; Student s2 = new Student(); // Independent object s2.name = "Nimali";

D.3 Constructors

Special method that runs automatically when new is used. Same name as class, no return type.

Student(String name, int age) { this.name = name; // 'this' refers to the field this.age = age; // Without 'this', parameter assigns to itself! }
⚠️ name = name; assigns the parameter to itself (field stays null). Always use this.name = name;

D.4 Instance vs Static Variables

Instance VariableStatic (Class) Variable
Declared without staticDeclared with static
Separate copy per objectONE copy shared by all objects
Accessed via object: s1.nameAccessed via class: Student.count
For object data (name, age)For shared data (counters, constants)

D.5 State & Behaviour

State (Fields)

The data stored: name="Kamal", age=20

Behaviour (Methods)

What it can do: display(), isAdult(), birthday()

Calling a method can change the object's state: s1.birthday() increases age.

ЁЯОУ Mini Project – Student Management v1 ▼

A complete example combining classes, constructors, methods, and static variables.

Student.java

public class Student { String name; int age; double marks; static int count = 0; // Shared counter Student(String name, int age, double marks) { this.name = name; this.age = age; this.marks = marks; count++; } String getGrade() { if (marks >= 75) return "A"; else if (marks >= 65) return "B"; else if (marks >= 55) return "C"; else return "Fail"; } void display() { System.out.println("Name : " + name); System.out.println("Age : " + age); System.out.println("Marks: " + marks); System.out.println("Grade: " + getGrade()); System.out.println("-------------------"); } }

Main.java

public class Main { public static void main(String[] args) { Student s1 = new Student("Kamal", 20, 78.5); Student s2 = new Student("Nimali", 19, 66); Student s3 = new Student("Sunil", 21, 48); s1.display(); s2.display(); s3.display(); System.out.println("Total students: " + Student.count); } }

Expected Output

Name : Kamal Age : 20 Marks: 78.5 Grade: A ------------------- Name : Nimali Age : 19 Marks: 66.0 Grade: B ------------------- Name : Sunil Age : 21 Marks: 48.0 Grade: Fail ------------------- Total students: 3
ЁЯТб Extension Ideas: Add isAdult(), birthday(), isPass() methods. Add keyboard input with Scanner + loop. Add a second constructor.
ЁЯУЛ Quick Revision Summary & Practice Questions ▼

Key Takeaways

  • if, else if, switch make decisions. switch needs break.
  • for = known count. while = unknown (may run 0×). do...while = at least once.
  • break exits loop. continue skips to next iteration.
  • Method = return type + name + parameters + body. void returns nothing.
  • Class = blueprint. Object = instance created with new.
  • this = current object. Instance vars = per object. Static vars = shared.

Practice Questions

  1. Read marks and print grade using if...else if AND using switch(marks/10).
  2. Print pattern with nested loops: row 1=1, row 2=1 2, row 3=1 2 3, up to row 5.
  3. What is the difference between while and do...while? Give a case where do...while is better.
  4. Write static double average(int a, int b, int c) and call it from main.
  5. Output of: for(int i=1; i<=5; i++){ if(i==3) continue; System.out.print(i); }?
  6. Create class Book with title, price, constructor, and display(). Create 3 books.
  7. Explain instance vs static variable with an example.
  8. Why does name = name; in a constructor fail? How do you fix it?
ЁЯОУ SRI LANKA ONLINE ICT TRAINING

Expert ICT, Computer Science, Coding & Digital Marketing Classes

Learn ICT, Computer Science, Programming, Web Development and Digital Marketing with practical, career-focused guidance.

ЁЯТм Join WhatsApp ▶ Watch Tutorials

ЁЯЪА Learn Today. Build Tomorrow.

Welcome to our Sri Lanka Online ICT & Computer Classes community! We provide Online Tuition Classes, Home Visit Classes and Individual / Group Classes for students and professionals. Whether you are a school student, university student, beginner programmer or entrepreneur, we help you develop practical IT skills for education and career growth.

ЁЯТб Explore Our Training & Services

ЁЯОУ University Project Guidance

Technical guidance for university assignments and final-year IT projects.

  • BIT / BSc / IT / ICT Projects
  • Final Year Project Guidance
  • PHP & MySQL Projects
  • Python & Java Projects
  • Database & Web Applications
  • Project Ideas & Documentation

ЁЯдЦ AI, Coding & Software

Develop programming knowledge and practical software development skills.

  • Python Programming
  • C & Java Programming
  • PHP & JavaScript
  • HTML & CSS
  • jQuery & AJAX
  • AI & Smart Applications

ЁЯПл School ICT Classes

Interactive ICT and Computer Science lessons for school students.

  • Grade 1 – Grade 11
  • G.C.E. O/L ICT
  • G.C.E. A/L ICT
  • GIT Classes
  • School ICT & Internal Tests
  • Past Papers & Revision

ЁЯМР Web Design & Development

Build websites and database-driven applications for individuals and businesses.

  • Website Design
  • Website Development
  • WordPress Development
  • PHP & MySQL
  • HTML / CSS / JavaScript
  • Website SEO & Maintenance

ЁЯУв Digital Marketing

Grow your brand online with social media and digital marketing support.

  • Digital Marketing
  • Facebook Page Management
  • Instagram Marketing
  • TikTok & YouTube
  • Content Creation & SEO
  • Facebook Ads & Reels

ЁЯТ╗ Computer & IT Skills

Build essential computer skills from absolute beginner to advanced level.

  • Computer Fundamentals
  • MS Word, Excel & PowerPoint
  • Excel Formulas & Macros
  • Oracle / MySQL / MS SQL
  • AWS, Linux & DevOps
  • Freelancing & IT Skills

ЁЯУЪ Learn With Your Curriculum

Support for Sri Lankan Local Curriculum, Cambridge and Pearson Edexcel programs.

ЁЯЗ▒ЁЯЗ░ Sri Lankan Local Curriculum

  • Grade 01 – Grade 11 ICT
  • G.C.E. O/L ICT
  • G.C.E. A/L ICT
  • GIT Classes
  • Term Test Preparation
  • Model Papers & Notes
  • English / Sinhala / Tamil Medium

ЁЯУШ Pearson Edexcel

  • iPrimary Computing
  • iLowerSecondary Computing
  • International GCSE ICT
  • International GCSE Computer Science
  • GCSE Computer Science
  • International A Level IT
  • International A Level Computer Science

ЁЯУЧ Cambridge Curriculum

  • Cambridge Primary Computing
  • Cambridge Lower Secondary Computing
  • Cambridge IGCSE ICT
  • Cambridge IGCSE Computer Science
  • Cambridge O Level Computer Science
  • AS & A Level IT
  • AS & A Level Computer Science

ЁЯТ╗ Programming & Software Development

ЁЯЫа️ Programming Languages & Technologies

✅ Python Programming ✅ C Programming ✅ Java Programming
✅ PHP Programming ✅ JavaScript ✅ HTML & CSS
✅ jQuery & AJAX ✅ ASP.NET ✅ VB.NET
✅ VB6 ✅ MySQL ✅ MS SQL Server
✅ MS Access ✅ Oracle Database ✅ Database Design
✅ SQL Queries ✅ Database Programming ✅ Software Development

ЁЯМР Web Design & Development

  • ✅ Website Design
  • ✅ Website Development
  • ✅ WordPress Website Development
  • ✅ HTML / CSS / JavaScript
  • ✅ PHP & MySQL
  • ✅ WordPress SEO
  • ✅ Website Maintenance
  • ✅ Web Applications
  • ✅ Database-Driven Websites

ЁЯОУ University & Final Year IT Projects

ЁЯзС‍ЁЯТ╗ Project Development

  • BIT / BSc / IT / ICT Projects
  • PHP & MySQL Projects
  • Python Projects
  • Java Projects
  • Web Application Projects
  • Database Projects

ЁЯУД Documentation & Practical

  • Project Ideas
  • System Architecture
  • Database Design
  • Assignments Guidance
  • Practical Implementation
  • Technical Documentation

ЁЯза AI & Smart Applications

  • AI Application Concepts
  • Machine Learning Modules
  • Automation Applications
  • Step-by-Step Coding
  • System Implementation
  • Project Learning Support

ЁЯУК Database, Cloud & IT Training

✅ Oracle Database ✅ MySQL ✅ Microsoft SQL Server
✅ Microsoft Access ✅ Database Design ✅ SQL Queries
✅ AWS Cloud ✅ Linux ✅ UNIX
✅ Windows Server ✅ DevOps ✅ SRE
✅ Automation ✅ Software Testing ✅ Freelancing Skills

ЁЯУ▒ Digital Marketing & Social Media

✅ Digital Marketing ✅ Facebook Page Setup & Management
✅ Instagram Marketing ✅ TikTok Marketing
✅ YouTube Channel Setup ✅ Social Media Management
✅ Content Creation ✅ SEO
✅ Facebook Ads ✅ Instagram Reels
✅ LinkedIn Branding ✅ Social Media Campaign Planning
✅ Hashtag Strategy ✅ Insights & Engagement

ЁЯЦе️ Microsoft Office & Digital Skills

  • ✅ MS Word
  • ✅ MS Excel
  • ✅ MS PowerPoint
  • ✅ Excel Formulas
  • ✅ Excel Automation & Macros
  • ✅ Computer Fundamentals
  • ✅ Digital Literacy
  • ✅ Multimedia Presentations

⭐ Why Join Our Classes?

ЁЯМН
Online & Home Visit Classes
ЁЯСе
Individual & Group Classes
ЁЯЧг️
English / Sinhala / Tamil
ЁЯУЪ
School & University Support
ЁЯУЭ
Past Papers & Model Papers
ЁЯТ╗
Practical Programming
ЁЯЪА
Beginner to Advanced Skills
ЁЯОп
Career-Focused Learning

ЁЯУЮ Ready to Start Learning?

Book your online class or contact us for ICT training, programming courses, university project guidance and digital marketing services.

ЁЯУ▒ Call / WhatsApp: +94 729622034

ЁЯУз Email: itclasssl@gmail.com

ЁЯТ╗ Skype: ITClassSL

ЁЯТм Contact Us on WhatsApp

ЁЯМР Our Online Learning Platforms

Explore tutorials, notes, project guides and learning resources.

ЁЯУ║ YouTube Tutorials
Watch ICT & programming videos
ЁЯТм WhatsApp Community
Join our learning community
✍️ ICT Blog
Computer classes and tutorials
ЁЯУ░ WordPress
Notes and learning resources
ЁЯУШ Facebook
Follow our official page
ЁЯМР Wix Website
Explore our training services
ЁЯТ╗ eTeacher Website
Online learning platform
ЁЯУЭ Medium
Read technology articles
❓ Quora
Project guidance and Q&A
ЁЯОУ Strikingly Portfolio
University project resources
ЁЯЧг️ ElaKiri Forum
Join the project discussion
ЁЯО╡ TikTok
Follow our learning videos
ЁЯЫТ Payhip
Explore our digital resources
ЁЯМР Weebly
Project and IT resources

ITClassSL — ICT Training | Computer Classes | Programming | University Project Guidance | Digital Marketing

Learn • Practice • Build • Grow ЁЯЪА