Showing posts with label 9. Show all posts
Showing posts with label 9. Show all posts

INTRODUCTION TO DATABASE SYSTEM-Chapter #07-COMPUTER SCIENCE 9TH - Short / Detailed Question Answers

COMPUTER SCIENCE 9TH - Short / Detailed Question Answers

INTRODUCTION TO DATABASE SYSTEM


 Q.1: Define term database system?

Ans: Database:

A database stores data in organized form. Generally, a database is an electronic system that facilitates easy access, manipulation, and updating of data. A database is composed of tables which contain rows and columns. These rows and columns are called records and fields respectively. Most databases contain multiple tables.

For example: A general store database may include tables for purchase, sales, and stock records. Each of these tables has different fields that are relevant to the information stored in the table.

Q.2: Define terms records and fields?

Ans: A database is composed of tables which contain rows and columns. These rows and columns are called records and fields respectively.

Q.3: Describe uses and advantages of database.

Ans: Use of Database:

Nowadays, everyone is familiar with the term database; it is a mathematically developed data structure which converts raw input data into meaningful information for a particular organization. These days, databases can be seen in every field of life, for example in industries, health, agriculture, schooling, business, and banking. The databases can be developed according to the size of its records for a particular organization.

Databases can be small in size with a few records or very large like NADRA (National Database Registration Authority) databases which keep the multi millions of records.

Advantages of Database: A database is playing a leading role to enhance the efficiency and performance of any organization. The goal of a database is to minimize the loss and increase the productivity and efficiency of any organization in the age of information technology.

Q.4: Discuss the use of database in business with example.

Ans: Use of Database in Business:

Businesses use their databases to:

  • Keep track of basic transactions
  • Provide information that will help the company run the business more efficiently
  • Help managers and employees make better decisions

Businesses run on databases. These repositories of organized information can store virtually every kind of data imaginable, and they can sort that information and deliver it to us with a click of a mouse. Business databases help business owners organize and track their customers, inventory, and employees.

Example - Customer Relationship Management: A customer relationship management (CRM) database can help a small business manage the lifeblood of its business – its customers. A CRM database organizes all the information a company has about its accounts, contacts, leads, and opportunities. A single customer's record may include his contact details, the date and amount of his last order, the total amount of his purchases for the last year, a list of his favorite products and the products he returned, details of customer service calls, and more. Databases can also be used to manage marketing and promotions, to export email addresses, and to prepare shipping labels.

Q.5: Describe database management system and name some popular DBMs.

Ans: Database Management System (DBMS):

Databases are usually developed, maintained, and controlled by the Database Management System (DBMS). The DBMS essentially serves as an interface between databases and end users or application programs, ensuring that data is consistently organized and remains easily accessible.

Examples: Here are some examples of popular DBMSs used these days:

  • MySQL
  • Oracle
  • Microsoft SQL Server
  • MongoDB
  • Visual FoxPro
  • IBM Db2
  • PostgreSQL

Q.6: What is the flat file system?

Ans: Flat File System:

Early databases were relatively "flat," which means they were limited to simple rows and columns, like a spreadsheet. A flat file is the older version of a database. It stores data in a single table structure. Flat file databases are usually in plain text format, with only one record per line. The fields included in the record are separated using delimiters such as tabs or commas.


Q.7: Why Database Management System is preferred over Flat File System?

Ans: Advantages of Database Management System over the Flat File System

DBMSFlat File System
Multiple users can access data simultaneouslyOnly one user can access at a time
Capable of handling huge sets of dataSuitable only for smaller sets of data
Allows non-duplication and integrityIncreases duplicate and redundant data
Supports online accessDoes not support remote connections
Good for small, medium, and large businessesLimited only to smaller data management needs

Q.8: Describe the characteristics of database management system.

Ans: Characteristics of Database Management System:

A DBMS is a modern version of database designing, organization, and manipulation. This mainly offers the solutions which a flat file system could not provide. The DBMS has many characteristics. Some of them are:

(i) Multiple users can access DBMS and can view, add, edit, and delete records.

(ii) A DBMS offers tools like Queues, Views, and Forms which help users to manipulate data easily and more efficiently.

(iii) A DBMS is more secure and reliable.

(iv) DBMS allows distribution of data in multiple tables by making use of features like keys and relationships between fields of those tables.

(v) This allows lesser duplication of data and results in lesser redundancy.

(vi) Preparing backups and providing limited permissions to the users are features of DBMS.

(vii) DBMS can handle large and complex data more conveniently. Therefore, it is preferred by medium and large organizations.

Q.9: Define and describe the basic components of DBMS.

Ans: Basic Components of DBMS:

The basic components of DBMS are discussed below:

(i) Table:
It is a collection of data elements organized in the shape of rows and columns. A contact list may be one of the simplest examples of a table. The marks record prepared by a class teacher is also an example of a table.

(ii) Field:
It is the smallest component in a database. It is where the actual data is stored during data entry. All data fields in the same table have unique names. Fields are also called attributes or columns. Multiple fields make up a data record, several data records make up a data record, several data records make up a data table, and several data tables make up a database.

(iii) Record:
A single entry in a table is called a record. Records are also referred to as tuples or rows. A record is made up of two or several data items which are also called tuples in a table representing a set of related data. For example, the given student table has four tuples/records/rows.

(iv) Data Types:
All fields in a table must have some data type. Data type is a data storage format that can contain a specific type or range of values. The data type of a field is a property that tells what kind of data that field can hold. Here are some basic data types.

Data TypeDescriptionExamples
IntegerHolds only whole numbers145, -35, 74586
Floating PointHolds numbers with decimal points5.6, 3.14, 554.9
CharacterStores only one characterA, B, C, D
StringCan store a combination of numbers, letters and special charactersPakistan Computer, @admin
BooleanCan hold only Boolean values i.e. true or false1, 0
Date & TimeStores date and time in specified format01-01-2020 11:30

Different DBMSs offer different range of data types to be stored. For example, MS Access allows a range of whole numbers from -32768 to 32767 for an "Integer". In modern DBMS, choosing proper data type is important to make sure that database runs faster.

(v) View:
In a database, the data is stored in tables. However, we can see that data through views. Views do not store data and just show the information virtually. They have the ability to fetch data from different tables. Views maintain the security of data and ensure that no changes occur in the original data.

Q.10: Why is it important to carefully decide the data type for each field?

Ans:
A data type determines the type of data that can be stored in a database table column. When we create a table, we must decide on the data type to be used for the column definitions. We can also use data types to define variables and store procedure input and output parameters. We must select a data type for each column or variable appropriate for the data stored in that column or variable. In addition, we must consider storage requirements and choose data types that allow for efficient storage.

Choosing the right data types for our tables, stored procedures, and variables not only improves performance by ensuring a correct execution plan, but it also improves data integrity by ensuring that the correct data is stored within a database. The data types of the fields determine what kinds of values we can store in them. If a field should only store a whole number, declaring it as an INTEGER prevents us (or a buggy piece of software) from writing some arbitrary nonsensical string into it, for example.

The data types of the fields also affect what operators and functions we can apply to them in queries. For example, we can take a substring of a string or convert a string to UPPER CASE, but we can't do either of those with a number. On the other hand, we can do arithmetic with numbers (add them, multiply them, etc), calculate the average, and so on.

The data type is also important when we ask the database to sort our result set. If we sort by a numeric column, it will sort numerically (smallest numbers first, or largest first if we specify that it should sort descending). If we sort by a string column, it will sort 'asciibetically' (character by character, with numbers coming before letters, like "apple", "banana", "carrot"; this can give us surprising and usually unhelpful results for strings containing numbers since "9" sorts after "1521", because '1' < '9').

