GRADE 10 ICS • COMPUTER SCIENCE
Chapter 2: Introduction to Programming
1. Fundamental Concepts
Computer
A computer is an electronic machine that processes raw data into meaningful information according to a
set of instructions given to it.
Computer Program
A computer program is a proper, ordered set of instructions given to a computer to solve a specific
problem or perform a designated task.
Programming Language
A programming language serves as the medium of communication between the computer hardware and the
programmer/user.
"The way of communication between a computer and a user is called a Programming Language (P.L.).
Alternatively, the systematic process of writing a sequence of instructions to solve a distinct problem is
referred to as Programming."
Modern computing utilizes various programming languages tailored for different applications, including:
• C / C++ (System software, game development)
• C# / .NET (Enterprise applications, Windows platforms)
• Java / JavaScript (Web systems, cross-platform apps, mobile applications)
Each language operates under its own distinct features, keywords, structural designs, and strict grammatical
laws.
Syntax & Semantics
Syntax of a Program
Syntax refers to the strict set of grammatical rules that define the structural combinations of symbols,
punctuation, and words in a programming language.
Grade 10 ICS • Computer Science Notes Page 1 of 5
Just like natural languages rely on grammar, a program cannot compile or execute if its syntax rules are
violated.
Examples of Syntax across Languages:
In C++ Language:
cout << "Welcome to P. Academy";
In C Language:
printf("Welcome to P. Academy");
Program Semantics
Semantics defines the actual meaning, logic, and operational behavior of statements within a program. It
outlines the exact execution sequence the processor follows when running that statement.
Semantic Execution Example:
Avg = Sum / TotalNo;
Semantic Meaning: The computer divides the numerical value stored in the variable Sum by the value in
TotalNo, evaluates the mathematical result, and assigns that finalized value to the variable Avg.
2. Categories of Programming Languages
Programming languages are broadly categorized into three core tiers based on their abstraction level from the
computer hardware:
Low-Level Languages Middle-Level Languages High-Level Languages
A. Low-Level Languages
Low-level languages are closely aligned with computer architecture. They are written with little or no
abstraction from the internal hardware components. Writing software in low-level languages mandates a deep,
comprehensive knowledge of internal computer hardware registry, memory layout, and architecture.
Low-level languages are divided into two main generations:
1. Machine Language
• Instructions are provided directly in structural binary format using native 0s and 1s.
• It is widely considered the computer's native/own language.
Grade 10 ICS • Computer Science Notes Page 2 of 5
• It is directly executed by the central processing unit (CPU) with no requirement for an intermediary
converter or translator .
• Characteristics: Highly efficient and fast for execution by the computer, but incredibly difficult for human
programmers to read, write, memorize, or troubleshoot.
2. Assembly Language
• Known as a 1st/2nd Generation Language, it acts as a step above pure binary machine code.
• Instead of obscure binary patterns, it introduces abbreviations and symbolic alphanumeric codes called
Mnemonics.
• Examples of Mnemonics: ADD (Addition), MOV (Move data), SUB (Subtraction).
• Commonly referred to as a Symbolic Language.
• Code written in assembly is significantly easier to draft and alter than machine language, but it cannot run
directly on the CPU. It mandates an explicit system utility translator called an Assembler to convert the
source code to machine code.
Language Translation Flow:
Source Code Translator Machine Code
→ →
(Assembly) (Assembler) (Binary 0/1)
3. High-Level Languages
Definition: High-Level Languages (HLL) rely on structured formats using English-like words, familiar
mathematical notations, and plain statements. This design lets developers focus entirely on standard problem-
solving logic rather than specific hardware details.
Key System Features:
• Utilizes conventional alphabetic words and standard math symbols rather than binary blocks or
architecture-tied mnemonics.
• Requires a dedicated translator program—such as a Compiler or Interpreter—to change human-readable
code into computer-executable instructions. Each distinct high-level language comes bundled with its
specific translation tool framework.
Classifications of High-Level Languages
1. Procedural Languages
• Also widely classified as 3rd Generation Languages (3GL).
• Programs are systematically organized into structural, self-contained sub-routines called procedures or
modules.
Grade 10 ICS • Computer Science Notes Page 3 of 5
• Procedure Definition: A named block of code containing a fixed sequence of operational steps. It is
declared once in a program and can be reused infinitely from any point by calling its unique reference
name.
• Historical Examples: FORTRAN, Pascal, BASIC, Standard C.
2. Structured Languages
• A structural variation where massive applications are parsed down into modular independent blocks.
• It operates under a strict Top-Down Design approach, organizing execution flow cleanly from top to
bottom.
• Examples: ALGOL, Pascal, PL/1, ADA.
3. Object-Oriented Programming Languages (OOPs)
• A modern paradigm where software architectures are engineered using standalone units called Objects.
• An Object wraps data properties and interactive behaviors (methods) tightly into a unified package.
• Encourages extreme code reusability—once an object profile is defined, it can be instantiated across
multiple systems.
• Popular OOP Languages: C++, Java, Python, C#.
4. Core Characteristics of OOPs
• Simplified Learning Curve: Relies on readable structures modeled around everyday English expressions.
• Maintainability: Codebases can be updated or debugged efficiently without compromising outer systems.
• Error Isolation: During translation and compilation runs, logical and syntactical bugs are pointed out
directly for fast corrections.
• Rich Feature Libraries: Pre-packaged system resource blocks let developers pull ready-made code tools
without building them from scratch.
• Platform Independence: Code written on one computer type can often execute flawlessly on completely
different physical hardware architecture without rewriting the program.
5. Profiles of Essential Modern Languages
The C Language
• Developed in 1972 by Dennis Ritchie at AT&T Bell Laboratories, USA.
• A foundational general-purpose, structural language.
• While procedural, it offers flexible memory-level control. This makes it highly portable across completely
different system landscapes.
• The iconic UNIX Operating System was almost entirely constructed using the C language.
Grade 10 ICS • Computer Science Notes Page 4 of 5
C++ Language
• Developed in the early 1980s by Bjarne Stroustrup.
• An evolutionary extension of C that incorporates full Object-Oriented elements like Objects, Classes, and
Event-driven actions.
• Extensively deployed to write heavy system utilities, complex web compilers, large databases, word
processors, and spreadsheet applications.
Visual Programming Languages
• Engineered specifically to build rich Graphical User Interfaces (GUI) and Windows-based applications.
• Often aligned with 5th Generation Languages (5GL), providing intuitive visual workspaces to drag and
drop application windows, text boxes, and buttons.
• Examples: Visual Basic (VB), Visual C++.
C# (C-Sharp) Language
• Created by Microsoft Corporation in the year 2000.
• A modern, secure Object-Oriented platform built on C++ frameworks but drawing advanced features
directly from Java and Visual Basic.
• Extensively used to develop web micro-services, video games, cross-platform enterprise tools, and native
operating systems.
Java Language
• A robust, pure Object-Oriented ecosystem built by Sun Microsystems in 1991.
• While syntactically close to C++, Java is strictly designed for distributed network computing environments.
• Java Applets: Small, cross-platform embedded programs that execute dynamically inside host
applications like web browsers.
Common Practical Implementations of Java Applets:
• Embedding reactive controls inside dynamic Web Pages.
• Rendering real-time browser-based animations.
• Automating fluid image rotation controls.
• Handling secure, instant database access over the internet.
Grade 10 ICS • Computer Science Notes Page 5 of 5