NEB CLASS 12 COMPUTER SCIENCE
Complete Answer Guide — All 53 Questions
Prepared for Maximum Marks (45/50)
UNIT 1: DATABASE MANAGEMENT SYSTEM (DBMS)
Additional: What is a Database? What is DBMS and its advantages over File
System?
A database is an organized collection of related data stored in a structured way so that it can be easily
accessed, managed, and updated. For example, a school database stores student names, roll numbers,
marks, and addresses in an organized manner.
Database Management System (DBMS)
A Database Management System (DBMS) is software that is used to create, manage, and manipulate
databases. It acts as an interface between the user and the database. Examples: MySQL, Oracle, MS
Access.
Advantages of DBMS over File System
File System DBMS
Data is stored in separate files with no Data is stored centrally and managed by
central control DBMS software
Data redundancy (same data stored in Data redundancy is minimized using
many files) normalization
Data inconsistency is common Data consistency is maintained
No data sharing between programs Multiple users can share data
simultaneously
No data security features DBMS provides user authentication and
access control
Difficult to recover data after crash DBMS supports backup and recovery
mechanisms
No support for queries DBMS supports powerful query
languages like SQL
Q1. Differences between DDL and DML with Examples
SQL commands are divided into different categories. Two important categories are DDL and DML.
DDL – Data Definition Language
DDL is used to define, create, modify, and delete the structure (schema) of database objects like tables,
views, and indexes. DDL commands change the structure of the database, not the data inside it.
Examples of DDL commands:
• CREATE – Creates a new table or database
CREATE TABLE Student (id INT, name VARCHAR(50), marks INT);
• ALTER – Modifies an existing table structure
ALTER TABLE Student ADD COLUMN email VARCHAR(100);
• DROP – Deletes a table or database completely
DROP TABLE Student;
• TRUNCATE – Removes all data from a table but keeps the structure
TRUNCATE TABLE Student;
DML – Data Manipulation Language
DML is used to insert, update, delete, and retrieve data stored inside database tables. DML commands
work on the data (records) inside a table.
Examples of DML commands:
• INSERT – Adds new records into a table
INSERT INTO Student VALUES (1, 'Ram', 85);
• UPDATE – Modifies existing records
UPDATE Student SET marks = 90 WHERE id = 1;
• DELETE – Removes specific records
DELETE FROM Student WHERE id = 1;
• SELECT – Retrieves data from a table
SELECT * FROM Student;
Differences between DDL and DML
DDL (Data Definition Language) DML (Data Manipulation Language)
Deals with structure/schema of database Deals with data stored inside the
database
Changes cannot be easily rolled back Changes can be rolled back using
ROLLBACK
Commands: CREATE, ALTER, DROP, Commands: INSERT, UPDATE,
TRUNCATE DELETE, SELECT
Affects the metadata of the database Affects the actual data/records
Used by database administrators Used by programmers and end users
Q2. What is Normalization? Explain types with examples (2NF and 3NF).
Normalization is the process of organizing a database to reduce data redundancy (duplication) and
improve data integrity. It involves dividing large tables into smaller related tables and defining
relationships between them.
The main goals of normalization are:
• Eliminate redundant (duplicate) data
• Ensure data dependencies make sense (data is stored logically)
• Reduce chances of data anomalies (insert, update, delete anomalies)
Types of Normal Forms
1NF – First Normal Form
A table is in 1NF if:
• All columns contain atomic (indivisible) values
• Each column contains values of a single type
• Each row is unique (has a primary key)
Example: A table with a 'Phone' column containing multiple phone numbers like '9812345678,
9801234567' violates 1NF. We must store each phone in a separate row.
2NF – Second Normal Form (IMPORTANT)
A table is in 2NF if:
• It is already in 1NF
• There is no Partial Dependency — every non-key column must depend on the WHOLE primary
key, not just part of it
Example (Before 2NF):
StudentID CourseID StudentName CourseName Marks
101 C01 Ram Computer 85
101 C02 Ram Math 78
102 C01 Sita Computer 90
Here, the primary key is (StudentID + CourseID). But StudentName depends only on StudentID, and
CourseName depends only on CourseID — these are partial dependencies.
After applying 2NF, we split into three tables:
• Student Table: StudentID, StudentName
• Course Table: CourseID, CourseName
• Enrollment Table: StudentID, CourseID, Marks
3NF – Third Normal Form (IMPORTANT)
A table is in 3NF if:
• It is already in 2NF
• There is no Transitive Dependency — non-key columns must NOT depend on other non-key
columns
Example (Before 3NF):
StudentID StudentName ZipCode City
101 Ram 44600 Kathmandu
102 Sita 44700 Pokhara
Here, City depends on ZipCode (not on StudentID directly). This is a transitive dependency.
After applying 3NF, we split into:
• Student Table: StudentID, StudentName, ZipCode
• Location Table: ZipCode, City
BCNF – Boyce-Codd Normal Form
BCNF is a stronger version of 3NF. A table is in BCNF if for every functional dependency X → Y, X must
be a super key. This eliminates all remaining anomalies that 3NF might miss.
Q3. (Old is Gold – Previous Year Question 4)
This refers to the database model question (see Q4 below for the complete answer).
Q4. What is a Database Model? List and explain types.
A Database Model is a conceptual framework that determines how data is organized, stored, and related
in a database. It defines the logical structure of the database — how data is connected and how it can
be accessed.
Types of Database Models
1. Hierarchical Database Model
Data is organized in a tree-like structure where each record (parent) has one or more child records, but
each child has only one parent. It looks like an organizational chart.
• Example: IBM's IMS (Information Management System)
• Advantage: Fast data retrieval if the hierarchy is known
• Disadvantage: Rigid structure; complex many-to-many relationships are difficult
2. Network Database Model
Similar to hierarchical model but more flexible. A child record can have multiple parent records, forming
a graph-like structure (many-to-many relationships allowed).
• Example: CODASYL databases
• Advantage: Can represent complex relationships
• Disadvantage: Complex to design and maintain
3. Relational Database Model
The most widely used model. Data is stored in tables (called relations) made up of rows (records/tuples)
and columns (attributes). Tables are related using keys (primary key and foreign key).
• Example: MySQL, Oracle, MS SQL Server, PostgreSQL
• Advantage: Easy to use, supports SQL, flexible
• Disadvantage: Can be slow for very large, complex datasets
4. Object-Oriented Database Model
Data is stored as objects, similar to object-oriented programming. Each object has attributes (data) and
methods (functions). Useful when data is complex (like images, videos).
• Example: db4o, ObjectDB
• Advantage: Handles complex data types well
• Disadvantage: Not as widely used; complex implementation
5. Entity-Relationship (ER) Model
A conceptual model used during database design. It represents real-world data as entities (objects), their
attributes (properties), and relationships between them. It is used to create ER diagrams before building
actual databases.
Q5. Differences between Centralized and Distributed Database Models
Understanding how databases are physically distributed is important in modern computing.
Centralized Database
All data is stored and managed at a single location (one central computer/server). All users access the
database from this central location.
Distributed Database
Data is distributed across multiple computers/locations connected by a network. Each location can have
a portion of the database, and together they form one logical database.
Basis Centralized Database Distributed Database
Data Storage All data at one location Data spread across
multiple locations
Cost Lower setup cost Higher setup cost
Performance Can be slow for distant users Faster for local users
Reliability Single point of failure More reliable; if one fails,
others work
Security Easier to secure one location More complex security
management
Scalability Limited scalability Easily scalable
Maintenance Easier to maintain More complex
maintenance
Example School database on one ATM banking network
server nationwide
Q6. Importance, Advantages, and Disadvantages of a Database
Importance of Database
Databases are the backbone of modern information systems. They are used everywhere — from banks
and hospitals to schools and e-commerce.
• Stores large amounts of data in an organized way
• Enables quick retrieval of specific information
• Supports multiple users accessing data simultaneously
• Ensures data consistency and accuracy
• Provides security by restricting unauthorized access
Advantages of Database
• Reduced Data Redundancy: Same data is not stored multiple times, saving storage space
• Data Consistency: Since data is stored only once, updates are reflected everywhere
• Data Sharing: Multiple users and applications can access the same database
• Data Security: DBMS provides login, password, and access permission controls
• Data Integrity: Constraints and rules ensure accuracy of data
• Backup and Recovery: DBMS automatically provides backup and can restore lost data
• Easy Query: SQL makes it easy to search, filter, and retrieve specific data
Disadvantages of Database
• High Cost: DBMS software and hardware can be expensive
• Complexity: Designing and managing databases requires trained professionals
• Large Size: DBMS software itself requires significant storage
• Vulnerability: Since all data is centralized, a failure or attack can be critical
• Performance Overhead: DBMS adds processing overhead compared to simple file access
Q7. Importance of Database Security in DBMS
Database security refers to the measures taken to protect a database from unauthorized access, misuse,
theft, or corruption. It is one of the most critical aspects of database management.
Why is Database Security Important?
• Protects sensitive information such as financial data, personal records, medical history
• Prevents unauthorized users from accessing or modifying data
• Ensures compliance with legal regulations (e.g., data protection laws)
• Maintains trust of customers and users
• Prevents financial loss from data breaches
Threats to Database Security
• SQL Injection: Malicious SQL code entered into input fields to manipulate the database
• Unauthorized Access: Users accessing data without proper permission
• Data Theft: Sensitive data being stolen and sold
• Malware: Viruses and ransomware targeting databases
• Insider Threats: Employees misusing their database access
Security Measures
• Authentication: Requiring username and password to access the database
• Authorization: Granting users only the access they need (role-based access control)
• Encryption: Encrypting stored data so it is unreadable without a key
• Backup: Regular backups to recover data after attacks or failures
• Audit Trail: Logging all database access and modifications
• Firewalls: Blocking unauthorized network access to the database server
Q8. Roles of a Database Administrator (DBA)
A Database Administrator (DBA) is a person responsible for installing, configuring, designing, managing,
and maintaining a database system. The DBA is the key person in any organization that uses a database.
Main Roles and Responsibilities of a DBA
1. Database Design and Creation: The DBA designs the database structure — creates tables,
defines relationships, and sets up the schema according to the organization's needs.
2. Installation and Configuration: Installs the DBMS software (like MySQL or Oracle) and configures
it properly for optimal performance.
3. Data Security Management: Sets up user accounts, passwords, and access permissions. Ensures
only authorized users can access specific data.
4. Backup and Recovery: Creates regular backups of the database and has a recovery plan ready in
case of data loss or system failure.
5. Performance Monitoring and Tuning: Monitors database performance, identifies bottlenecks (slow
queries), and optimizes them for speed and efficiency.
6. Data Integrity Control: Ensures that data entered into the database is accurate, consistent, and
follows all defined rules and constraints.
7. User Management: Creates and manages database user accounts, assigns roles, and grants or
revokes permissions.
8. Database Maintenance: Performs regular maintenance tasks like updating statistics, rebuilding
indexes, and managing storage space.
9. Documentation: Maintains proper documentation of the database structure, procedures, and
policies.
10. Troubleshooting: Identifies and resolves database errors and problems quickly.
Q9. Explain Entity, Attribute, and Relationship in Relational Database Model
Entity
An entity is any real-world object or thing that has existence and about which we store data in a database.
Entities can be physical things (like a person, car, product) or conceptual things (like a course, account).
Example: In a school database, STUDENT, TEACHER, and COURSE are entities.
• Entity Type: The general category (e.g., STUDENT)
• Entity Instance: A specific example (e.g., Ram Shrestha with ID 101)
Attribute
An attribute is a property or characteristic that describes an entity. It stores specific information about an
entity.
Example: The STUDENT entity has attributes: StudentID, Name, Age, Address, Marks.
Types of Attributes:
• Simple Attribute: Cannot be divided further (e.g., Age, Marks)
• Composite Attribute: Can be divided into smaller parts (e.g., Name → First Name + Last Name)
• Key Attribute: Uniquely identifies each entity (e.g., StudentID)
• Multi-valued Attribute: Can have multiple values (e.g., Phone Numbers)
• Derived Attribute: Calculated from other attributes (e.g., Age derived from Date of Birth)
Relationship
A relationship describes how two or more entities are connected or associated with each other.
Example: A STUDENT 'enrolls in' a COURSE — 'enrolls in' is the relationship.
Types of Relationships (Cardinality):
• One-to-One (1:1): One entity in A is related to exactly one entity in B. Example: One person has
one passport.
• One-to-Many (1:N): One entity in A is related to many entities in B. Example: One teacher teaches
many students.
• Many-to-Many (M:N): Many entities in A are related to many entities in B. Example: Students
enroll in many courses; courses have many students.
Q10. Explain E-R Diagram in DBMS
An Entity-Relationship (ER) Diagram is a graphical representation of the entities, their attributes, and the
relationships between them in a database. It is used as a visual blueprint for designing a database before
actual implementation.
ER Diagram Symbols
Symbol Shape Represents
Rectangle □ Rectangle Entity (e.g., STUDENT, COURSE)
Ellipse/Oval ○ Oval Attribute (e.g., Name, Age)
Diamond ◇ Diamond Relationship (e.g., Enrolls in)
Double Oval ⊙ Double Oval Multi-valued attribute (e.g., Phone
numbers)
Dashed Oval -- Oval Derived attribute (e.g., Age from DOB)
Double Rectangle □□ Double Rectangle Weak entity (depends on another
entity)
Line ──── Connects entity to attribute or
relationship
Example ER Diagram (School Database)
Entities: STUDENT and COURSE
STUDENT attributes: StudentID (key), Name, Age, Address
COURSE attributes: CourseID (key), CourseName, Credits
Relationship: STUDENT 'ENROLLS IN' COURSE (Many-to-Many)
Relationship attribute: Marks (the marks a student gets in a specific course)
Importance of ER Diagram
• Provides a clear visual design before database creation
• Helps communication between designers and clients
• Identifies data requirements early
• Reduces errors in actual database implementation
Q11. What is Data Integrity and its Importance? Explain types.
Data Integrity refers to the accuracy, consistency, and reliability of data stored in a database throughout
its entire lifecycle. It ensures that data remains correct and unchanged unless updated by authorized
users.
Importance of Data Integrity
• Ensures that decisions made based on the data are correct
• Prevents data corruption due to errors, software bugs, or unauthorized changes
• Maintains trust in the database system
• Complies with legal and regulatory requirements
• Prevents financial losses due to incorrect data
Types of Data Integrity
1. Entity Integrity
Ensures that every table has a primary key and that the primary key values are unique and NOT NULL.
No two rows can have the same primary key value.
Example: In a STUDENT table, StudentID must be unique for every student and cannot be empty.
2. Referential Integrity
Ensures that foreign key values in one table must match a primary key value in the referenced table, or
be NULL. It maintains consistency between related tables.
Example: In an ENROLLMENT table, the CourseID must exist in the COURSE table — you cannot enroll
a student in a non-existent course.
3. Domain Integrity
Ensures that all values in a column fall within the defined domain (range or set of valid values). This
includes data type, format, and allowed values.
Example: A 'Marks' column should only accept integer values between 0 and 100.
4. User-Defined Integrity
These are custom rules defined by the user that the data must follow, specific to the business
requirements.
Example: A rule that says 'Salary must be greater than minimum wage' is user-defined integrity.
UNIT 2: DATA COMMUNICATION AND NETWORKING
Q12. Describe Class C IP Address with an Example
An IP (Internet Protocol) address is a unique numerical address assigned to every device connected to
a network. IPv4 addresses are 32-bit numbers written as four sets of numbers separated by dots (e.g.,
[Link]).
IP Address Classes
Class Range Default Max Max Use
Subnet Mask Networks Hosts/Network
A [Link] – [Link] 126 16,777,214 Large organizations
[Link]
B [Link] – [Link] 16,384 65,534 Medium organizations
[Link]
C [Link] – [Link] 2,097,152 254 Small networks
[Link]
D [Link] – – – – Multicasting
[Link]
E [Link] – – – – Research/Experimental
[Link]
Class C IP Address in Detail
• Range: [Link] to [Link]
• First 3 octets (24 bits) = Network ID
• Last 1 octet (8 bits) = Host ID
• Default Subnet Mask: [Link]
• Maximum hosts per network: 2^8 – 2 = 254 (subtract 2 for network and broadcast addresses)
• Used for: Small networks like offices, schools, homes
Example
IP Address: [Link]
• Network ID: 192.168.1 (first three octets)
• Host ID: 25 (last octet)
• Subnet Mask: [Link]
• Network Address: [Link] (reserved — represents the network itself)
• Broadcast Address: [Link] (reserved — sends message to all hosts)
• Valid Host Range: [Link] to [Link]
Q13. What is Bus Topology? Explain all topologies with figures, advantages,
disadvantages.
Network Topology is the physical or logical arrangement of computers, cables, and other network devices
in a network. It defines how devices are connected and how data flows between them.
1. Bus Topology
In bus topology, all computers are connected to a single central cable called the bus or backbone. Data
sent by one computer travels along the backbone and is received by all computers, but only the intended
recipient accepts it.
Diagram: [Computer]──[Computer]──[Computer]──[Computer] (all on one cable)
• Cable Used: Coaxial cable (RG-58)
• Method: CSMA/CD (Carrier Sense Multiple Access with Collision Detection)
• Terminators are placed at both ends of the cable to prevent signal reflection
Advantages:
• Simple and inexpensive to set up
• Requires less cable compared to other topologies
• Easy to expand by adding more devices
Disadvantages:
• If the backbone cable fails, the entire network goes down
• Performance degrades as more devices are added
• Difficult to troubleshoot faults
• Not suitable for large networks
📝 Main Usage: Small networks, temporary setups, older Ethernet networks
2. Star Topology
In star topology, all computers are connected to a central device called a hub or switch. Every
communication between devices passes through this central device.
Diagram: All devices connected to a central hub/switch with individual cables (like a star)
• Cable Used: UTP (Unshielded Twisted Pair) — Cat5e, Cat6
• Central Device: Hub or Switch
Advantages:
• Easy to add or remove devices without affecting the network
• If one cable or computer fails, the rest of the network is unaffected
• Easy to detect and isolate faults
• Better performance than bus topology
Disadvantages:
• If the central hub/switch fails, the entire network goes down
• Requires more cable than bus topology
• More expensive due to the cost of the central device
📝 Main Usage: Most common topology; used in offices, schools, home networks
3. Ring Topology
In ring topology, each computer is connected to two other computers, forming a closed ring/loop. Data
travels in one direction (or both in dual ring) around the ring until it reaches the destination.
Diagram: Computer → Computer → Computer → Computer → (back to first)
• Cable Used: Twisted pair or fiber optic cable
• Method: Token passing — a special signal (token) passes around the ring; only the device holding
the token can transmit
Advantages:
• Equal access for all computers (no collision)
• Performs well under heavy network traffic
Disadvantages:
• If one computer or cable fails, the entire ring is disrupted
• Adding or removing devices disrupts the network
• Slower than star topology for small networks
📝 Main Usage: FDDI (Fiber Distributed Data Interface), older IBM Token Ring networks
4. Mesh Topology
In mesh topology, every computer is directly connected to every other computer in the network. There
are two types: Full Mesh (all connected to all) and Partial Mesh (some connected to some).
For n devices: Full mesh requires n(n-1)/2 cables
• Cable Used: Coaxial or fiber optic
Advantages:
• Highly reliable — multiple paths exist for data; if one link fails, data takes another route
• Excellent performance and no traffic congestion
• Easy to detect and isolate faults
Disadvantages:
• Very expensive — requires a large amount of cable
• Complex installation and maintenance
📝 Main Usage: Military networks, critical infrastructure, internet backbone
5. Tree (Hierarchical) Topology
Tree topology combines bus and star topologies. Multiple star networks are connected to a bus
backbone. It creates a hierarchy of devices.
Advantages:
• Easy to manage and expand
• Hierarchical structure makes troubleshooting easier
Disadvantages:
• If the backbone fails, the entire network breaks down
• More cable required than bus topology
📝 Main Usage: Wide-area networks, company headquarters with branch offices
6. Hybrid Topology
Hybrid topology is a combination of two or more different topologies. For example, a large organization
may use star topology within departments and connect departments using a bus or ring backbone.
• Advantage: Flexible — can be customized for specific needs
• Disadvantage: Complex and expensive
Q14. What is a Computer Network? Hardware equipment needed.
A Computer Network is a collection of two or more computers and devices connected together using
communication media (cables or wireless) to share resources (data, printers, internet) and communicate
with each other.
Benefits of Computer Networks
• Resource sharing: Share printers, files, and internet connection
• Communication: Email, video calls, messaging
• Data sharing: Easy transfer of files between connected devices
• Centralized management: Software updates and data can be managed from one location
Hardware Equipment Needed to Establish a Computer Network
Device Function
Network Interface Card Hardware installed in each computer to physically
(NIC) connect to the network
Switch Connects multiple devices in a network; forwards data
only to the intended recipient
Router Connects different networks (e.g., LAN to internet);
routes data packets between networks
Hub Basic device that connects multiple computers;
broadcasts data to all devices
Modem Converts digital signals to analog for transmission over
telephone lines (and vice versa)
Access Point (AP) Allows wireless devices to connect to a wired network via
Wi-Fi
Network Cable Physical medium — Twisted Pair (UTP), Coaxial, or Fiber
Optic cable
Firewall Security device that monitors and filters
incoming/outgoing network traffic
Server Powerful computer that provides services (file storage,
web hosting) to other network users
Repeater Amplifies/regenerates network signals to extend the
range of the network
Bridge Connects and filters traffic between two similar network
segments
Q15. Types of Computer Networks – LAN, WAN, PAN
Feature PAN LAN WAN
Full Name Personal Area Local Area Network Wide Area Network
Network
Coverage Area Very small (~10 Small – within a Very large – city, country,
meters) building/campus worldwide
Speed Low to medium High (100 Mbps – 10 Lower (variable)
Gbps)
Cost Very low Low to medium Very high
Ownership Private (personal) Private (organization) Public or private
Technology Bluetooth, Infrared, Ethernet, Wi-Fi Leased lines, satellite,
Zigbee MPLS
Feature PAN LAN WAN
Example Phone + Laptop + Office or school Internet, bank networks
Smartwatch network across Nepal
Security Very high Moderate to high Lower – more exposure to
threats
Q16. Describe Wireless Network System. Devices/Equipment for Wi-Fi.
A Wireless Network is a network that allows devices to connect and communicate without physical cables,
using radio waves (electromagnetic signals) to transmit data through the air.
Common wireless standards: IEEE 802.11 (Wi-Fi), Bluetooth, Infrared (IR), WiMAX, 4G/5G cellular.
Types of Wireless Networks
• WPAN (Wireless PAN): Very short range — Bluetooth, Infrared
• WLAN (Wireless LAN): Within a building — Wi-Fi (IEEE 802.11)
• WMAN (Wireless MAN): City-wide — WiMAX
• WWAN (Wireless WAN): Country/worldwide — 4G, 5G cellular networks
Devices and Equipment Needed for a Wi-Fi Network
Device Role
Wireless Router Main device — connects to internet, creates the Wi-Fi
network; routes data between local devices and internet
Modem Connects to ISP (Internet Service Provider); converts
signals for internet access
Wireless Access Point Extends wireless coverage to a larger area; connects to
(WAP) the wired network and broadcasts Wi-Fi
Network Interface Card Wireless NIC in each computer/device to connect to Wi-
(NIC) Fi
Wireless Adapter For computers that don't have built-in Wi-Fi capability
(USB/PCIe)
Switch (optional) To connect multiple wired devices in addition to wireless
Repeater/Extender Extends the Wi-Fi signal to areas with weak coverage
ISP Connection Broadband or fiber connection from the Internet Service
Provider
Advantages of Wireless Networks
• No cable clutter — clean and flexible installation
• Mobility — users can move around while staying connected
• Easy to add new devices without rewiring
Disadvantages
• Security risk — signals can be intercepted if not encrypted
• Interference from walls, other devices
• Generally slower than wired networks
Q17. Describe Transmission Media – Guided and Unguided
Transmission media is the physical path through which data is transmitted from one device to another in
a network. It is classified into two main types: Guided (Wired) and Unguided (Wireless).
A. Guided (Bounded/Wired) Media
In guided media, data travels through a physical conductor (wire or fiber). The medium guides (directs)
the signal along its path.
1. Twisted Pair Cable
Two copper wires twisted together to reduce electromagnetic interference. The twisting helps cancel out
external interference (cross-talk).
• UTP (Unshielded Twisted Pair): Most common; no extra shielding; used in LAN, telephone
• STP (Shielded Twisted Pair): Has extra metallic shielding; better protection; more expensive
• Categories: Cat5 (100Mbps), Cat5e (1Gbps), Cat6 (10Gbps up to 55m)
• Connector: RJ-45
2. Coaxial Cable
Has a central copper conductor surrounded by insulation, a metallic shield, and an outer plastic cover.
The shield protects from interference.
• Types: Thick coax (10Base5) and Thin coax (10Base2)
• Used in: Cable TV, older Ethernet networks, cable internet
• Connector: BNC connector
3. Fiber Optic Cable
Uses pulses of light to transmit data through glass or plastic fibers. Extremely fast and immune to
electromagnetic interference.
• Single-mode fiber: Single light path; very long distances (up to 100km+); used in
telecommunications
• Multi-mode fiber: Multiple light paths; shorter distances; used in LAN
• Advantage: Highest speed, most secure, no EMI
• Disadvantage: Expensive, fragile, requires special connectors
B. Unguided (Unbounded/Wireless) Media
Data is transmitted through the air without any physical medium, using electromagnetic waves.
1. Radio Waves
• Frequency: 3 KHz to 1 GHz
• Can penetrate walls and travel long distances
• Used in: AM/FM radio, Wi-Fi, Bluetooth, cellular networks
2. Microwaves
• Frequency: 1 GHz to 300 GHz
• Line-of-sight transmission (antennas must be visible to each other)
• Used in: Long-distance telephone, TV broadcasting, Wi-Fi (5GHz band)
3. Infrared
• Short range (within a room), blocked by walls
• Used in: TV remote controls, short-range device communication
4. Satellite Communication
• Uses communication satellites orbiting Earth to transmit signals over very long distances
• Types: GEO (geostationary), MEO, LEO satellites
• Used in: GPS, satellite TV, global internet access
• Disadvantage: High latency due to distance
Q18. Difference between Peer-to-Peer and Client/Server Network
Basis Peer-to-Peer (P2P) Client/Server Network
Definition All computers have equal Dedicated servers provide
status and can be both clients services to client computers
and servers
Central Server No dedicated server needed Has one or more dedicated
servers
Cost Low — no expensive server High — requires powerful
hardware server hardware
Security Low — difficult to enforce High — centralized security
centralized security management
Performance Degrades with more users Better — dedicated resources
for services
Scalability Hard to scale for large Easily scalable
networks
Administration Each computer managed Centralized management from
separately server
Example Home network, small office, Company networks, schools,
BitTorrent web hosting
Best for Small networks (2-10 Large networks (10+
computers) computers)
Q19. Explain UTP, Coaxial Cable, and Satellite Communication
Unshielded Twisted Pair (UTP) Cable
UTP cable is the most widely used network cable. It consists of pairs of copper wires twisted together
without any shielding. The twisting reduces electromagnetic interference (crosstalk) between wires.
Structure: 4 pairs (8 wires) twisted at different rates, each pair color-coded, enclosed in plastic jacket.
Connector: RJ-45.
Category Speed Frequency Usage
Cat 3 10 Mbps 16 MHz Old telephone networks
Cat 5 100 Mbps 100 MHz Fast Ethernet
Category Speed Frequency Usage
Cat 5e 1 Gbps 100 MHz Gigabit Ethernet
Cat 6 10 Gbps (55m) 250 MHz High-speed LAN
Cat 6A 10 Gbps 500 MHz Enterprise networks
(100m)
Coaxial Cable
Structure: Central solid copper conductor → Insulating dielectric layer → Woven metallic shield → Outer
plastic jacket. The metallic shield protects the inner conductor from interference and prevents data
leakage.
• Types: RG-58 (Thin, 10Base2), RG-8 (Thick, 10Base5)
• Connector: BNC (Bayonet Neill–Concelman) connector
• Bandwidth: Up to 750 MHz
• Uses: Cable TV (CATV), old Ethernet, cable internet
• Advantages: Better shielding than UTP, can carry signals over longer distances
• Disadvantages: Bulkier and less flexible than UTP
Satellite Communication
Satellite communication uses artificial satellites orbiting the Earth to relay signals between a transmitter
and receiver. The signal is sent up to the satellite (uplink) and sent back down to Earth (downlink).
• GEO (Geostationary Earth Orbit): 35,786 km above equator; stays in one position; high latency
(~270ms); used for TV broadcasting
• MEO (Medium Earth Orbit): 2,000–35,786 km; used for GPS satellites
• LEO (Low Earth Orbit): 500–2,000 km; low latency; used for satellite internet (Starlink)
• Uses: GPS, satellite TV, global internet access, military communications, weather monitoring
• Advantages: Global coverage, suitable for remote areas
• Disadvantages: Expensive, high latency (except LEO), weather interference
Q20. Describe Simplex, Half-Duplex, and Full-Duplex
These terms describe the direction and mode of data transmission between two devices on a
communication channel.
Feature Simplex Half-Duplex Full-Duplex
Direction One-way only Both directions, but Both directions
not simultaneously simultaneously
Sending Only one side sends, Either side can send, Both sides can
other only receives but one at a time send and receive
at same time
Example TV broadcast, Walkie-talkie, two- Telephone, video
keyboard to way radio call, internet
computer, radio browsing
Bandwidth Use Uses full bandwidth in Shares bandwidth Full bandwidth
one direction alternately used in both
Feature Simplex Half-Duplex Full-Duplex
directions
simultaneously
Speed Fastest for one Slower due to Fastest for
direction switching bidirectional
communication
Protocol Simple — no Uses protocols to Most complex to
coordination needed manage turn-taking implement
Q21. Cat 6 and Optical Fiber Cable Features. Which is better for LAN?
Cat 6 (Category 6) Cable
• Type: Unshielded or shielded twisted pair copper cable
• Speed: Up to 10 Gbps (up to 55 meters), 1 Gbps up to 100 meters
• Frequency: 250 MHz
• Connector: RJ-45
• Cost: Moderate — affordable for most organizations
• Installation: Easy to install; compatible with existing Cat5e infrastructure
Advantages: Affordable, easy to install, widely available, backward compatible, suitable for most LAN
environments.
Disadvantages: Limited to 55m for 10 Gbps; susceptible to EMI; copper can degrade over time.
Optical Fiber Cable
• Type: Glass or plastic fibers that transmit data as light pulses
• Speed: Up to 100 Gbps and beyond
• Distance: Single-mode: up to 100 km; Multi-mode: up to 2 km
• Connector: SC, LC, ST connectors
• Immune to EMI: Completely immune to electromagnetic interference
• Security: Very secure — no radiation; extremely difficult to tap
Advantages: Extremely high speed, long distances, immune to interference, future-proof, highly secure.
Disadvantages: Very expensive, fragile, requires specialized installation and termination equipment.
Which is More Suitable for LAN?
For typical LAN environments (offices, schools), Cat 6 is more suitable because:
• It is significantly cheaper than fiber optic
• Provides sufficient speed (1–10 Gbps) for most LAN needs
• Easy to install with standard RJ-45 connectors
• Compatible with most network devices
However, optical fiber is recommended when: the network needs to span long distances (> 100m),
requires very high bandwidth (video production, data centers), or needs to be immune to interference
(industrial environments).
UNIT 3: WEB TECHNOLOGY
Q22. PHP Code to Connect to a MySQL Database
PHP (Hypertext Preprocessor) can connect to a MySQL database using the mysqli (MySQL Improved)
extension. Here is the standard code:
<?php
$servername = 'localhost';
$username = 'root';
$password = '';
$dbname = 'myDatabase';
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die('Connection failed: ' . mysqli_connect_error());
}
echo 'Connection successful!';
mysqli_close($conn); // Close connection when done
?>
Q23. Purpose of mysqli_connect() Function, Usage, and Parameters
The mysqli_connect() function is a built-in PHP function used to establish a connection between a PHP
script and a MySQL database server.
Syntax
mysqli_connect(servername, username, password, dbname, port, socket);
Parameters
Parameter Description Required?
servername The hostname or IP of the MySQL server (e.g., Yes
'localhost')
username The MySQL username (e.g., 'root') Yes
password The MySQL user's password (e.g., '' for no Yes
password)
dbname The name of the database to connect to Optional
port The port number for MySQL (default: 3306) Optional
socket The socket or named pipe to use Optional
Return Value
• On success: Returns a MySQLi connection object
• On failure: Returns FALSE — must use mysqli_connect_error() to get the error message
Usage Example
$conn = mysqli_connect('localhost', 'root', '', 'schoolDB');
if (!$conn) { die('Error: ' . mysqli_connect_error()); }
Q24. How to Add an Event Handler in JavaScript? Give an Example.
An event handler is a function that runs when a specific event (like a button click, mouse movement, or
key press) occurs on an HTML element.
Methods to Add Event Handlers
Method 1: Inline HTML (onclick attribute)
<button onclick="showMessage()">Click Me</button>
<script>
function showMessage() {
alert('Button was clicked!');
}
</script>
Method 2: DOM Property Assignment
<button id="myBtn">Click Me</button>
<script>
[Link]('myBtn').onclick = function() {
alert('Hello World!');
};
</script>
Method 3: addEventListener() – Recommended
<button id="myBtn">Click Me</button>
<script>
[Link]('myBtn').addEventListener('click', function() {
alert('Event triggered!');
});
</script>
Common JavaScript Events
Event Description
onclick Fires when element is clicked
onmouseover Fires when mouse pointer moves over element
onkeydown Fires when a key is pressed
onsubmit Fires when a form is submitted
onload Fires when the page finishes loading
onchange Fires when value of input changes
Q25. Database Connectivity Syntax and PHP Code to Insert Data into Student
Table
Syntax for Database Connectivity in PHP
$conn = mysqli_connect(servername, username, password, dbname);
Complete Server-Side Script to Insert Data into Student Table
<?php
// Step 1: Set database credentials
$servername = 'localhost';
$username = 'root';
$password = '';
$dbname = 'studentDB';
// Step 2: Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Step 3: Check connection
if (!$conn) {
die('Connection failed: ' . mysqli_connect_error());
}
// Step 4: Get data from HTML form
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$marks = $_POST['marks'];
$email = $_POST['email'];
// Step 5: Write SQL INSERT query
$sql = "INSERT INTO student (first_name, last_name, marks, email)
VALUES ('$first_name', '$last_name', '$marks', '$email')";
// Step 6: Execute and check result
if (mysqli_query($conn, $sql)) {
echo 'Record inserted successfully!';
} else {
echo 'Error: ' . mysqli_error($conn);
}
// Step 7: Close connection
mysqli_close($conn);
?>
Q26. Short Notes on Internet Technology
The Internet is a global network of interconnected computers and devices that communicate using
standardized protocols (mainly TCP/IP). It allows billions of devices worldwide to share information,
communicate, and access services.
Key Internet Technologies
• TCP/IP (Transmission Control Protocol/Internet Protocol): The fundamental communication
protocol of the internet. TCP ensures reliable data delivery; IP handles addressing and routing.
• HTTP/HTTPS: HyperText Transfer Protocol — protocol for transferring web pages. HTTPS adds
SSL/TLS encryption for security.
• DNS (Domain Name System): Translates human-readable domain names ([Link]) to
IP addresses. Acts as the 'phone book' of the internet.
• URL (Uniform Resource Locator): The address of a resource on the web (e.g.,
[Link]
• HTML/CSS/JavaScript: Core technologies for creating web pages — HTML for structure, CSS for
styling, JavaScript for interactivity.
• Web Browsers: Software to access and display web content (Chrome, Firefox, Edge, Safari).
• ISP (Internet Service Provider): Company that provides internet access to users (e.g., Nepal
Telecom, Ncell).
• Cloud Computing: Delivering computing services over the internet — storage, servers, software.
• Streaming: Technology for continuous delivery of audio/video content over the internet (YouTube,
Netflix).
Q27. Differences between Server-Side and Client-Side Scripting
Basis Server-Side Scripting Client-Side Scripting
Execution Runs on the web server Runs in the user's web
Location browser
Languages PHP, [Link], Python JavaScript, HTML, CSS,
(Django/Flask), [Link], Ruby jQuery
Output Sends HTML/text output to Directly manipulates the
browser web page in browser
Server Load Processing done on server (uses Processing done on client
server resources) (saves server resources)
Security More secure — code not visible to Less secure — code visible
users in browser (View Source)
Internet Required Needs server connection to Can run offline in browser
execute once loaded
Database Access Can directly access databases Cannot directly access
and files databases
Speed Slower (round trip to server Faster — immediate
needed) response without server
request
Example PHP login system, MySQL query Form validation, image
sliders, dropdown menus
Q28. Fetch Data from Database in PHP and Display. PHP Advantages and
Operators.
PHP Code to Fetch and Display Data from Database
<?php
$conn = mysqli_connect('localhost', 'root', '', 'studentDB');
if (!$conn) { die('Connection failed: ' . mysqli_connect_error()); }
$sql = 'SELECT * FROM student';
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
echo '<table border=1>';
echo '<tr><th>First Name</th><th>Last
Name</th><th>Marks</th><th>Email</th></tr>';
while ($row = mysqli_fetch_assoc($result)) {
echo '<tr>';
echo '<td>' . $row['first_name'] . '</td>';
echo '<td>' . $row['last_name'] . '</td>';
echo '<td>' . $row['marks'] . '</td>';
echo '<td>' . $row['email'] . '</td>';
echo '</tr>';
}
echo '</table>';
} else {
echo 'No records found.';
}
mysqli_close($conn);
?>
About PHP
PHP (Hypertext Preprocessor) is a popular open-source server-side scripting language designed for web
development. PHP code is embedded in HTML and executed on the server, sending HTML output to the
browser.
Advantages of PHP
• Free and open-source
• Platform independent — runs on Windows, Linux, Mac
• Easy to learn and widely used
• Excellent database support (MySQL, PostgreSQL, Oracle)
• Large community with extensive documentation and libraries
• Fast execution speed
PHP Operators
Type Operators Example
Arithmetic + – * / % ** $a + $b (Addition)
Assignment = += -= *= /= $a = 5; $a += 3 (now $a = 8)
Type Operators Example
Comparison == != > < >= <= $a == $b (checks equality)
Logical && || ! and or $a > 0 && $b > 0
String . .= $a . $b (concatenation)
Increment/Decrement ++ -- $a++ (increment by 1)
Q29. What is jQuery? Write its Uses.
jQuery is a fast, small, and feature-rich JavaScript library. It simplifies many complex JavaScript tasks,
making it much easier to write code that works across different web browsers.
jQuery was created by John Resig in 2006. Its motto is: 'Write less, do more.'
Key Features of jQuery
• DOM Manipulation: Easily select and modify HTML elements
• Event Handling: Simplified event listeners for clicks, keyboard events, etc.
• AJAX Support: Easy asynchronous HTTP requests without page reload
• Animations and Effects: Built-in functions for show/hide, fade, slide effects
• Cross-Browser Compatibility: Works consistently in all major browsers
Uses of jQuery
11. Selecting HTML elements: $('p') — selects all paragraph elements
12. Changing content: $('#myDiv').html('Hello World!');
13. Handling events: $('#btn').click(function(){ alert('Clicked!'); });
14. AJAX calls: Load data from server without page refresh
15. Animations: $('#div').fadeIn(); or $('#div').slideUp();
16. Form validation: Check form fields before submission
17. Modifying CSS: $('#div').css('color', 'red');
Q30. Server-Side Script to Create Database, Connect, Create Table, and Insert
Data
<?php
// Step 1: Connect to MySQL server (no specific database yet)
$conn = mysqli_connect('localhost', 'root', '');
if (!$conn) { die('Connection failed: ' . mysqli_connect_error()); }
// Step 2: Create Database
$sql = 'CREATE DATABASE IF NOT EXISTS studentDB';
if (mysqli_query($conn, $sql)) {
echo 'Database created successfully!<br>';
}
// Step 3: Select/Connect to the database
mysqli_select_db($conn, 'studentDB');
// Step 4: Create a table
$sql = 'CREATE TABLE IF NOT EXISTS student (
id INT AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
marks INT,
email VARCHAR(100)
)';
if (mysqli_query($conn, $sql)) {
echo 'Table created successfully!<br>';
}
// Step 5: Insert data
$sql = "INSERT INTO student (first_name, last_name, marks, email)
VALUES ('Ram', 'Shrestha', 85, 'ram@[Link]')";
if (mysqli_query($conn, $sql)) {
echo 'Data inserted successfully!';
}
mysqli_close($conn);
?>
UNIT 4: PROGRAMMING IN C
Q31. Components of a Function in C. Call-by-Value vs Call-by-Reference. Passing
Parameters.
A function in C is a self-contained block of code that performs a specific task. Functions help avoid
repetition, make code organized, and easier to maintain.
Components of a Function in C
• 1. Return Type: The data type of the value returned by the function (e.g., int, float, void).
• 2. Function Name: A unique identifier for the function (e.g., addNumbers).
• 3. Parameters (Formal Parameters): Variables declared inside the parentheses to receive input
values.
• 4. Function Body: The block of code inside curly braces {} that performs the actual task.
• 5. Return Statement: Returns a value to the calling function (optional for void functions).
Example Function Structure
int addNumbers(int a, int b) { // return type, name, parameters
int sum = a + b; // function body
return sum; // return statement
}
Call-by-Value
In call-by-value, a copy of the actual argument's value is passed to the function. Changes made inside
the function do NOT affect the original variable.
#include <stdio.h>
void swap(int a, int b) {
int temp = a;
a = b; b = temp; // Only local copies are swapped
}
int main() {
int x = 5, y = 10;
swap(x, y); // x and y remain 5 and 10
printf('%d %d', x, y); // Output: 5 10
}
Call-by-Reference
In call-by-reference, the address (memory location) of the actual argument is passed using pointers.
Changes inside the function DO affect the original variable.
#include <stdio.h>
void swap(int *a, int *b) {
int temp = *a;
*a = *b; *b = temp; // Original values are swapped
}
int main() {
int x = 5, y = 10;
swap(&x, &y); // Pass addresses
printf('%d %d', x, y); // Output: 10 5
}
Basis Call-by-Value Call-by-Reference
What is passed A copy of the value The address (memory
location) of the variable
Effect on original No change to original variable Original variable is changed
Memory Extra memory for copy No extra memory — uses
same memory location
Safety Safer — original data protected Less safe — original data can
be modified
Q32. Binary File Handling in C. putw() and getw() Functions.
File handling in C allows programs to read from and write to files stored on disk. Files can be opened in
text mode or binary mode.
Binary files store data in the same format as it exists in memory (as binary — 0s and 1s). They are more
compact and faster than text files for numeric data. Binary files are opened using mode 'rb' (read binary)
or 'wb' (write binary).
putw() Function
putw() writes an integer value to a binary file. It stands for 'put word'.
• Syntax: int putw(int n, FILE *fp);
• Returns the written integer on success, EOF on failure
getw() Function
getw() reads an integer value from a binary file. It stands for 'get word'.
• Syntax: int getw(FILE *fp);
• Returns the integer read on success, EOF when end of file is reached
Example: Writing and Reading integers with putw() and getw()
#include <stdio.h>
int main() {
FILE *fp;
int num, value;
// WRITING to binary file using putw()
fp = fopen('[Link]', 'wb');
if (fp == NULL) { printf('Cannot open file!'); return 1; }
for (num = 1; num <= 5; num++) {
putw(num * 10, fp); // Writes 10, 20, 30, 40, 50
}
fclose(fp);
// READING from binary file using getw()
fp = fopen('[Link]', 'rb');
printf('Numbers in file: ');
while ((value = getw(fp)) != EOF) {
printf('%d ', value); // Output: 10 20 30 40 50
}
fclose(fp);
return 0;
}
Q33. What are Pointers and their Advantages?
A pointer is a special variable in C that stores the memory address of another variable. Instead of storing
a data value (like an integer or character), a pointer stores the address where data is located in memory.
Declaration and Usage
int x = 10; // Normal variable
int *ptr = &x; // ptr is a pointer; &x gives address of x
printf('%d', *ptr); // *ptr dereferences — gives value at address = 10
Two important operators:
• & (Address-of operator): Gets the memory address of a variable
• * (Dereference operator): Gets the value stored at a memory address
Advantages of Pointers
• Dynamic Memory Allocation: Allows programs to request memory at runtime using malloc(),
calloc(), realloc() — essential for arrays and data structures of variable size
• Call-by-Reference: Pass addresses to functions so they can modify original variables
• Arrays and Strings: Array names are pointers; pointers make array manipulation efficient
• Data Structures: Pointers are used to build linked lists, trees, graphs, stacks, queues
• Efficiency: Passing a pointer (4 or 8 bytes) to a function is faster than copying an entire large
structure
• System-Level Programming: Direct memory access enables writing operating systems and device
drivers
Q34. What is Recursion?
Recursion is a programming technique where a function calls itself to solve a smaller version of the same
problem. Each recursive call reduces the problem toward a base case (stopping condition).
Key Elements of Recursion
• Base Case: The condition where the function stops calling itself (prevents infinite loop)
• Recursive Case: The condition where the function calls itself with a smaller/simpler input
Example: Factorial using Recursion
#include <stdio.h>
int factorial(int n) {
if (n == 0 || n == 1) // Base case
return 1;
else // Recursive case
return n * factorial(n - 1);
}
int main() {
printf('Factorial of 5 = %d', factorial(5)); // Output: 120
}
Trace: factorial(5) → 5 * factorial(4) → 5 * 4 * factorial(3) → ... → 5*4*3*2*1 = 120
Advantages of Recursion
• Simplifies code for complex problems (e.g., Fibonacci, factorial, tree traversal)
• Makes code cleaner and more readable
Disadvantages
• Uses more memory (each call adds to the call stack)
• Can be slower than iterative solutions
• Risk of stack overflow if no proper base case
Q35. Define Structure, File Handling, Modes of Opening Files, Function, and
Types of Functions
Structure
A structure is a user-defined data type in C that allows grouping of variables of different data types under
a single name. It is used to represent a record of related information.
struct Student { // Structure definition
int id;
char name[50];
float marks;
};
struct Student s1; // Declare structure variable
[Link] = 101; // Access member using dot operator
strcpy([Link], 'Ram');
File Handling in C
File handling allows a C program to create, read, write, and modify files stored on disk. Files are used to
permanently store data beyond program execution.
A file in C is opened using fopen(), and its operations are performed through a FILE pointer:
FILE *fp;
fp = fopen('[Link]', 'r'); // Open file for reading
fclose(fp); // Always close after use
Three Modes of Opening Files
Mode Symbol Description
Read "r" Opens an existing file for reading only. File must
exist; error if not found.
Write "w" Creates new file for writing. If file exists, it is erased
and overwritten.
Append "a" Opens file for writing at the end. Creates file if not
exists; existing content preserved.
Read+Write "r+" Opens existing file for both reading and writing.
Mode Symbol Description
Write+Read "w+" Creates new file for reading and writing; overwrites
existing file.
Binary Read "rb" Opens existing binary file for reading.
Binary Write "wb" Creates/overwrites binary file for writing.
Functions in C
A function is a named block of code that performs a specific task. It can be called multiple times from
different parts of the program.
Types of Functions
• 1. Library Functions (Built-in): Predefined functions in C standard library. Example: printf(),
scanf(), sqrt(), strlen(), fopen()
• 2. User-Defined Functions: Created by the programmer to solve specific problems. Example:
calculateArea(), findMax()
• 3. Functions with no return value and no parameters: void greet() — performs task without input
or output
• 4. Functions with parameters but no return value: void display(int n) — takes input but returns
nothing
• 5. Functions with return value but no parameters: int getAge() — returns a value without input
• 6. Functions with both parameters and return value: int add(int a, int b) — most common type
UNIT 5: OBJECT-ORIENTED PROGRAMMING (OOP)
Q36. What is OOP? Example, Advantages, Disadvantages, and Applications.
Object-Oriented Programming (OOP) is a programming paradigm that organizes software design around
objects rather than functions and logic. An object is a combination of data (attributes) and behavior
(methods/functions).
Core Concepts of OOP
• Class: A blueprint or template that defines the attributes and methods of objects. Example: class
Car { color, speed, drive() }
• Object: An instance of a class. Example: myCar is an object of class Car
• Encapsulation: Bundling data and methods together and hiding internal details from outside
• Inheritance: A class can inherit properties and methods from another class (parent-child
relationship)
• Polymorphism: The same method name can behave differently in different classes
• Abstraction: Hiding complex implementation details and showing only essential features
Example (in C++)
#include <iostream>
using namespace std;
class Student {
public:
string name;
int marks;
void display() {
cout << 'Name: ' << name << ', Marks: ' << marks << endl;
}
};
int main() {
Student s1; // Create object
[Link] = 'Ram';
[Link] = 85;
[Link](); // Output: Name: Ram, Marks: 85
}
Advantages of OOP
• Modularity: Each object is self-contained, making programs easier to develop and maintain
• Code Reusability: Inheritance allows reusing existing code without rewriting it
• Easier Maintenance: Changes to one class don't affect other unrelated classes
• Data Security: Encapsulation hides sensitive data from direct access
• Real-world modeling: Objects represent real entities, making design intuitive
Disadvantages of OOP
• Complexity: More complex to learn and implement than procedural programming
• Slower: Object creation and method calls add overhead
• Not suitable for all problems: Some tasks are simpler with procedural approach
Applications of OOP
• GUI Applications: Windows, buttons, menus are all objects
• Game Development: Players, enemies, weapons are objects in games
• Web Development: Frameworks like Django, Laravel use OOP
• Simulation: Traffic simulation, weather modeling
• Database Systems: ORM (Object-Relational Mapping)
Q37. Event-Driven/OOP vs Procedural Programming. OOP vs Structured
Programming.
OOP vs Procedural-Oriented Programming
Basis OOP Procedural-Oriented
Programming
Focus Objects (data + functions Functions and procedures
together)
Approach Bottom-up (start with objects) Top-down (start with main
function)
Data Data is hidden (encapsulated) Data is shared across
functions
Code Reuse Through inheritance Through function calls
Real-world Closely models real world Abstract — does not model
modeling real world well
Examples C++, Java, Python, C# C, Pascal, COBOL, FORTRAN
Maintenance Easier to maintain large Harder to maintain large
programs programs
OOP vs Structured (Procedural) Programming
Basis OOP Structured Programming
Unit Object (contains data + Function/Procedure
functions)
Data Hiding Yes — encapsulation hides No — data accessible across
data program
Inheritance Yes No
Polymorphism Yes No
Security Higher — data protected Lower — data more exposed
Problem solving Models real-world entities Breaks problem into
functions/steps
Examples Java, C++, Python C, Pascal
Event-Driven Programming
Event-driven programming is a paradigm where the flow of the program is determined by events — user
actions (clicks, key presses), sensor outputs, or messages. The program waits for events and responds
to them.
• Used in: GUI applications, mobile apps, web applications
• Example: JavaScript onclick, onkeypress events; Windows forms applications
• OOP and event-driven programming are often used together — objects handle events
Q38. What is Inheritance, Class, and Polymorphism? Explain with Examples.
Class
A class is a user-defined data type (blueprint) that defines the attributes (data members) and behaviors
(member functions/methods) that objects of that class will have.
class Animal { // Class definition
public:
string name; // Attribute
void eat() { // Method
cout << name << ' is eating.' << endl;
}
};
Inheritance
Inheritance is the mechanism by which one class (child/derived class) acquires the properties and
methods of another class (parent/base class). This promotes code reusability.
Types of Inheritance: Single, Multiple, Multilevel, Hierarchical, Hybrid
class Animal { // Parent/Base class
public:
void breathe() { cout << 'Breathing...' << endl; }
};
class Dog : public Animal { // Child/Derived class inherits Animal
public:
void bark() { cout << 'Woof!' << endl; }
};
int main() {
Dog d;
[Link](); // Inherited from Animal — Output: Breathing...
[Link](); // Own method — Output: Woof!
}
Polymorphism
Polymorphism means 'many forms.' It is the ability of a function or operator to behave differently based
on the object or data type it is acting on.
1. Compile-time Polymorphism (Function Overloading)
Same function name with different parameters:
int add(int a, int b) { return a + b; }
float add(float a, float b) { return a + b; }
// add(3, 4) calls the int version; add(2.5, 1.5) calls the float version
2. Runtime Polymorphism (Function Overriding)
Child class redefines a method from the parent class:
class Animal { public: virtual void sound() { cout << 'Some sound'; } };
class Cat : public Animal { public: void sound() { cout << 'Meow'; } };
class Dog : public Animal { public: void sound() { cout << 'Woof'; } };
UNIT 6: SOFTWARE PROCESS MODEL
Q39. What is SDLC? Stages, Advantages, Disadvantages.
SDLC (Software Development Life Cycle) is a systematic process for planning, designing, developing,
testing, and deploying software. It provides a structured approach to software development to ensure
high quality, meets user requirements, and is completed on time and within budget.
Stages of SDLC
1. Planning
Define the scope and purpose of the project. Identify resources, budget, and timeline. Conduct feasibility
study (technical, economic, legal feasibility). This stage answers: What are we building and is it worth
building?
2. Requirement Analysis
Gather detailed requirements from stakeholders (clients, end users). Document functional requirements
(what the system should do) and non-functional requirements (speed, security, reliability). This is the
most critical stage.
3. System Design
Create the blueprint for the system. Design includes: system architecture, database design (ER
diagrams), user interface design, and module design. Two levels: High-Level Design (overall
architecture) and Low-Level Design (detailed module design).
4. Implementation (Coding)
Programmers write code based on the design documents. Follows coding standards and guidelines. This
is where the actual software is built using programming languages.
5. Testing
The developed software is tested thoroughly to find and fix bugs. Types of testing: Unit testing, Integration
testing, System testing, User Acceptance Testing (UAT). Quality assurance ensures the product meets
requirements.
6. Deployment
The tested software is released to the production environment (real users). May be deployed in phases
(pilot release) or all at once. User training and documentation are provided.
7. Maintenance
After deployment, the software is updated to fix bugs, improve performance, and add new features.
Types: Corrective maintenance (fixing bugs), Adaptive maintenance (changes for new environment),
Perfective maintenance (enhancements).
Why All Stages Are Necessary
• Skipping Planning leads to resource waste and project failure
• Skipping Requirements leads to building the wrong product
• Skipping Design leads to poor architecture that is hard to change later
• Skipping Testing leads to buggy, unreliable software
• Skipping Maintenance leads to the software becoming outdated and unusable
Advantages of SDLC
• Clear project structure and timelines
• Better control over project cost and quality
• Systematic documentation at every stage
• Early detection of problems reduces cost of fixing them
Disadvantages of SDLC
• Rigid — changes are difficult once a phase is complete (especially Waterfall SDLC)
• Time-consuming documentation at every stage
• Customer sees the product only at the end in traditional models
Q40. What is Requirement Gathering? Explain Different Methods.
Requirement gathering (also called requirements elicitation) is the process of collecting, understanding,
and documenting the needs and expectations of stakeholders (clients, users, management) for a
software system. It is performed in the Requirement Analysis phase of SDLC.
Methods of Requirement Gathering
1. Interviews
One-on-one or group meetings between the analyst and stakeholders. Questions can be structured (fixed
questions) or unstructured (open discussion). Best for getting detailed, in-depth information from key
stakeholders.
2. Questionnaires/Surveys
Written lists of questions sent to a large group of users. Useful when many people need to be consulted
and personal interviews are not practical. Responses can be analyzed statistically.
3. Observation
The analyst observes users performing their actual work tasks without interfering. Helps understand how
users currently work and what problems they face. Reveals requirements that users might not think to
mention.
4. Document Analysis (Existing System Study)
Reviewing existing documents, reports, forms, procedures, and manuals of the current (manual or
automated) system. Helps understand what the current system does and what needs to change.
5. Prototyping
Creating a working model (prototype) of the software for users to try. Users provide feedback which is
used to refine requirements. Effective when requirements are unclear or changing.
6. Joint Application Development (JAD) Sessions
Structured workshops with stakeholders, users, and developers together. Collaborative approach; all
parties agree on requirements in the session. Reduces misunderstandings and speeds up requirement
gathering.
7. Brainstorming
Group creative sessions where team members freely generate ideas without criticism. Useful in early
stages to identify all possible requirements and features.
Q41. Explain the Importance of System Testing in SDLC.
System Testing is the process of testing a complete, integrated software system to verify that it meets
the specified requirements. It is performed after integration testing and before deployment.
Importance of System Testing
• Validates the Complete System: Tests the entire system as a whole to ensure all components
work together correctly
• Verifies Requirements: Checks that the system meets all functional and non-functional
requirements defined in the requirements phase
• Finds Critical Bugs: Detects bugs that may not appear in unit or integration testing but emerge
when the whole system runs together
• Ensures Reliability: Tests the system under various conditions to ensure stable and reliable
operation
• Security Testing: Identifies security vulnerabilities before the system is deployed to users
• Performance Testing: Checks that the system performs well under expected and peak loads
• User Acceptance Preparation: System testing prepares the system for user acceptance testing
(UAT) with the client
• Reduces Post-Deployment Costs: Fixing bugs before deployment is much cheaper than fixing
them after release
Types of System Testing
Type Description
Functional Testing Verifies that each function works as specified
Performance Testing Tests system speed, response time under load
Load Testing Tests system behavior under expected maximum load
Security Testing Checks for vulnerabilities and unauthorized access
Usability Testing Evaluates how user-friendly the interface is
Regression Testing Re-tests after changes to ensure nothing is broken
Compatibility Testing Tests on different OS, browsers, and devices
Q42. Major Activities in Software Design.
Software design is the phase in SDLC where the system's blueprint is created based on the requirements.
It transforms requirements into a detailed plan for implementation.
Major Design Activities
18. Architectural Design: Define the overall structure of the system — which modules exist, how
they are organized, and how they communicate. Create a high-level system architecture diagram.
19. Database Design: Design the data storage structure — create ER diagrams, define tables,
relationships, normalization. Decide on the DBMS to be used.
20. Interface Design (UI/UX): Design the user interface — screen layouts, menus, forms, buttons.
The interface should be intuitive and user-friendly.
21. Module/Component Design: Break the system into smaller modules (components). Define the
input, processing, and output of each module. Create data flow diagrams (DFDs).
22. Algorithm Design: Define the logic and algorithms for each module. Pseudocode or flowcharts
may be used to represent algorithms.
23. Network Design: Design the network infrastructure required — topology, servers, hardware
placement.
24. Security Design: Plan security measures — authentication mechanisms, data encryption,
access control.
25. Documentation: Document all design decisions for reference during implementation and
maintenance.
Q43. Explain System Analyst — Importance, Roles, Functions. Describe Data
Analyst and Characteristics of Good System Analyst.
System Analyst
A System Analyst is an IT professional who analyzes an organization's current systems and processes,
identifies problems, and designs improved solutions. They act as a bridge between the business
stakeholders and the technical development team.
Importance of System Analyst
• Translates business needs into technical specifications for developers
• Identifies inefficiencies in existing systems and proposes solutions
• Ensures the new system meets user requirements
• Reduces project failure risks by thorough analysis before development
Roles and Functions of System Analyst
26. Requirement Analysis: Gather and document user requirements through interviews,
observation, and document study
27. Feasibility Study: Assess whether the proposed system is technically, economically, and
operationally feasible
28. System Design: Create system specifications, data flow diagrams, ER diagrams, and process
models
29. Communication Bridge: Communicate technical details to management and business
requirements to developers
30. Testing Support: Review test plans and validate that the system meets requirements
31. Documentation: Prepare system documentation including user manuals and technical
specifications
32. Change Management: Analyze and evaluate proposed changes to the system
Data Analyst
A Data Analyst collects, processes, and analyzes large sets of data to extract meaningful insights and
help organizations make data-driven decisions. They use tools like Excel, SQL, Python, and visualization
software (Power BI, Tableau).
• Tasks: Clean data, identify trends, create reports and visualizations, perform statistical analysis
• Tools: SQL, Python/R, Excel, Power BI, Tableau
Characteristics of a Good System Analyst
Characteristic Description
Technical Knowledge Understanding of programming, databases, networking, and
system design
Analytical Thinking Ability to break complex problems into manageable parts
Characteristic Description
Communication Skills Must clearly communicate with both technical teams and
non-technical management
Problem-Solving Creative ability to design solutions for business problems
Attention to Detail Must accurately capture and document all requirements
Team Player Works effectively with developers, managers, and clients
Adaptability Must keep up with rapidly changing technology
Time Management Deliver analysis within project timelines
Q44. Explain Data Security Laws.
Data security laws are legal regulations that govern how personal and sensitive data must be collected,
stored, processed, and protected. They are designed to protect the privacy rights of individuals and hold
organizations accountable for data breaches.
Major International Data Security Laws
• GDPR (General Data Protection Regulation) – EU: Most comprehensive data protection law.
Gives EU citizens rights over their personal data. Organizations must get explicit consent, can be
fined up to 4% of global revenue for violations.
• HIPAA (Health Insurance Portability and Accountability Act) – USA: Protects medical and health
information. Healthcare providers must ensure confidentiality and security of patient data.
• CCPA (California Consumer Privacy Act) – USA: Gives California residents rights to know, delete,
and opt-out of sale of personal data.
• IT Act 2000 (India): Governs electronic transactions and cybercrime. Recognizes digital
signatures. Relevant to Nepal due to similar legal frameworks in the region.
Data Security Laws in Nepal
• Electronic Transaction Act 2063 (2006): Nepal's primary law governing electronic transactions,
digital signatures, and cybercrime. Addresses unauthorized access, hacking, and data theft.
• Privacy Act 2075 (2018): Protects the right to privacy of Nepali citizens. Restricts unauthorized
collection and use of personal information.
Principles of Data Security Laws
• Data Minimization: Collect only necessary data
• Purpose Limitation: Use data only for stated purposes
• Storage Limitation: Don't keep data longer than necessary
• Integrity and Confidentiality: Protect data from unauthorized access
• Accountability: Organizations are responsible for compliance
UNIT 7: RECENT TRENDS IN TECHNOLOGY
Q45. What is Artificial Intelligence (AI)? Applications, Advantages,
Disadvantages.
Artificial Intelligence (AI) is the simulation of human intelligence processes by computer systems. AI
enables machines to perform tasks that typically require human intelligence — such as understanding
language, recognizing images, making decisions, and learning from experience.
The term AI was coined by John McCarthy in 1956.
Areas of AI
• Machine Learning (ML): Systems that learn from data without being explicitly programmed
• Deep Learning: ML using neural networks with many layers; used for image and speech
recognition
• Natural Language Processing (NLP): Understanding and generating human language (e.g.,
ChatGPT, Google Translate)
• Computer Vision: Enabling machines to interpret and understand visual information
• Robotics: AI-controlled physical robots
• Expert Systems: AI that simulates expertise of human specialists
Applications of AI
Sector AI Application
Education Personalized learning, intelligent tutoring systems,
automated grading, virtual classrooms
Healthcare Disease diagnosis, medical imaging analysis, drug
discovery, robotic surgery
Finance/Banking Fraud detection, algorithmic trading, credit scoring, chatbot
customer service
Transportation Self-driving cars, traffic management, GPS navigation, flight
path optimization
Entertainment Recommendation systems (Netflix, YouTube), game AI,
content generation
Agriculture Crop disease detection, precision farming, weather
prediction, automated irrigation
Security Facial recognition, cybersecurity threat detection,
surveillance systems
E-commerce Product recommendations, price optimization, virtual
assistants
Advantages of AI
• Works 24/7 without breaks, fatigue, or errors due to tiredness
• Performs repetitive tasks faster and more accurately than humans
• Processes and analyzes massive amounts of data quickly
• Reduces human error in critical tasks (medical diagnosis, financial analysis)
• Enables innovation in science, medicine, and technology
Disadvantages of AI
• Job Displacement: Automation may eliminate many jobs
• High Cost: Developing and maintaining AI systems is expensive
• Bias: AI trained on biased data produces biased results
• Privacy Concerns: AI surveillance and data collection threatens privacy
• Dependency: Over-reliance on AI can reduce human skills
• Lack of Creativity and Emotions: AI cannot truly understand emotions or be creative
Q46. Define Robotics. Applications in Different Sectors.
Robotics is a branch of technology that deals with the design, construction, operation, and use of robots.
A robot is a programmable machine that can perform tasks automatically or semi-automatically, often in
place of humans.
Key components of a robot: Sensors (to perceive environment), Actuators (motors to move), Controller
(computer/microprocessor), Power supply, End effector (gripper, tool).
Applications of Robotics
Sector Application
Manufacturing Assembly lines, welding, painting, quality inspection (e.g., car
manufacturing factories)
Healthcare Surgical robots (Da Vinci), rehabilitation robots, pharmaceutical
dispensing, hospital disinfection robots
Agriculture Harvesting robots, planting robots, drone spraying, automated
greenhouse management
Military/Defense Bomb disposal robots, surveillance drones, unmanned combat
vehicles
Space Exploration Mars rovers (Curiosity, Perseverance), satellite repair robots,
space station operations
Education Educational robots (LEGO Mindstorms), STEM learning tools,
programming teaching
Retail/Logistics Warehouse automation (Amazon robots), delivery robots,
inventory management
Disaster Search and rescue robots, fire-fighting robots, exploring
Management hazardous environments
Q47. Define Big Data and Internet of Things (IoT).
Big Data
Big Data refers to extremely large and complex datasets that are too massive for traditional data
processing tools to handle effectively. Big data is characterized by the 5 Vs:
V Description Example
Volume Enormous amount of data Petabytes generated daily by social
media, sensors
Velocity Speed of data generation Real-time stock prices, social media
and processing posts
Variety Different types of data Text, images, video, audio, structured &
unstructured
Veracity Accuracy and Filtering out false or noise data
trustworthiness of data
Value Usefulness of the data Insights extracted from big data for
decision-making
Tools: Hadoop (distributed storage/processing), Spark (fast analytics), NoSQL databases (MongoDB).
Applications: Business analytics, healthcare research, smart city planning, financial risk analysis, social
media analysis.
Internet of Things (IoT)
The Internet of Things (IoT) refers to the network of physical devices (things) embedded with sensors,
software, and connectivity that allows them to collect and exchange data over the internet without human
intervention.
Examples of IoT devices: Smart thermostat, fitness tracker, smart doorbell, connected refrigerator,
industrial sensors.
Applications of IoT
• Smart Home: Automated lighting, temperature control, security cameras, smart locks
• Healthcare: Remote patient monitoring, smart medical devices, connected hospitals
• Agriculture: Soil moisture sensors, automated irrigation, drone monitoring
• Transportation: GPS tracking, traffic management, connected vehicles
• Industry (IIoT): Predictive maintenance of machinery, smart factories
• Energy: Smart meters, grid optimization, renewable energy management
Q48. Define Cloud Computing. Advantages and Disadvantages.
Cloud Computing is the delivery of computing services — including servers, storage, databases,
networking, software, analytics, and intelligence — over the internet ('the cloud') to offer faster innovation,
flexible resources, and economies of scale. Instead of owning physical hardware, users pay for what they
use from cloud providers.
Types of Cloud Services
• IaaS (Infrastructure as a Service): Provides virtualized computing resources — servers, storage,
networks. Example: AWS EC2, Google Compute Engine
• PaaS (Platform as a Service): Provides a platform for developing, testing, and deploying
applications. Example: Google App Engine, Heroku
• SaaS (Software as a Service): Software delivered over the internet; no installation required.
Example: Gmail, Google Docs, Microsoft 365, Netflix
Types of Cloud Deployment
• Public Cloud: Services owned and operated by third-party providers (AWS, Azure, Google Cloud)
• Private Cloud: Cloud infrastructure exclusively used by one organization
• Hybrid Cloud: Combination of public and private clouds
Advantages of Cloud Computing
• Cost Reduction: No need to buy and maintain expensive hardware; pay-as-you-go model
• Scalability: Easily scale up or down resources based on demand
• Accessibility: Access data and applications from anywhere with internet
• Automatic Updates: Cloud providers handle software updates and maintenance
• Disaster Recovery: Built-in backup and recovery solutions
• Collaboration: Multiple users can work on the same files simultaneously
Disadvantages of Cloud Computing
• Internet Dependency: Requires stable internet — no internet = no access
• Security Concerns: Data stored on third-party servers may be at risk of breaches
• Privacy Issues: Sensitive data stored with cloud providers raises privacy concerns
• Vendor Lock-in: Switching between cloud providers can be difficult and expensive
• Downtime: Cloud providers may experience outages affecting business operations
Q49. Short Notes on E-Governance and E-Commerce.
E-Governance (Electronic Governance)
E-Governance is the use of information and communication technology (ICT) by government to deliver
public services, exchange information, communicate with citizens, and improve administrative efficiency.
Goals: Transparency, efficiency, citizen empowerment, cost reduction, and improved service delivery.
Types:
• G2C (Government to Citizen): Online services to citizens — tax filing, passport, driving license
• G2B (Government to Business): Business registration, permits, tax services
• G2G (Government to Government): Sharing information between government departments
Examples in Nepal: Online tax filing (IRD Nepal), online passport application, Nagarik app, Hamro Patro
government services.
Benefits: 24/7 service availability, reduced corruption, less paperwork, faster service, increased
transparency.
E-Commerce (Electronic Commerce)
E-Commerce is the buying and selling of goods and services over the internet. It involves online
transactions between buyers and sellers using websites, mobile apps, and electronic payment systems.
Types:
• B2C (Business to Consumer): Businesses sell to individuals — Daraz, Amazon, eSewa shops
• B2B (Business to Business): Businesses sell to other businesses — wholesale suppliers
• C2C (Consumer to Consumer): Individuals sell to individuals — OLX, Hamrobazar
• C2B (Consumer to Business): Individuals provide services to businesses — freelancers
Examples in Nepal: [Link], Gyapu, SastoDeal, eSewa, Khalti payment.
Advantages: 24/7 availability, global reach, lower costs, convenient shopping, wide product variety.
Disadvantages: Security risks, lack of physical inspection, delivery delays, fraud risks.
Q50. How Can We Minimize Computer Crime?
Computer crime (cybercrime) refers to illegal activities carried out using computers or the internet.
Examples include hacking, phishing, identity theft, virus attacks, cyberbullying, and online fraud.
Ways to Minimize Computer Crime
33. Use Strong Passwords: Create complex passwords with letters, numbers, and symbols. Use
different passwords for different accounts. Enable two-factor authentication (2FA).
34. Install and Update Antivirus Software: Keep antivirus and anti-malware software updated to
detect and remove threats.
35. Keep Software Updated: Regular OS and software updates patch security vulnerabilities that
cybercriminals exploit.
36. Use Firewalls: Install firewalls to monitor and control incoming and outgoing network traffic.
37. Encryption: Encrypt sensitive data so it is unreadable if intercepted.
38. Regular Backups: Back up data regularly so it can be recovered after ransomware attacks.
39. Awareness and Education: Train users to recognize phishing emails, suspicious links, and
social engineering tactics.
40. Cyber Laws: Strong legal frameworks (like Nepal's Electronic Transaction Act) that punish
cybercriminals act as a deterrent.
41. Secure Networks: Use WPA3 encryption for Wi-Fi, avoid public Wi-Fi for sensitive transactions,
use VPN when necessary.
42. Responsible Use: Promote ethical digital behavior through education in schools and
organizations.
Q51. Importance of E-Learning and Importance of Multimedia in E-Learning.
E-Learning (Electronic Learning)
E-Learning is the use of electronic technologies — computers, internet, mobile devices — to deliver
educational content outside of traditional classroom settings.
Importance of E-Learning
• Accessibility: Learn from anywhere, anytime — removes geographical barriers
• Flexibility: Learn at your own pace, on your own schedule
• Cost-Effective: Reduces costs of travel, printed materials, and physical classrooms
• Wider Reach: Can reach millions of learners simultaneously worldwide
• Updated Content: Online courses can be updated instantly with new information
• Personalized Learning: Adaptive systems provide customized learning paths
• Self-Paced: Learners can revisit difficult concepts as many times as needed
Importance of Multimedia in E-Learning
Multimedia refers to the combined use of text, images, audio, video, animations, and interactivity in digital
content.
• Better Understanding: Visual and audio content helps explain complex concepts more clearly than
text alone
• Engagement: Interactive and animated content keeps learners motivated and engaged
• Multiple Learning Styles: Multimedia accommodates visual learners, auditory learners, and
kinesthetic learners
• Retention: Research shows people remember more when information is presented in multiple
formats
• Simulation: Virtual labs and simulations allow hands-on practice in a safe environment
• Accessibility: Audio descriptions and subtitles make content accessible to differently-abled
learners
Q52. Advantages and Disadvantages of Social Media.
Social media refers to internet-based platforms that enable users to create, share, and interact with
content and with each other. Examples: Facebook, Instagram, Twitter/X, TikTok, YouTube, LinkedIn,
WhatsApp.
Advantages of Social Media
• Communication and Connectivity: Connects people globally; maintain relationships with friends
and family across distances
• Information Sharing: News, knowledge, and important updates spread rapidly
• Business and Marketing: Small businesses can reach large audiences at low cost; digital
marketing, e-commerce
• Education: Educational content, tutorials, and online learning communities
• Social Awareness: Campaigns for social causes spread quickly; disaster relief coordination
• Entertainment: Videos, music, games, and creative content
• Career Networking: LinkedIn helps professionals connect and find opportunities
• Political Participation: Citizens engage with politicians and civic issues
Disadvantages of Social Media
• Mental Health Issues: Excessive use linked to anxiety, depression, low self-esteem (especially in
youth)
• Cyberbullying: Harassment, trolling, and abuse happens frequently online
• Privacy Concerns: Personal data is collected and may be misused
• Misinformation and Fake News: False information spreads rapidly and can have serious
consequences
• Addiction: Designed to be addictive; excessive time spent reduces productivity
• Security Risks: Phishing, scams, and identity theft through social media
• Reduced Real-World Interaction: Weakens face-to-face social skills
Q53. Explain Cyber Law and Virtual Reality.
Cyber Law
Cyber Law (also called Internet Law or IT Law) refers to the legal framework that governs activities
conducted on the internet and in cyberspace. It addresses crimes committed using computers and the
internet, and protects individuals, organizations, and governments from cyber threats.
Areas Covered by Cyber Law
• Cybercrime: Hacking, phishing, identity theft, online fraud, cyberstalking — defining these as
crimes and setting penalties
• Data Privacy: Rules on how personal data must be collected, stored, and used
• Intellectual Property: Copyright, trademark, and patent protection for digital content
• E-Commerce: Legal validity of online contracts, digital signatures, and electronic transactions
• Freedom of Expression: Balancing free speech with prevention of harmful content
Cyber Laws in Nepal
• Electronic Transaction Act 2063 (2006): Recognizes digital signatures, defines cybercrimes
(hacking, unauthorized access), sets penalties
• Privacy Act 2075 (2018): Protects personal data and privacy rights
• Telecommunication Act 2053: Regulates digital communications
Virtual Reality (VR)
Virtual Reality (VR) is a computer-generated simulation of a three-dimensional, immersive environment
that a user can interact with using special hardware (VR headsets like Oculus, HTC Vive). The user feels
physically present in the virtual world.
Key Technologies
• VR Headsets: Display separate images to each eye creating 3D depth perception
• Motion Controllers: Track hand and body movements in the virtual world
• Haptic Feedback: Devices that simulate touch sensations
• Room-Scale Tracking: Tracks user movement in a physical space
Applications of Virtual Reality
• Gaming and Entertainment: Immersive gaming experiences, virtual cinemas
• Education and Training: Virtual classrooms, medical training simulations, military training
• Healthcare: Surgical training, phobia treatment (exposure therapy), pain management
• Architecture: Virtual walkthroughs of buildings before construction
• Tourism: Virtual tours of historical sites and destinations
• Business: Virtual meetings, product demonstrations, remote collaboration
📝 Augmented Reality (AR) is related but different: AR overlays digital content on the real world (e.g., Pokémon
Go), while VR creates a completely virtual environment.
EXAM TIPS FOR MAXIMUM MARKS
• Always write a brief definition/introduction at the start of every answer
• Use sub-headings to organize your answer — examiners award marks for structure
• Draw a table for comparisons — it is much easier to score marks than prose
• Include a relevant example for every concept you explain
• For programs/code: Always write the code clearly and add brief comments
• For diagrams: Draw clearly and label every component
• Write a short conclusion or summary at the end of longer answers
• Manage time: Don't spend more than 8-10 minutes on any single question
• Attempt all questions — partial marks are given even for incomplete answers
Good luck with your NEB examination!