Q.11: Describe the steps for creating a table using design view in MS Access.
Ans:
Steps for creating a table using Design View:

  1. To create tables in Access using "Design View," click on the Create tab and click on the Table icon. Then pull down the View menu and choose Design View.
  2. A new table then appears in the Table Design View. Note that the default name assigned to the table is Table 1.
  3. Type the name of a field into the "Field Name" column.
  4. Then use the drop-down menu in the "Data Type" column to assign the field a data type.
  5. If desired, type a description of the data stored in this field.
  6. Repeat steps 3 to 5 until we have created all of the necessary table fields. An example of a Table may be a customer Table that has the following entries:
Field NameData TypeDescription
Customer IDNumberThe unique identifier for a customer
First NameTextThe first name of the customer
Last NameTextThe last name of the customer
AddressTextThe address of the customer
  1. Click the "Save" button in the Quick Access toolbar.
  2. Then type a name for the newly created table and click "OK."

Q.12: Write down the steps for creating a query of view using Design view in MS Access.
Ans:
Steps for creating a query of view using Design View:

  1. To make a query in design view, click on the "Create" tab in the Ribbon and pull down the "Queries" group and click on "Query Design" button.
  2. In the "Show Table" dialog box, add the table or tables that you want to add to query design view.
  3. Next, add the fields from these tables that we want to view in our query results or view. If we want to add all of the fields of a table into our result set, we can click and drag the first field in the table, shown as an asterisk.
  4. (iv) Once we have added all the necessary tables and fields to the query view, click the "Close" button in the "Show Table" dialog box to close it and display the query design view.
  5. (v) To run a query and view the result set, we can click the "Run" button in the "Results" group of the "Design" tab in the "Query Tools" contextual tab on the office Ribbon.

  6. (vii) Click the "Save" button in the Quick Access toolbar. Type a name for your view and click "OK" to save the query.

  7. (vi) The result set looks like a table. This result set is a deflection of data from the selected fields of the table’s. It is also known as a view.

Q.13: What is the difference between Design View and Datasheet View?
Ans:

Design ViewDatasheet View
Design view allows us to create or change the table, form, or other database object, and configure the fields.Datasheet view shows the data in the database. It also allows us to enter and edit the data. It does not let us change the format of the database, other than minor changes (such as displayed column widths).

Q.14: What is data modeling? Name its important components.
Ans:
Data Modeling:
Data modeling is the process of developing a conceptual representation of data objects and their relations. Data models are used to express how the information will be stored in a database. This helps to identify the most important fields and remove the irrelevant data. Data models can be used by database developers to create a physical database. This saves a lot of time and effort for developers. There are three most important components of data models:

  1. Entity
  2. Relationship
  3. Referential Keys

Q.15: Define relationship and its types.
Ans:
Relationship:
When the database structures grew and became more complex, a lot of data started to become redundant, which means that data was being unnecessarily duplicated. This created a need to connect data entities instead of repeating the same data in multiple tables. This resulted in the creation of relationships and Relational Database Management Systems (RDBMS).
A relationship defines the connection between two tables. It creates a connection from an attribute of one entity with an attribute of another entity. Three types of relationships can be defined between entities.

  1. One to One Relationship:
    This type of relationship defines that a record in one entity can be connected to only one record in another entity. This is not a very common type of relationship because the data from related entities can directly be placed in a single entity. However, this type of relationship is used to divide larger entities into smaller ones.

  2. One to Many Relationship:
    This type of relationship defines that a record in one entity can be connected to many records in another entity. This is the most common type of relationship used in relational databases. This relationship can also be seen as a Many to One Relationship.

  3. Many to Many Relationship:
    In this type of relationship, one or more records of one entity are connected to one or more records of another entity. Usually, a third entity known as a "junction table" is used to create the many-to-many relationship between two related entities.

Q.16: Define entity with examples.
Ans:
Entity:
In a literal sense, an entity is any individual object that has its own qualities and properties. In database terms, an entity is an independent table, and its fields are known as attributes. As an example, a Payroll database will contain an entity named Employees. The Employees entity will contain various attributes like Employee ID, Name, Designation, salary, etc.

Q.17: What are referential keys? Describe its types.
Ans:
Referential Keys:
The relationships are configured by using referential keys on entities. The keys determine a certain set of rules that must be followed by the data stored in a field of an entity. In larger databases, keys are very important to uniquely identify a specific record.

Two types of keys are most commonly used in RDBMSs:

  1. Primary Key:
    A primary key is used to uniquely identify a record in an entity. When a primary key is applied to any attribute in an entity, it enforces the rules of Primary Key onto that attribute. These rules are:

    • The attribute (field) must contain a unique value to identify a record. A unique value means that two records in the same entity cannot have the same value stored in this attribute where Primary Key is applied.
    • The value of the attribute where Primary Key is applied cannot be null.
  2. Foreign Key:
    A foreign key is used to define the connection or relation between two entities. The foreign key of one entity is configured to be connected to the primary key of another entity. When a foreign key is applied on an attribute, it enforces that the value for that attribute should match any record in the related entity having a primary key.

Q.18: Write three benefits of using relationship in the database.
Ans:
A relationship is an important component of a relational database.

  1. It establishes a connection between a pair of tables that are logically related to each other. A pair of tables is logically related via the data each contains.
  2. It helps to further refine table structures and minimize redundant data. As we establish a relationship between a pair of tables, we will inevitably make minor modifications to the table structures. These refinements will make the structures more efficient and minimize any redundant data that the tables may contain.
  3. It is the mechanism that enables us to draw data from multiple tables simultaneously.

A properly defined relationship ensures relationship-level integrity, which guarantees that the relationship itself is reliable and sound.

Q.19: What is Entity Relationship or ER Model?
Ans:
Entity Relationship or ER Model:
Entity Relationship Model (ERM) or Entity Relationship Diagram (ERD) describes the entities, attributes, and relationships with their types in a simplified diagram. This diagram can itself be used as the reference for designing an actual database. It can even be used as a backup for the structure of a database. The ERD can be used in two ways:

  1. When the database has not been created yet. The ERD helps in creating a clear representation of the entire database based on user requirements.
  2. When an existing database needs to be documented. The Database development tool features automatic creation of ERD based on existing database which facilitates documentation.

Q.20: Write steps to design ER Model.
Ans:
Steps to design ER Model:

  1. Identify and design the entities based on the requirements of its users.
  2. Identify and design the attributes within the required entities.
  3. Identify the relationships required between entities.
  4. Design Primary Keys in interrelated entities.
  5. Design Foreign Key relationships based on requirements and bind them to previously created Primary Keys.
  6. Generate an automated Entity Relationship Diagram.

Q.21: Give examples to better understand relationship and referential keys.
Ans:
Understanding Relationship and Referential Keys:

The figure given shows four tables and their fields.

  1. Students table is used to store personal information of individual students. It has an Id field set as a Primary Key. It also has a Class-Id field to set up a One-to-One foreign key relationship with the Class table.

  2. Class table is used to store information about classrooms in a school. It has an Id field set as a Primary Key. A student can be enrolled in only one class; hence, the Students table has a One-to-One relationship with the Class table. However, many teachers can be associated with many classes. This requires a Many-to-Many relationship between Class and Teachers tables.

  3. Teachers table is used to store personal information about a teacher. It has an Id field set as a Primary Key. Many classes can be taught by many teachers. This requires a Many-to-Many relationship between Teachers and Class tables.

  4. TeachersClass table is used as a junction table to facilitate the Many-to-Many relationship between Teacher and Class tables. It also contains an Id field set as Primary Key. The other two fields are used to define which teachers are associated with which classes. It creates a One-to-Many relationship with each of the two connected tables. Teachers and Class tables use their Teachers Class Id field's foreign key relationship to fetch the related information from this table.

Q.22: Describe the components of ER diagram.
Ans:
Components of ER Diagram:

ER Design is made up of different components like attributes, relationships, etc. There are defined symbols and shapes to represent each one of them. Some of the shapes used to define these components are:

SymbolDescription
RectangleA rectangle is used to define an entity. This can be any real-world object like Student, Teacher, Class, etc.
EllipseAn ellipse defines an attribute of an entity. One entity may contain multiple attributes and are defined by multiple ellipses.
DiamondRelationships are symbolically represented by a diamond shape. It simply states the type of relationship between two entities.
Lines with 1 and MConnecting lines show the type of relationship between two entities. These lines are annotated by 1 or M (stands for Many) at their ends to describe the type of relationship.

Q.23: Give an example of ER Model.
Ans:
For example, a sample ERD for the statement "A writer creates a novel and consumer buys novel" is given below.

Here in this example, the diagram shows that:

  • Entities are in rectangular boxes:
    • (1) Writer
    • (2) Consumer
    • (3) Novel
  • Relationships are in diamond shapes:
    • (i) Creates
    • (ii) Buys

The diagram representation is shown as:

  • Writer → Creates → Novel
  • Consumer → Buys → Novel

Q.24: Discuss the importance of ERD in business.
Ans:
(i) Entity relationship diagramming is functional as a method of better visualizing data. Every manager of a multinational enterprise knows that spreadsheets are pretty much useless when it comes to understanding the overall picture of their entity's operations and how they are structured in relation to each other. This is because human beings do not generally learn and process by mere letters and numbers - nearly two-thirds of all human beings learn and memorize visually, through seeing the information presented in an accessible form.

ERD takes advantage of the basic learning strategy that's programmed into our minds by extending the programming into compatible and digestible visualizations of the relationships making up our entity. Software applications that diagram entity relationships are meant to make those relationships come to life on the screen (and in our mind), thus making them much easier to understand.

(ii) It’s only with ERD software that senior management, board, and stockholders will be able to assess the whole business and to plot a viable strategy. Basically, an ERD's function is to bring all of that data stored in our servers to life so we can make sense of it.

An ERD tells a story about our entity's current state. Stories are how we learn the best, so it's also an essential part of how we analyze events and plan for the future. So diagramming should not only show what the current state of affairs is, but it should also show the potential ways structures and organizations within an entity can be altered and the potential effects of these changes. For groups that operate with hundreds or thousands of interconnected entities on a multinational scale, we can see how, without visualization, nothing would make sense.


WEB DEVELOPMENT CHAPTER # 06

 WEB DEVELOPMENT

CHAPTER # 06


Q.1: What is web development?
Ans:
Web Development:
Development of web sites and online applications is called web development. This is done by coding in different languages and by using several web development tools and frameworks. A complete web application may consist of a:

  • User Interface
  • Back-End Server Codes
  • a Database.

Q.2: Define the following terms?
(i) World Wide Web (WWW)
(ii) Web Page
(iii) Website
(iv) Web Browser
(v) Uniform Resource Locator (URL)
(vi) Search Engine
(vii) Home Page
(viii) Web Hosting, (ix) Web Server

Ans:
Definition of Terms:

(i) World Wide Web (WWW):
The word world wide web (www) is commonly known as the web. The Web is a collection of computers connected through a network to provide publicly accessible information.

(ii) Web Page:
A webpage is a document commonly written in HTML that is a

ccessible through the internet by using an internet browser.

(iv) Web Browser:
A web browser is a software application for accessing websites on the world wide web.
Example:
Most common web browsers include Microsoft Internet Explorer, Google Chrome, Mozilla Firefox, and Safari.

(v) Uniform Resource Locator (URL):
It is the address of a resource on the internet.
e.g. (https://www.google.com).

Components of URL:
It includes the following two components.
(a) The protocol used to access the resource (https://)
(b) The location of the server. (www.google.com)

(vi) Search Engine:
A Search Engine is a web-based tool that enables a user to locate information on the web.
Example:
Most popular search engines are Google, Yahoo, and Bing.

(vii) Home Page:
A home page (also known as landing page) is a web page that serves as the starting point of the website.

(viii) Web Hosting:
Web Hosting is a service that allows a web developer to make a website publicly accessible through the internet.

(ix) Web Server:
A web server is the computer that is responsible for serving a website and all of its content including text and media to a user.

(iii) Website:
A website is a collection of web pages containing text, images, and all types of multimedia related to a specific set of information. A website can be accessed through a Uniform Resource Locator (URL).

Q.3: Describe the different types of website?
Ans:
Types of Website:
There are different types of specialized websites such as Portal, News, Informational, Educational, Personal, Business, Blogs, Forums, Entertainment and Social.

(1) Portal:
A web portal is a website that provides a single access point of information for all of its users.
It collects information from different sources like emails, forums, search engines and presents it to the user in a uniform way.
Example:
Yahoo and MSN are common examples of web portals.

(2) News:
A news website is the modern-day alternative for newspapers.
Such websites contain everyday information related to current affairs, sports, politics, weather, health, technology, entertainment, etc.

(3) Informational:
Informational websites provide detailed information of any field.
There are many dedicated informational websites for science, arts, sports, online trainings, research, etc.

(4) Educational:
Educational websites are purely designed to deliver educational material for both, teachers and students.
Example:
sabaq.pk, khan academy.org, etc.

(5) Personal:
A person can share about his or her biography or achievements in a custom developed website.

(6) Business:
A business website is the best way for any organization to market their products and services.
It also tells about the teams, policies and procedures of that business.
For instance:
www.psx.com.pk is the website of Pakistan Stock Exchange.

(7) Blogs:
A blog is a special type of website that is composed of articles and posts.
These articles are organized into categories and sorted by the time when they were published.
Example:
Wordpress is a popular blog site.

(8) Forums:
A forum is an online place where different users can discuss about any topic.
These topics can be categorized so that users can easily locate topics of their interest.

(9) Entertainment:
An entertainment website serves content like videos or games purely for the purpose of entertainment.
Example:
YouTube is widely used for entertainment.

(10) Social:
Social website is a platform where different people get together and socialize with each other.
They can also share their ideas, opinions and media.
Example:
Facebook and Twitter are instances of social networking websites.

Q.4: Define and explain HTML (Hypertext Markup Language)?
Ans:
Hypertext Markup Language (HTML):

  • HTML stands for Hypertext Markup Language.
  • It is standard markup language for text documents.
  • HTML is used to create web pages that are displayed by web browsers mainly on the internet.
  • HTML consists of a series of elements. These elements tell the browser how to display the content.
  • It allows the user to create structured content by adding headings, paragraphs, links, blockquotes and other media.
  • It takes advantage of simple code structures called tags and attributes to achieve formatting, graphic and navigation effects on web pages.

Q.5: What are the various steps involved in creating a web page?
Ans:
Requirements:
Creating a simple web page using HTML is very easy.
It requires:

  1. A text editor
  2. A file with .html extension and
  3. A web browser to view that page.

Steps Involved In Creating Web Page In HTML
Step 1: Text Editor (e.g. Notepad):

  • Start by simply creating a new blank file in a text editor of your choice.
  • A simple text editor like notepad can be used to start coding HTML for a web page.

Step 2: Write HTML code in Text Editor
Example:

(An image of HTML code is shown)

Example Explained:

  • The <html> element is the root element of an HTML page.
  • The <head> element contains meta information about the HTML page.
  • The <title> element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab).
  • The <body> element defines the document's body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.

Step 3: Save HTML Page:

  • Go to the File menu and click on Save.
  • Make sure to provide .htm or .html extension for the file being saved.
  • This will save the document as a web page instead of a plain text file.

(Images illustrating the steps are shown)

  1. Example HTML code in Notepad.
  2. "Save As" dialog box with instructions to give any name followed by .htm or .html.
  3. Saved HTML file icon with a note: "Rather than text file it will save as web page because the file extension is .htm or .html."
Step 4: View HTML Page in Browser:
  • Open the saved HTML file in your default web browser.
  • The web browser will automatically translate HTML codes to correctly display the web page.

(Image showing a browser with labeled parts)

  • File name and destination
  • Title
  • Browser
  • Web page

Q.6: Define and explain HTML tags?
Ans: HTML Tags:

  • HTML elements are the building blocks of HTML pages.
  • These elements are defined by placing HTML tags in our document.
  • These tags are placed inside angular brackets (< >). Here < is called opening (start) tag and > is called closing (end) tag.
  • Most of HTML tags always require a closing tag while some HTML tags such as empty tags which mean that they don't require a closing tag.
  • Some tags also allow further customization by adding attributes to them.

HTML Tag Structure:
An HTML tag has the following structure:

Simple Tag:
<tag-name>content</tag-name>

Tag with Attribute:
<tag-name attribute-name= “attribute value”>content</tag-name>

Explanation: The above syntaxes show:

  • the structure of opening a tag,
  • defining attribute values,
  • placing content inside the element represented by that tag and
  • its closing structure.

Q.7: Identify and explain HTML tags used for designing and formatting of the content?
Ans: HTML Tags For Designing and Formatting of The Content: Some HTML tags introduce content directly into the web page while others enhance the design and format of that content.
Some most commonly used HTML tags which change the looks of the web page are:

TAGDESCRIPTION
<!DOCTYPE html>- It specifies the HTML version used so the web browsers can show the web page according to HTML standards.
- All HTML documents must start with this tag.
<html>- All HTML documents start with <html> tag and end with </html> tag.
<head>- It is used to define additional information about the web page.
- It contains a set of tags such as <title>, <meta>, <style>, <script>, etc.
<body>- The main content of the web page is contained between <body> and </body>.

Titles and Footers:

TAGDESCRIPTION
<title>- It defines the title of a web page.
- Titles are very important as they appear on top of the browser window and displayed on search engine result pages.
<footer>- It defines the footer for a web page. e.g. “Copyright 2020. All rights reserved.”

Paragraphs and Line Breaks:

TAGDESCRIPTION
<p>- It defines a paragraph of text in a webpage.
- It always starts from a new line and adds space before and after its text.
<br>- It defines a line break and starts the following content from a new line.
- Unlike <p> tag, it does not add space before or after the break.
<hr>- It draws a horizontal line where it is defined.
- It is used to differentiate between sections of the page.

Headings:

TAGDESCRIPTION
<h1> - <h6>- It is used to define six levels of HTML headings (h1, h2, h3, h4, h5, and h6) with <h1> being the heaviest heading and <h6> being the lightest heading.

Text Formatting:

TAGDESCRIPTION
<b>, <i>, <u>- These tags are used to bold, italicize, and underline text respectively.
<pre>- It is used to define a preformatted text.
- The web browser displays such text with spaces and line breaks as defined in HTML codes.
<font>- It is used to define the font, size, and color of its text.
- This tag can be composed with three attributes: size, color, and face.
- This tag is supported till version 4.1 of HTML.
<center>- It is used to align its text to the horizontal center of the web page.
- This tag is supported till version 4.1 of HTML.
<sub>- It defines subscript text which is under the baseline of other text and has a smaller size.
- e.g. H₂O
<sup>- It defines superscript text which is slightly above the normal line of other text and has a smaller size.
- e.g. E=mc²

Example:

html
<html> <head> <title>My Website</title> </head> <body> <h1>Evolution of Computer</h1> <p>The computers which we see today are modern shape of computers which has been evolved in centuries. The evolution of computers is generally divided in three eras.</p> <h2>Mechanical Era (Dark Age)</h2> <p>Men has been trying to invent machines that can solve mathematical problems. In mechanical era, human became successful to make simple machine that can help performing simple arithmetic operation, in other words computing. These machines were manually operated since the electricity was not invented.<br> <b>Some of the important machines of this era are:</b><br> <i>Abacus, Napier's bones (1612 AD), Slide Rule (1622 AD), etc.</i> </p> </body> </html>

Output:

(Screenshot of a webpage showing the HTML output with headers, paragraphs, bold text, and italic text as described in the HTML code above.)

Q.8: Define HTML lists? How many types of lists can be created in HTML?

Ans: HTML Lists:

  • HTML lists allow web developers to group a set of related items in lists.
  • Lists are very useful in displaying point-by-point information such as:
    • to-do list,
    • list of ingredients for a recipe,
    • list of categories, etc.

Types of Lists in HTML:

HTML provides three different types of list elements namely:

  1. Unordered Lists
  2. Ordered Lists
  3. Description Lists

... and there is another list type known as: 4. Nested List (list inside a list)

The web browsers automatically add indents, spaces, and markers to HTML lists.

(1) Unordered List:

  • An unordered list is a list of related items in which the order of items is irrelevant.
  • It is defined by <ul> tag, and each of its list items is defined by <li> tag.
  • The web browser will display these list items as bullet points.

Example:

html
<h5>Commonly used components of Microsoft Office</h5> <ul> <li>Word</li> <li>Excel</li> <li>PowerPoint</li> <li>Access</li> </ul>

Output:

(Screenshot of a webpage showing the unordered list with bullet points: Word, Excel, PowerPoint, Access)

(2) Ordered List:

  • An ordered list also displays a list of related items.
  • It is used where the order of the list is important e.g. names of students in order of their exam ranks.
  • It is defined by <ol> tag and each of its list items is defined by <li>.
  • The web browser will display these list items with numbers starting from 1 instead of bullet points. Ordered lists can also be defined with two of its attributes: start and reversed.
    • Start attribute defines the starting number of the first list item.
    • Reversed attribute is used to display the list in descending order.
  • The list items for an ordered list can also be defined with a value attribute which is used to place that item at a specific position or number in the list.

Example:

html
<h5>Steps to create HTML file</h5> <ol> <li>Text Editor</li> <li>New File</li> <li>HTML codes</li> <li>Save as .html</li> </ol>

Output:

(Screenshot of a webpage showing an ordered list with numbers: Text Editor, New File, HTML codes, Save as .html)

(3) Description List:

  • Description lists are used to display different terms and their descriptions just like in a dictionary or glossary.
  • It is defined by <dl> tag and each of its list items is composed of two elements: term and description.
    • Term is defined by <dt> tag and its description is defined by <dd> tag.
  • In description lists, a term can have one or more descriptions and a description can have one or more terms.

Example:

html
<dl> <dt>Operating System</dt> <dd>An Operating System is software which performs all the basic tasks like boots the computer, file management, memory management, process management, and controlling peripheral devices such as hard disk, printer, etc.</dd> </dl>

4) Nested Lists:

  • HTML lists can be nested i.e. list inside list. Such lists are called nested lists.
  • A very powerful feature of HTML lists is their ability to nest one into another.
  • Any of the list types can contain any other list type as its list item.
  • It is defined by placing the new list tag inside the <li> tag of the previous list.
  • Web browsers automatically indent nested lists and assign appropriate markers to those nested list items as well.

Example:

html
<h5>Guided Media</h5> <ul> <li>Twisted Pair Cable <ul> <li>Unshielded Twisted Pair</li> <li>Shielded Twisted Pair</li> </ul> </li> <li>Coaxial Cable</li> <li>Fiber Optical Cable</li> </ul>

Output:

(Screenshot of a webpage showing a nested list with items: Guided Media, Twisted Pair Cable (with nested items Unshielded Twisted Pair and Shielded Twisted Pair), Coaxial Cable, and Fiber Optical Cable)

Q.9: How are images displayed in an HTML page?
Ans: Image:

  • Images give a visual appeal to the websites.
  • Sometimes images can present a better understanding than long and uninteresting texts.
  • Inserting Images in an HTML Page:
    • Images can be inserted in an HTML document by using <img> tag.
    • This does not create a copy of the image. Instead, it only creates a reference to the original image placed somewhere in the computer's storage.
    • The <img> tag is an empty tag which means that it does not require a closing </img> tag.
    • It contains five attributes out of which two are required and three are optional.

Attributes of Image Tag:

AttributeValueDescription
srcURLDefines the source or reference of the image file.
Syntax: <img src="image.jpg">
alttextDefines alternate text for the image.
Syntax: <img src="image.jpg" alt="Introduction">
widthpixelsDefines the display width of the image.
Syntax: <img src="image.jpg" width="300">
heightpixelsDefines the display height of the image.
Syntax: <img src="image.jpg" height="120">
borderpixelsDefines the width of the border to be displayed around the image.
(This attribute is supported till version 4.1 of HTML).
Syntax: <img src="image.jpg" border="2">
Example:
html
<!DOCTYPE html> <html> <body> <img src="bridge.jpg" alt="Bridge" width="600"> </body> </html>

OR

html
<img src="bridge.jpg" alt="Bridge" width="600">

Output:

(Image displayed with the specified width and alternate text)

Q.10: How can the background colour change in HTML?
Ans: Backgrounds:

  • Backgrounds also give a visual appeal to websites.
  • The web browsers display an HTML document with a white background by default. However, this can easily be changed to a different color or even an image with the help of bgcolor and background attributes of the <body> tag.

Background Attributes:

  • bgcolor:

    • This attribute is used to change the color of the entire web page.
    • Its color value can be defined as RGB code, hexadecimal code, or by color name.
    • For instance, to set the background color of the web page to green, we can use any one of these values: rgb(0,255,0), #00FF00, or green.
    • Example: <body bgcolor="green">
  • background:

    • This attribute is used to display an image as the background of the web page.
    • Its value will be the reference or URL of the background image.
    • Example: <body background="image.jpg">
    • (This attribute is supported till version 4.1 of HTML).

Q.11: Define a hyperlink? How can we create a hyperlink to an external web page or within the same web page in HTML?
Ans: Hyperlinks:

  • Hyperlinks allow a user to navigate from one web page to another.
  • It also enables users to navigate to different sections within the same web page.
  • Hyperlinks convert text or other media into clickable objects.
  • Definition:
    A hyperlink in HTML is defined by <a> tag and its href attribute. The value of href is the reference of another web page or a different section within the same page.

Links to external document:

  • To send a user to any other web page, use the URL of that page as the value for href attribute.
    • e.g. <a href="http://www.google.com">Goto Google</a>

Links within the same document:

Setting the link within the same page requires two steps:

  1. Use id attribute of any HTML tag to give a name to the section of the page, where a user should reach after clicking on the link.
  2. Create a hyperlink and set the above name as href attribute of this link, starting with hash (#) symbol.
    e.g. <p id="navigate">Send user here on click</p> <a href="#navigate">Go to the linked paragraph</a>

Attributes of Hyperlink Tag

AttributeValueDescription
hrefURLSpecifies the URL or section id of the page the link goes to.
nameSection NameSpecifies the name of an anchor. This attribute works till version 4.1 of HTML.
target_blank: _parent: _self: _top: framenameSpecifies where to open the linked document.

Q.12: Define term table and differentiate between rows and columns? Also describe formatting features and attributes of tables?
Ans: TABLES:

  • Tables allow displaying the content (like text, image, links) in the form of rows and columns.
  • The coordinating place of a row with a column is called a cell.
  • These cells contain some content of the webpage.
  • In HTML, a table is defined by <table> tag.

ROWS AND COLUMNS:

Rows:

  • A row is the collection of all horizontal cells of a table.
  • A table can contain any number of rows.
  • All the rows in a table have an equal number of cells.
  • It is defined by <tr> tag which is placed inside the <table> tag.

Columns:

  • A column is the collection of all vertical cells of a table.
  • A table can contain any number of columns as well.
  • It is defined by <td> tag which is placed inside the <tr> row tag.

FORMATTING FEATURES OF TABLE:

Table Heading:

  • HTML table allows defining a header for the columns of our table.
  • A header cell is defined by <th> tag and is placed inside a <tr> row tag.
  • It is used to differentiate from the content placed inside normal <td> data cells.
  • To make the entire header row stand out from the rest of the table contents, defined <th> tags for all columns of the first <tr> row tag of any <table> tag.

Table Data:

  • The content is placed inside a cell in a table by using <td> table data tag.
  • A cell can contain any type of data such as text, image, media, link, etc.

Table Attributes:

AttributeValueDescription
alignleft: center: rightSpecifies the alignment of a table according to surrounding text.
widthpixels: %Specifies the width of a table.
border1 or 0Enables or disables the border around the table.
cellpaddingpixelsSpecifies the space between the edge of cell and the content inside.
cellspacingpixelsSpecifies the space between cells.

All the above attributes are supported till version 4.1 of HTML.

Cell Attributes:

AttributeValueDescription
alignleft: center: rightSpecifies the alignment of the content inside the cell.
valigntop: middle: bottom: baselineVertically aligns the content in a cell.
colspannumberSpecifies the number of columns a cell should merge into.
rowspannumberSets the number of rows a cell should merge into.

All the above attributes are supported till version 4.1 of HTML.

Note: In example: (.html document will always written as:

html
<!DOCTYPE html> <html> <body> <h5>Heading here </h5> <table>Table content here</table> </body> </html>:

Example:

html
<h5>Minimum Requirements for Windows</h5> <table width="100%" border="1" cellspacing="5" cellpadding="5"> <tr> <th>Component</th> <th>Requirement</th> </tr> <tr> <td>Processor:</td> <td>1GHz (Minimum 1 Gigahertz)</td> </tr> <tr> <td>Memory:</td> <td>1GB for 32-bit or 2GB for 64-bit</td> </tr> <tr> <td>Storage:</td> <td>32GB Free Space</td> </tr> <tr> <td>Graphics Card:</td> <td>DirectX 9 or later with WDDM 1.0 driver</td> </tr> <tr> <td>Display:</td> <td>800x600 resolution</td> </tr> </table>

Output:

The output image shows a table titled "Minimum Requirements for Windows" with columns for "Component" and "Requirement" and rows listing Processor, Memory, Storage, Graphics Card, and Display requirements.

Q.13: Define a frame and framesets? Also describe their attributes in HTML?

Ans: FRAMES:

  • HTML frames are powerful elements that allow displaying the contents of another HTML document within a web page.
  • A web page can be divided into multiple sections, and each section can display all contents from a different web page by using frames.
  • It is defined by <frame> tag.
  • The src attribute is used to provide the reference URL of another web page to be displayed in this frame.
AttributeValueDescription
srcURLDefines the URL of the page which should be displayed in the frame.
marginheightpixelsDefines top and bottom spaces of a frame.
marginwidthpixelsDefines left and right spaces of a frame.
noresizenoresizeDefines if the user can change the frame size or not.
scrollingyes/no/autoDefines if the scroll bar should be displayed within the frame or not.

HTML frames and framesets are supported till version 4.1 of HTML.

FRAMESETS:

  • Framesets define how a web page is divided into rows and columns to display multiple frames on that web page.
  • It is defined by <frameset> tag and contains one or more <frame> tags.
AttributeValueDescription
colspixels/%Defines the number and the size of frame columns.
rowspixels/%Defines the number and the size of frame rows.

Q.14: List out some popular text editor and other different tools which help in designing and development of website?

Ans: Web Designing Tools:

Following is the list of some of the tools that help in designing and developing a website:

  • Microsoft FrontPage
  • Coral Draw
  • Adobe Dreamweaver
  • Wordpress
  • Microsoft Visual Studio
  • Wix
  • Figma
  • CoffeeCup HTML Editor
  • Adobe XD


COMPUTER SECURITY AND ETHICS CHAPTER # 05- Short / Detailed Question Answers

 COMPUTER SCIENCE 9TH - Short / Detailed Question Answers

COMPUTER SECURITY AND ETHICS
CHAPTER # 05


Q.1: What do you know about computer security?
Ans:
Computer Security:
"Computer security is the protection against theft or damage to our computer hardware, software and information present on them from threat of viruses or unauthorized use."

Explanation:
The computer has become an important part of our life. We store important data on our computers in the shape of documents, pictures, programs, etc. Therefore, we expect that all our information must remain safe and our computer runs properly without any problem.
Few threats can cause problems for our computers. These threats may be different types of viruses or unauthorized use of a computer. To prevent our computer from such threats, we need to abide by computer security.

Q.2: Why is computer security important? Write any three reasons.
Ans:
Importance of Computer Security:

  1. Prevent from viruses and malware:

    • Computer security is important for our computer's overall health.
    • It keeps our information protected and helps prevent viruses and malware, which allows programs to run quicker and smoother.
  2. Secure Private Information:

    • It safeguards confidential and sensitive information.
    • The advancement in science and technology has changed day-to-day activities. We rely on computers and mobile phones, where we access a lot of information which we do not want to share with others. This information may include our passwords, banking details, contacts, pictures, etc. To protect this information we need to make our devices secured that no one can damage or access this information without our consent.
  3. Provide Safe Environment:

    • Computer Security is important as it enables people to perform their work in safe environments.
    • It helps in the execution of essential business processes.

Q.3: Explain Cyber Bullying with an example.
Ans:
Cyber Bullying or Harassment:
Cyber bullying or harassment is a type of cyber-crime in which electronic means like a computer, mobile phone or internet are used for online bullying or harassment.

Example:
Harmful bullying behavior can include:

  • Posting rumors
  • Threats
  • Passing inappropriate remarks
  • Leaking personal information
  • Blackmailing and
  • Committing hate speech

Effect of Cyber Bullying or Harassment On Victim:

  • The perpetrator does it with the intent to cause harm to the victim.
  • Victims may experience lower self-esteem, intent to commit suicide and a variety of negative emotional responses, including being scared, frustrated, angry and depressed.

Q.4: Write a short note on cybercrime.
Ans:
Cybercrime:
As communication, trade, and services are relying more on computers and networks. The cybercrimes are growing too. Cybercrime is the crime that is committed through a computer and network. Cybercriminal uses devices to gain unauthorized access to important information. As Stealing passwords and important information, hacking social media accounts, accessing any individual bank account and making transactions, committing online frauds are some of the examples of cybercrime.
Cybercrime is illegal and also punishable. According to Pakistan's Cybercrime Law, any offender who interrupts the privacy of a person or organization and harms their repute may be sent to jail for three to five years including a heavy fine.

Q.5: Define malware? And describe different types of malware?
Ans:
Malware:

  • The term malware is the contraction of malicious software.
  • Malware is a broad term that encompasses computer viruses, worms, spyware, adware and others.
  • Malware is a program that is written generally to cause a mess. They can be so dangerous that they can also damage devices.
  • However, commonly malware encrypt, steal or delete data, hijack core functions of computing and disturb different activities.

Q.6: Who is a hacker?
Ans:
Hackers:
Hacker can be a person who has in-depth knowledge of computer systems, networks and programs. A hacker is someone who uses his or her extensive skills to identify and overcome a network loophole. Hackers constantly seek further knowledge and freely share what they have discovered. Hackers are generally considered as bad people however, hackers can also help us to improve the data and network security. Government and business organizations are now hiring ethical hackers, also known as white hat hackers, to prevent data theft.

Q.7: What is ethical hacking?
Ans:
Ethical Hacking:
Ethical Hacking sometimes called as Penetration Testing is an act of intruding / penetrating into system or networks to find out threats, vulnerabilities in those systems which a malicious attacker may find and exploit causing loss of data, financial loss or other major damages. The purpose of ethical hacking is to improve the security of the network or systems by fixing the vulnerabilities found during testing. Ethical hackers may use the same methods and tools used by the malicious hackers but with the permission of the authorized person for the purpose of improving the security and defending the systems from attacks by malicious users.

Ethical hackers are expected to report all the vulnerabilities and weaknesses found during the process to the management.

Q.8: Who is a cracker?
Ans:
Crackers:
Crackers are persons who gain unauthorized access to another system. They bypass passwords or licenses of computer programs, change source code or intentionally breach computer security. They do it with negative intentions. Crackers can also make targeted system unavailable or non-functional. They commit these activities generally for money but they may do it for fame or just for challenge or fun.

Q.9: Describe computer crime in real life.
Ans:
Computer Crime in Real Life:
As technology is growing the data security has become so crucial. We can be a victim of computer crime at any time. Computer crime can range from an international data security threat to a personal offense. In 2013, hackers managed to hack 1 billion email accounts of the users. Likewise, in 2017, the Wanna Cry virus attacked the National Health Service in the United Kingdom which made the whole system non-functional for several days. As far as personal offenses are concerned, hacking the social media and mail accounts are so common. There are many genres of computer crime or now called cyber-crimes. Some examples of such crime in real life are discussed here.

(i) Hacking:
Hacking is perhaps the most common crime in the computer world. Hackers can steal our WiFi, email or social media accounts passwords. Hackers also attack a website and take it down. However, the scope of hacking is much wider. The hackers can also steal sensitive information from government and business organizations, make fraudulent transactions and erase data on the cloud or network computers.

(ii) Credit and Debit Card Scam:
Keeping debit or credit cards is a common practice but insecure use of these cards can be dangerous. If a person has information about our debit or credit card he or she can make fraudulent transactions. There are various ways to get this information. One way is through scamming. Scammers set small machines inside an ATM or credit card machine. These machines copy the data which is then misused by the scammers. Debit and credit cards are also secured with PIN codes.

User has to keep this code secret otherwise any person can use the card for online shopping and other purposes. All he or she needs to know our credit card number, PIN and security code printed on the back of the cards.

(iii) Phishing:
Phishing is a method of trying to gather personal information using false e-mails and websites. In phishing, perpetrators contact the target person through email, telephone or text message and pose as a legitimate and trusted individual. He or she asks the target to provide sensitive data such as personally identifiable information.

(iv) Clickjacking:
If we see video tagged as "OMG? You won't believe what this boy has done!" or we find a button on a website that asked to click to claim a reward we had never applied for? This is a kind of fraud which is called Clickjacking. Usually, culprits target children or novice internet users to click on a link containing malware or trick them into sharing private information via social media sites.

(v) Cyber Bullying or Harassment:
Electronic means like a computer, mobile phone or internet are also used for online bullying or harassment. Harmful bullying behaviour can include posting rumors, threats, passing inappropriate remarks, leaking personal information, blackmailing and committing hate speech. The perpetrator does it with the intent to cause harm to the victim. Victims may experience lower self-esteem, intent to commit suicide and a variety of negative emotional responses, including being scared, frustrated, angry and depressed.

Q.10: Your friend has become a victim of cyber harassment. What two advices will you give him or her?
Ans:
Pakistan is in the list of the fastest-growing countries that are using the internet. This opens the doors for the fact that cyber bullying is increasing as well but yet there is no legislation for cybercrimes in Pakistan.

If my friend becomes the victim of cyber harassment, I will give him advice that

  1. Write down an application (in English or in Urdu), describe complete problem, provide as much evidence, details as he/she can and send it to FIA National Response Center for Cyber Crimes.

  2. The Citizens-Police Liaison Committee (CPLC) has set up a women complaint cell aimed at dealing with women harassment issues across the country. Complaints can be made on these numbers: 021-35662222, 021-35682222.

Q.11: What is cyber-attack?
Ans:
Cyber Attack:
Cyber-attack occurs when a cyber criminal uses a computer or any device to launch attacks to other single or multiple computer networks. The culprit tries to enter in a computer system and network through cracking, scam links, phishing or any other method. Generally cyber-attacks are committed for getting any benefit or causing harm to the victim computer, network or websites. A cyber-attack either disables the targeted computer, deletes information or knocks it offline. It may also steal information from the computer or network.

Q.12: Give two examples of phishing.
Ans:
Example 1:
There are targeted and simple forms of phishing emails designed to get victims to purchase cards, or to give up personal email or phone numbers. The "email compromise" gets its name because the attacker mimics the email of a known sender. However, these can also be sent through a legitimate, albeit hacked account. The messages start out by basic greetings then progress into requests for money or data. Since the content is highly personalized it's often easy to get hooked.

Example 2:
There are targeted and simple forms of phishing emails designed to get victims to interact and establish a rapport. The messages start out as basic greetings or job opportunities and then progress into requests for money or data.

Q.13: What will you do in case of becoming a victim of computer cyber-crime?
Ans:
The perpetrator of cyber-crime always asks to keep his or her contact secret otherwise the victim may face heavy loss. The response of the victim of cyber-crime, bullying or harassment is very crucial. There are ways to get rid of such miseries. First thing is to report such incidents to the trusted people that are highly likely parents and teachers.

The government has also taken measures to curb cybercrimes especially cyber bullying and harassment. In Pakistan, the National Response Centre for Cyber Crimes has been set up to help the victims of cybercrimes. An online complaint can be launched through the form available on the website or help may be sought by calling helpline 9911 which is available 24/7.

Q.14: Define malware.
Ans:
Malware:
The term malware is the contraction of malicious software. Malware is a broad term that encompasses computer viruses, worms, spyware, adware and others. Malware is a program that is written generally to cause a mess. They can be so dangerous that they can also damage devices. However commonly malware encrypt, steal or delete data, hijack core functions of computing and disturb different activities.

Q.15: Describe the different types of malware.
Ans:
Different Malware:
Types of malware can include computer viruses, worms, adware and spyware.

(i) Computer Virus:
A computer virus is a computer program that can spread across computers and networks by making copies of itself, usually without the user's knowledge. It can also modify other computer programs, insert its own code and change computer settings. Viruses are harmful. They can range from displaying irritating messages to make the documents inaccessible or even delete them. Viruses generally latch on a host file and when they execute they infect other files or programs. Boot Sector, Resident, Macro Viruses and File Infector are some examples of viruses.

(ii) Worm:
A computer worm spreads copies of itself from computer to computer. A worm can replicate itself without any human interaction. It does not need to attach itself to a file or program to cause damage. It can do several malicious tasks, such as dropping other malware, copying itself onto devices physically attached to the affected system, deleting files and consuming internal storage and memory resources.

(iii) Adware:
Adware is advertising-supported software. They present endless ads and pop-up windows that could potentially consume memory and processing resources. Adware can also change the different settings of internet browsers like homepage and default search engine. Normally, these are not as dangerous as other malware.

However, Adware annoys the user and slows down the processing. The advertisements produced by adware are sometimes in the form of a pop-up or sometimes in little windows that may not be closed. Adware programs include games, desktop toolbars or utilities. Commonly, adware is web-based and collects web browser data to target advertisements, especially pop-ups.

(iv) Spyware:
Spyware is a malware that monitors a device and steals important information about a person or organization without their consent and sends such information to another person or organization. Spyware takes control over a mobile phone or computer without the user's knowledge. They capture information like web browsing history, email messages, usernames and passwords and online payment information. Spyware can come through cookies or even when we install software without reading its terms and conditions. System monitors, cookies trackers, rootkits and key-loggers are few examples of Spyware.

Q.16: Describe the ways of viruses spread.
Ans:
Ways of Viruses Spread:
A computer virus is just like a flu virus. It is designed to spread from one device to another device and can replicate itself. Any device that is infected from a virus can infect other devices. It means that viruses come from outside. Here are some ways how they come:

(i) USB Flash Disk and CDs:
USB Flash Disks are the most common media to transfer files. An infected computer can spread a virus to a clean USB flash disk that is inserted and likewise, an infected USB can transmit the virus onto a clean computer. The Auto Run function in Windows as launches installers and other programs automatically when a flash drive or CD is inserted. This action can initiate a virus spreading process onto the computer. Copying infected files from the USB or CD can also infect the computer.

(ii) Internet Downloads:
Computer viruses also spread through files or software downloads from the Internet. They can be attached to software or files that we download. The viruses come from the internet can also make our computer accessible to hackers.
Though, almost every antivirus software provides a shield against malicious downloads, it is highly recommended that the software and files must be downloaded from trusted sources.

(iii) Computer Network:
Users must be careful because files picked from a Local Area Network (LAN) may be infected and cause damage to our computer or operating system. The some can happen to transfer files from one mobile device to another mobile device via Bluetooth etc.

(iv) Email Attachments:
Email attachments have been a popular medium to spread viruses. Viruses can easily be transferred from one computer to another through email attachments. The infected email may come from an unknown or fake email address. Perpetrators who spread these viruses use either fake email or change a few letters in a trusted email address. People in our contact list may also send us infected files as they may not be aware of it themselves. Users must check the origin of the email before opening the attached files or clicking any link that is given in the email. Especially spam mails must be checked carefully before clicking on its attachment.

Q.17: Define antivirus software. Describe some antivirus software.
Ans:
Antivirus:
Antivirus are utility software designed to protect computers from any potential threats of data or hardware loss. It is highly recommended that the user must install an antivirus on an operating system like Windows. Antivirus software works in the background and monitors every software that is running and the emails or data coming from the internet.
In case of any suspicious activity, antivirus alerts the user and asks for action. Normally, antivirus tries to clean the files and if not succeeded it quarantines the infected files. It is highly recommended that the user should update the antivirus regularly. Many antivirus software can be found on the internet and most of them are generally free. However, in the free version of antivirus, some advanced features are not available. Paid customers are called premier users and they get advance security features.

(i) Avast:
Avast is one of the largest security companies in the world, Avast's management claims that they are using next-gen technologies to fight cyber-attacks in real time. They also claim that Avast has an immense cloud-based machine learning engine that receives a constant stream of data from hundreds of millions of users. This facilitates learning at extraordinary speeds and makes artificial intelligence engine smarter faster to stop viruses.

(ii) Norton:
Norton Antivirus has been a popular antivirus utility since 1991. This is a part of a large family of security and other utility software by Semantic Corporation. Norton Antivirus is easy to use, has the configuration options that experts need, comes highly rated by the testing labs and is exactly designed to have the least possible impact on our system performance.

(iii) McAfee:
McAfee claims that it provides a combination of antivirus, privacy and identity tools and features. This enables users to stay protected against the latest virus, malware, ransomware and spyware attacks while keeping their identity and privacy protected and personal.

Q.18: Write down some safeguards against malware.
Ans:
Safeguard against Malware:
Keeping ourselves safe from malware and viruses is mostly in our hands. More than 90% of computers are infected due to the user's mistake. Our computers have caught a virus if they start slowing down, behave unusually, crash during processes or restart several times, show annoying messages and some of our documents disappear or become inaccessible. We must avoid this situation to be created. Some simple measures can prevent our system from malware and viruses.

  • Install anti-virus software and keep it updated.
  • Run scheduled scans regularly with any anti-virus software.
  • Keep our operating system updated.
  • Do not click on internet links which have unusual labels, images or captions.
  • Do not open email attachments or click on hyperlinks from unknown senders.
  • Scan USB flash drive, SD cards and mobile phones before opening.
  • Use spam blocking or filtering tools to block unsolicited emails, instant messages and pop-ups.
  • Only download files and programs from trusted source on the Internet.
  • Never use an open Wi-Fi.

Q.19: Describe some steps to recover data.
Ans:
Keeping the Backup of Data:
Besides this, we should also take some measures to recover data from any potential loss. Some steps in this regard are:

  • Create a system restore point regularly and check if it is not disabled.
  • Write important data on CDs or DVDs. Since they are write-protected, they do not catch viruses.
  • Have the back-up of important files at more than one place.
  • We can also have documents on cloud storage like Google Drive and Microsoft One Drive.

Q.20: Define authentication mechanism.
Ans:
Authentication Mechanism:
The authentication mechanism is the hardware or software-based mechanic that forces users to prove their identity before accessing data on a device. The process makes sure the only authenticated user gets access to data or devices.

Q.21: Describe the types of security mechanism.
Ans:
Types of Security Mechanism:
There are many ways a computer secured system may authenticate a user. Some of them are:

(i) Username and Password:
A username and a password are the pair of keyboard known by the user. They are presents to the computer to authenticate the user. Usernames and passwords are the default authentication mechanism on the web today.
However, recent large scale computer attacks have made usernames and passwords an unacceptable authentication mechanism. Additional authentication mechanisms are needed to fully authenticate.

(ii) Personal Identification Number:
PIN stands for Personal Identification Number. It is a security code for verifying our identity. Similar to a password, our PIN should be kept secret because it allows access to important services such as financial transactions and confidential emails. The PIN provides security when a credit/debit card is lost or stolen because the PIN must be known before making money withdrawal or transfer.

(iii) Biometric Verification:
Unlike authentication processes, biometrics verification makes sure that the real person gets access to the data or device. Biometric authentication relies on the unique biological characteristics of a person. Biometric authentication systems capture details in real-time and compare it with existing data in the database. If both samples of the diametric data match, authentication is confirmed. Scanning fingerprints are the most common way of biometric. However, some other advanced ways include retinal scans and iris, facial and voice recognitions.

Q.22: Describe personal ethics in computer field.
Ans:
Personal Ethics in Computer Field:
Professional ethics involve the personal and corporate principles and rules that guide behaviors within the context of a profession. The role of a professional code of ethics is to clarify values and rules and can be used as a framework for discipline.

Computing professionals' actions change the world. To act responsibly, they should reflect upon the wider impacts of their work, consistently supporting the public good.

Here are some guiding principles:

  • Contribution to society and human well-being, acknowledging that all people are stakeholders in computing.
  • People are stakeholders in computing.
  • Be honest and trustworthy.
  • Respect the equipment.
  • Avoid causing any harm.
  • Be fair and act not to discriminate, bully or harass.
  • Respect the work required to produce new ideas, inventions, creative works, and computing artifacts.
  • Respect privacy and maintain confidentiality.
  • Maintain high standards of professional competence, conduct and ethical practice.
  • Create opportunities for other individuals or groups to grow as professionals.
  • Manage personnel and resources to enhance the quality of work life.
  • Ensure that the public good is the central concern during all professional computing work.
  • Access computing and communication resources only when authorized.
  • Foster public awareness and understanding of computing, related technologies and their consequences.

Q.23: Define information accuracy. Why is information accuracy important?
Ans:
Information Accuracy:
The information accuracy is the type of measurement that assures the information is correct and true. It is also necessary that the information should not be generated from the malicious data. For information accuracy, the data must be from reputable sources. In the era of information explosion, we need to be more careful while using or disseminating information. The use of unreliable sources results in inaccurate information. Especially, the accuracy of information shared on social media is often questionable.

Q.24: What is an intellectual property right?
Ans:
Intellectual Property Right:
When any person develops software, writes a book or research paper or invents any method or the machine, it becomes the intellectual property of that person. Intellectual property is intangible creations of the human intellect. Just like other property the intellectual property can be stolen. To prevent theft or illegal use or spread of intellectual property, Intellectual Property Right is exercised. Through these rights, intellectual property is protected with the help of copyrights, patents, and trademarks.

They allow creators or owners of patents, trademarks or copyrighted works to benefit from their work or investment. Under these rights, no other person or organization can copy or reproduce any other's intellectual property. Intellectual property rights are acclaimed worldwide. In Pakistan, Intellectual Property Organization (IPO) regulates the matters regarding intellectual property rights.

Q.25: Describe patent, copyright and trademark.
Ans:

(i) Patent:
A patent is a grant of exclusive rights for an invention to make, use and sell the invention for a limited period, in Pakistan 20 years. Owning a patent gives the patent holder the right to stop someone else from making, using or selling his or her invention without permission. To protect students and scholars, the Higher Education Commission also offers support to get patents registered with Intellectual Property Organization (IPO). The patentable process or invention must be novel, possess inventive steps and can be used in industries.

(ii) Copyright:
Copyright is a legal instrument that provides legal rights to the creator of artwork, literature, or a work that conveys information or ideas. In simple words, copyright is the right of copying. Copyright gives control over how the work is used. Copyright intends to advance the progress of knowledge by giving an author of a work an economic incentive to create new works. The © sign is also often displayed on copyrighted objects.

(iii) Trademark:
Trademark identifies a product or services and distinguishes it from other products and services. Trademarks are protected by intellectual property rights which identifies that the product or service belongs to a specific organization. It can be an easily recognizable word, phrase, logo, or symbol and often mentioned as TM (Trade Mark). Trademark helps organizations to market their products and services locally and globally. Developing trademarks is creative work and can be done professionally. There are many software available for developing trademarks.

Q.26: What do you know about software piracy?
Ans:
Software Piracy:
Software piracy is referred to the illegal use, copying or distribution of copyrighted software. Software piracy is a huge threat to the software industry. It causes a significant loss of revenue for developers and vendors. Because of piracy, vendors have fewer resources to devote to research and development of new products. Since they earn less profit, they are forced to pass these costs on to their customers.

Software companies have tried various techniques to stop software piracy but most of them have remained unsuccessful. They applied for copy-protection which demands the user to enter keys or credentials. Today, most software requires registration which is mainly online. However, these measures could not stop software piracy.

Using pirated software is also risky for users. Aside from the legal consequences of using pirated software, users of pirated software lose some practical benefits as well. Pirated software may not work properly or stop working at any time. Furthermore, pirated software users cannot access customer support, upgrades, technical documentation, training and bug fixes.

Q.27: Write few lines about plagiarism.
Ans:
Plagiarism:
Plagiarism is presenting someone else's work or ideas as your own without full acknowledgment to the author or conceiver. Academic honesty demands that the users of any ideas, words and data should acknowledge the originators. Plagiarism is unethical and can have serious consequences. College and universities encourage students to submit their original work and cite the ideas and words borrowed from any other sources. Failing to this may cause serious penalties. There are online services to check and fix the plagiarism issues. Academic organizations hire the plagiarism detection service. One of the most user services is Turnitin.