Professional Documents
Culture Documents
COMPUTER NETWORK
2. INTRODUCTION TO JAVA
3. INTRODUCTION TO HTML
4. OPERATING SYSTEM
5. COMPUTER SOFTWARES
6. CRYPTOGRAPHY AND MULTIMEDIA
COMPUTER DEPARTMENT
D.A.V ALOK PUBLIC SCHOOL, PUNDAG, RANCHI
Introduction To Computer Networks
Today the world scenario is changing. Data Communication and network have changed
the way business and other daily affair works. Now, they rely on computer networks and
internetwork. A set of devices often mentioned as nodes connected by media link is
called a Network. A node can be a device which is capable of sending or receiving data
generated by other nodes on the network like a computer, printer etc. These links
connecting the devices are called Communication channels.
Computer network is a telecommunication channel through which we can share our
data. It is also called data network. The best example of computer network is Internet.
Computer network does not mean a system with control unit and other systems as its
slave. It is called a distributed system
A network must be able to meet certain criteria, these are mentioned below:
1. Performance
2. Reliability
3. Scalability
Performance
It can be measured in following ways :
Transit time : It is the time taken to travel a message from one device to another.
Response time : It is defined as the time elapsed between enquiry and response.
1. Efficiency of software
2. Number of users
3. Capability of connected hardware
Reliability
It decides the frequency at which network failure take place. More the failures are, less
is the network's reliability.
Security
It refers to the protection of data from the unauthorised user or access. While travelling
through network, data passes many layers of network, and data can be traced if
attempted. Hence security is also a very important characteristic for Networks.
Source
Data to be transmitted is generated by this device, example: telephones, personal
computers etc.
Transmitter
The data generated by the source system are not directly transmitted in the form they
are generated. The transmitter transforms and encodes the information in such a form
to produce electromagnetic waves or signals.
Transmission System
A transmission system can be a single transmission line or a complex network
connecting source and destination.
Receiver
Receiver accepts the signal from the transmission system and converts it to a form
which is easily managed by the destination device.
Destination
Destination receives the incoming data from the receiver.
Data Communication
The exchange of data between two devices through a transmission medium is Data
Communication. The data is exchanged in the form of 0’s and 1’s. The transmission
medium used is wire cable. For data communication to occur, the communication
device must be part of a communication system. Data Communication has two types
Local and Remote which are discussed below:
Local:
Local communication takes place when the communicating devices are in the same
geographical area, same building, face-to-face between individuals etc.
Remote:
Remote communication takes place over a distance i.e. the devices are farther.
Effectiveness of a Data Communication can be measured through the following
features:
BUS Topology
Bus topology is a network type in which every computer and network device is
connected to single cable. When it has exactly two endpoints, then it is called Linear
Bus topology.
1. It is cost effective.
2. Cable required is least compared to other network topology.
3. Used in small networks.
4. It is easy to understand.
5. Easy to expand joining two cables together.
Disadvantages of Bus Topology
RING Topology
It is called ring topology because it forms a ring as each computer is connected to
another computer, with the last one connected to the first. Exactly two neighbours for
each device.
1. A number of repeaters are used for Ring topology with large number of nodes,
because if someone wants to send some data to the last node in the ring topology
with 100 nodes, then the data will have to pass through 99 nodes to reach the 100th
node. Hence to prevent data loss repeaters are used in the network.
2. The transmission is unidirectional, but it can be made bidirectional by having 2
connections between each Network Node, it is called Dual Ring Topology.
3. In Dual Ring Topology, two ring networks are formed, and data flow is in opposite
direction in them. Also, if one ring fails, the second ring can act as a backup, to keep
the network up.
4. Data is transferred in a sequential manner that is bit by bit. Data transmitted, has to
pass through each node of the network, till the destination node.
1. Transmitting network is not affected by high traffic or by adding more nodes, as only
the nodes having tokens can transmit data.
2. Cheap to install and expand
STAR Topology
In this type of topology all the computers are connected to a single hub through a cable.
This hub is the central node and all others nodes are connected to the central node.
Features of Star Topology
MESH Topology
It is a point-to-point connection to other nodes or devices. All the network nodes are
connected to each other. Mesh has n(n-1)/2 physical channels to link n devices.
There are two techniques to transmit data over the Mesh topology, they are :
1. Routing
2. Flooding
Routing
In routing, the nodes have a routing logic, as per the network requirements. Like routing
logic to direct the data to reach the destination using the shortest distance. Or, routing
logic which has information about the broken links, and it avoids those node etc. We
can even have routing logic, to re-configure the failed nodes.
Flooding
In flooding, the same data is transmitted to all the network nodes, hence no routing logic
is required. The network is robust, and the its very unlikely to lose the data. But it leads
to unwanted load over the network.
Types of Mesh Topology
1. Partial Mesh Topology: In this topology some of the systems are connected in the
same fashion as mesh topology but some devices are only connected to two or
three devices.
2. Full Mesh Topology: Each and every nodes or devices are connected to each
other.
1. Fully connected.
2. Robust.
3. Not flexible.
1. Heavily cabled.
2. Costly.
3. If more nodes are added maintenance is difficult.
4. Central hub fails, network fails.
HYBRID Topology
It is two different types of topologies which is a mixture of two or more topologies. For
example if in an office in one department ring topology is used and in another star
topology is used, connecting these topologies will result in Hybrid Topology (ring
topology and star topology).
1. Complex in design.
2. Costly.
Advantages and Disadvantages of Computer Networking
Computer networking has become one of the most successful ways of sharing
information, where all computers are wirelessly linked together by a common network.
Now, businesses and organizations heavily rely on it to get messages and information
across to essential channels. Not only has that it benefited establishments, but also
individuals, as they also need to share important information every day. But no matter
how useful computer networking is, it does not come without drawbacks. Here are its
advantages and disadvantages:
4. It is highly flexible.
This technology is known to be very flexible, as it gives users the opportunity to explore
everything about essential things, such as software without affecting their functionality.
Plus, people will have the accessibility to all information they need to get and share.
5. It is an inexpensive system.
Installing networking software on your device would not cost too much, as you are
assured that it lasts and can effectively share information to your peers. Also, there is
no need to change the software regularly, as mostly it is not required to do so.
3. It lacks robustness.
As previously stated, if a computer network’s main server breaks down, the entire
system would become useless. Also, if it has a bridging device or a central linking
server that fails, the entire network would also come to a standstill. To deal with these
problems, huge networks should have a powerful computer to serve as file server to
make setting up and maintaining the network easier.
Terms Definition
1. ISO The OSI model is a product of the Open Systems Interconnection project at the
International Organization for Standardization. ISO is a voluntary organization.
2. OSI Model Open System Interconnection is a model consisting of seven logical layers.
3. TCP/IP Model Transmission Control Protocol and Internet Protocol Model is based on four layer
model which is based on Protocols.
4. UTP Unshielded Twisted Pair cable is a Wired/Guided media which consists of two
conductors usually copper, each with its own colour plastic insulator
5. STP Shielded Twisted Pair cable is a Wired/Guided media has a metal foil or braided-
mesh covering which encases each pair of insulated conductors. Shielding also
eliminates crosstalk
7. LAN Local Area Network is designed for small areas such as an office, group of
building or a factory.
8. WAN Wide Area Network is used for the network that covers large distance such as
cover states of a country
9. MAN Metropolitan Area Network uses the similar technology as LAN. It is designed to
extend over the entire city.
10. Crosstalk Undesired effect of one circuit on another circuit. It can occur when one line picks
up some signals travelling down another line. Example: telephone conversation
when one can hear background conversations. It can be eliminated by shielding
each pair of twisted pair cable.
11. PSTN Public Switched Telephone Network consists of telephone lines, cellular networks,
satellites for communication, fiber optic cables etc. It is the combination of world’s
(national, local and regional) circuit switched telephone network.
12. File Transfer, Standard mechanism to access files and manages it. Users can access files in a
Access and remote computer and manage it.
Management (FTAM)
13. Analog The signal is continuously variable in amplitude and frequency. Power requirement
Transmission is high when compared with Digital Transmission.
this technology you can develop distributed application. A Java language developed at SUN Micro
Systems in the year 1995 under the guidance of James Gosling and their team. In other word It is
a programming language suitable for the development of web applications. It is also used for
Java language developed at SUN Micro Systems in the year 1995 under the guidance of James
Gosling and there team. Originally SUN Micro Systems is one of the Academic University
Whatever the software developed in the year 1990, SUN Micro Systems has released on the name
of oak, which is original name of java (scientifically oak is one of the tree name). The OAK has
The oak is unable to fulfill all requirements of the industry. So James Gosling again reviews this
oak and released with the name of java in the year 1995. Scientifically java is one of the coffee
seed name.
Java divided into three categories, they are
J2SE (Java 2 Standard Edition)
J2EE (Java 2 Enterprise Edition)
J2ME (Java 2 Micro or Mobile Edition)
J2SE
J2SE is used for developing client side applications.
J2EE
J2EE is used for developing server side applications.
J2ME
J2ME is used for developing mobile or wireless application by making use of a predefined protocol
called WAP (wireless Access / Application protocol).
Basic Points of Java
Define byte
Byte code is the set of optimized instructions generated during compilation phase and it is more
Define JRE
The Java Runtime Environment (JRE) is part of the Java Development Kit (JDK). It contains a
set of libraries and tools for developing Java application. The Java Runtime Environment provides
Define JVM
JVM is set of programs developed by sun Micro System and supplied as a part of the JDK for
reading line by line line of byte code and it converts into a native understanding form of operating
system. The Java language is one of the compiled and interpreted programming language.
Garbage Collector
The Garbage Collector is the system Java program which runs in the background along with a
regular Java program to collect un-Referenced (unused) memory space for improving the
Note: Java programming does not support destructor concept in place of destructor, we have
Define an API
other words if any language is providing user friendly syntax, we can develop error free
applications.
Definition of JIT
JIT is the set of programs developed by SUN Micro System and added as a part of JVM, to speed
Centralized Applications
Distributed Applications
Centralized applications
The major drawback in this architecture is if any problem occurred on server system that will be
In this scenario multiple client system are depends on multiple server system so that even problem
Java is a very powerful language can be used to developed both client server architecture and
Simple
Platform Independent
Architectural Neutral
Portable
Multi-Threading
Distributed
Networked
Robust
Dynamic
Secured
High Performance
Interpreted
Object Oriented
1. Simple
2. Platform Independent
A program or technology is said to be platform independent if and only if which can run on all
available operating systems with respect to its development and compilation. (Platform represents
O.S).
3. Architectural Neutral
A Language or Technology is said to be Architectural neutral which can run on any available
processors in the real world without considering their development and compilation.
If any language supports platform independent and architectural neutral feature known as portable.
The languages like C, CPP, Pascal are treated as non-portable language. It is a portable language.
5. Multithreaded
A flow of control is known as a thread. When any Language executes multiple thread at a time that
6. Distributed
Using this language we can create distributed applications. RMI and EJB are used for creating
distributed applications. In distributed application multiple client system depends on multiple server
systems so that even problem occurred in one server will never be reflected on any client system.
Note: In this architecture same application is distributed in multiple server system.
7. Networked
It is mainly designed for web based applications, J2EE is used for developing network based
applications.
8. Robust
Simply means of Robust are strong. It is robust or strong Programming Language because of its
capability to handle Run-time Error, automatic garbage collection, the lack of pointer concept,
9. Dynamic
It supports Dynamic memory allocation due to this memory wastage is reduce and improve
performance of the application. The process of allocating the memory space to the input of the
memory space by dynamically we use an operator called 'new' 'new' operator is known as dynamic
10. Secure
It is a more secure language compared to other language; In this language, all code is covered in
This language uses Bytecode which is faster than ordinary pointer code so
Performance of this language is high.
Garbage collector, collect the unused memory space and improve the performance
of the application.
It has no pointers so that using this language we can develop an application very
easily.
It support multithreading, because of this time consuming process can be reduced
to executing the program.
12. Interpreted
Application of Java
Java is widely used in every corner of world and of human life. Java is not only used in softwares but
is also widely used in designing hardware controlling software components. There are more than
930 million JRE downloads each year and 3 billion mobile phones run java.
Following are some other usage of Java :
4. Embedded Systems
What is JVM?
Java virtual Machine(JVM) is a virtual Machine that provides runtime environment to execute java
byte code. The JVM doesn't understand Java typo, that's why you compile your *.java files to
obtain *.class files that contain the bytecodes understandable by the JVM.
JVM control execution of every Java program. It enables features such as automated exception
handling, Garbage-collected heap.
JVM Architecture
JDK : The JDK also called Java Development Kit is a superset of the JRE, and contains everything
that is in the JRE, plus tools such as the compilers and debuggers necessary for developing applets
and applications.
First Java Program
Let us look at a simple java program.
class Hello
After compiling when you will try to run the byte code(.class file), the following steps are
performed at runtime:-
1. Class loader loads the java class. It is subsystem of JVM Java Virtual machine.
2. Byte Code verifier checks the code fragments for illegal codes that can violate access right to the
object.
3. Interpreter reads the byte code stream and then executes the instructions, step by step.
Decision Making Statement in Java
Decision making statement statements is also called selection statement. That is depending on
the condition block need to be executed or not which is decided by condition. If the condition is
"true" statement block will be executed, if condition is "false" then statement block will not be
if
if-else
switch
if-then Statement
if-then is most basic statement of Decision making statement. It tells to program to execute a certain
if(condition)
Statement(s)
Example if statement
class Hello
{
int a=10;
public static void main(String[] args)
{
if(a<15)
{
System.out.println("Hello good morning!");
}
}
}
Output
if-else statement
In general it can be used to execute one block of statement among two blocks, in java
if(condition)
Statement(s)
else
Statement(s)
........
In the above syntax whenever condition is true all the if block statement are executed, remaining
statement of the program by neglecting. If the condition is false else block statement executed and
Example if else
import java.util.Scanner;
class Oddeven
{
public static void main(String[] args)
{
int no;
Scanner s=new Scanner(System.in);
System.out.println("Enter any number :");
no=s.nextInt();
if(no%2==0)
{
System.out.println("Even number");
}
else
{
System.out.println("Odd number");
}
}
}
Output
10
Even number
Looping Statement in Java
Looping statement are the statements execute one or more statement repeatedly several number
of times. In java programming language there are three types of loops; while, for and do-while.
When you need to execute a block of code several number of times then you need to use looping
Conditional statement executes only once in the program where as looping statements executes
While loop
In while loop first check the condition if condition is true then control goes inside the loop body
otherwise goes outside of the body. while loop will be repeats in clock wise direction.
Syntax
while(condition)
Statement(s)
class whileDemo
{
public static void main(String args[])
{
int i=0;
while(i<5)
{
System.out.println(+i);
i++;
}
Output
for loop
for loop is a statement which allows code to be repeatedly executed. For loop contains 3 parts
statement(s);
}
Initialization: This step is execute first and this is execute only once when we are
entering into the loop first time. This step is allow to declare and initialize any loop
control variables.
Condition: This is next step after initialization step, if it is true, the body of the loop
is executed, if it is false then the body of the loop does not execute and flow of control
goes outside of the for loop.
Increment or Decrements: After completion of Initialization and Condition steps
loop body code is executed and then Increment or Decrements steps is execute. This
statement allows to update any loop control variables.
Flow Diagram
class Hello
{
public static void main(String args[])
{
int i;
for (i=0: i<5; i++)
{
System.out.println("Hello Friends !");
}
}
}
Output
Hello Friends !
Hello Friends !
Hello Friends !
Hello Friends !
Hello Friends !
do-while
A do-while loop is similar to a while loop, except that a do-while loop is execute at least one time.
A do while loop is a control flow statement that executes a block of code at least once, and then
repeatedly executes the block, or not, depending on a given condition at the end of the block (in
while).
When we need to repeat the statement block at least one time then ues do-while loop. In do-while
loop post-checking process will be occur, that is after execution of the statement block condition
do
Statement(s)
}while();
In below example you can see in this program i=20 and we chech condition i is less than 10, that
means conditon is false but do..while loop execute onec and print Hello world ! at one time.
class dowhileDemo
{
public static void main(String args[])
{
int i=20;
do
{
System.out.println("Hello world !");
i++;
}
while(i<10);
}
}
Output
Hello world !
Example do..while loop
class dowhileDemo
{
public static void main(String args[])
{
int i=0;
do
{
System.out.println(+i);
i++;
}
while(i<5);
}
}
Output
5
HTML Introduction
What is HTML?
HTML is the standard markup language for creating Web pages.
</body>
</html>
Try it Yourself »
Example Explained
The <!DOCTYPE html> declaration defines this document to be HTML5
The <html> element is the root element of an HTML page
The <head> element contains meta information about the document
The <title> element specifies a title for the document
The <body> element contains the visible page content
The <h1> element defines a large heading
The <p> element defines a paragraph
HTML Tags
HTML tags are element names surrounded by angle brackets:
Tip: The start tag is also called the opening tag, and the end tag the closing
tag.
Web Browsers
The purpose of a web browser (Chrome, IE, Firefox, Safari) is to read HTML
documents and display them.
The browser does not display the HTML tags, but uses them to determine how
to display the document:
HTML Page Structure
Below is a visualization of an HTML page structure:
<html>
<head>
<title>Page title</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>
Note: Only the content inside the <body> section (the white area above) is
displayed in a browser.
The <!DOCTYPE> Declaration
The <!DOCTYPE> declaration represents the document type, and helps
browsers to display web pages correctly.
It must only appear once, at the top of the page (before any HTML tags).
<!DOCTYPE html>
HTML Versions
Since the early days of the web, there have been many versions of HTML:
Version Year
HTML 1991
XHTML 2000
HTML5 2014
HTML Editors
Write HTML Using Notepad or TextEdit
Web pages can be created and modified by using professional HTML editors.
However, for learning HTML we recommend a simple text editor like Notepad
(PC) or TextEdit (Mac).
Follow the four steps below to create your first web page with Notepad or
TextEdit.
Open the Start Screen (the window symbol at the bottom left on your screen).
Type Notepad.
Windows 7 or earlier:
Then under "Open and Save", check the box that says "Ignore rich text
commands in HTML files".
<!DOCTYPE html>
<html>
<body>
</body>
</html>
Name the file "index.htm" and set the encoding to UTF-8 (which is the
preferred encoding for HTML files).
You can use either .htm or .html as file extension. There is no difference, it is
up to you.
HTML Documents
All HTML documents must start with a document type declaration: <!DOCTYPE
html>.
The HTML document itself begins with <html> and ends with </html>.
The visible part of the HTML document is between <body> and </body>.
Example
<!DOCTYPE html>
<html>
<body>
</body>
</html>
Try it Yourself »
HTML Headings
HTML headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important
heading:
Example
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
Try it Yourself »
HTML Paragraphs
HTML paragraphs are defined with the <p> tag:
Example
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
Try it Yourself »
HTML Links
HTML links are defined with the <a> tag:
Example
<a href="https://www.w3schools.com">This is a link</a>
Try it Yourself »
HTML Images
HTML images are defined with the <img> tag.
The source file (src), alternative text (alt), width, and height are provided as
attributes:
Example
<img src="w3schools.jpg" alt="W3Schools.com" width="104" height="142">
Try it Yourself »
HTML Elements
An HTML element usually consists of a start tag and end tag, with the content
inserted in between:
The HTML element is everything from the start tag to the end tag:
<br>
HTML elements with no content are called empty elements. Empty elements do
not have an end tag, such as the <br> element (which indicates a line break).
Example
<!DOCTYPE html>
<html>
<body>
Try it Yourself »
Example Explained
The <html> element defines the whole document.
<html>
<body>
</body>
</html>
The element content is two other HTML elements (<h1> and <p>).
<body>
</body>
Example
<html>
<body>
<p>This is a paragraph
<p>This is a paragraph
</body>
</html>
Try it Yourself »
The example above works in all browsers, because the closing tag is considered
optional.
<br> is an empty element without a closing tag (the <br> tag defines a line
break).
Empty elements can be "closed" in the opening tag like this: <br />.
HTML5 does not require empty elements to be closed. But if you want stricter
validation, or if you need to make your document readable by XML parsers, you
must close all HTML elements properly.
HTML Attributes
All HTML elements can have attributes
Attributes provide additional information about an element
Attributes are always specified in the start tag
Attributes usually come in name/value pairs like: name="value"
<!DOCTYPE html>
<html lang="en-US">
<body>
...
</body>
</html>
The first two letters specify the language (en). If there is a dialect, use two
more letters (US).
Example
<p title="I'm a tooltip">
This is a paragraph.
</p>
Try it Yourself »
Example
<a href="https://www.w3schools.com">This is a link</a>
Try it Yourself »
You will learn more about links and the <a> tag later in this tutorial.
Size Attributes
HTML images are defined with the <img> tag.
The filename of the source (src), and the size of the image (width and height)
are all provided as attributes:
Example
<img src="w3schools.jpg" width="104" height="142">
Try it Yourself »
The image size is specified in pixels: width="104" means 104 screen pixels
wide.
You will learn more about images and the <img> tag later in this tutorial.
The value of the attribute can be read by screen readers. This way, someone
"listening" to the webpage, e.g. a blind person, can "hear" the element.
Example
<img src="w3schools.jpg" alt="W3Schools.com" width="104" height="142">
Try it Yourself »
Or vice versa:
HTML Headings
Headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important
heading.
Example
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
Try it Yourself »
Note: Browsers automatically add some white space (a margin) before and
after a heading.
Users skim your pages by its headings. It is important to use headings to show
the document structure.
<h1> headings should be used for main headings, followed by <h2> headings,
then the less important <h3>, and so on.
Note: Use HTML headings for headings only. Don't use headings to make
text BIG or bold.
HTML Horizontal Rules
The <hr> tag defines a thematic break in an HTML page, and is most often
displayed as a horizontal rule.
The <hr> element is used to separate content (or define a change) in an HTML
page:
Example
<h1>This is heading 1</h1>
<p>This is some text.</p>
<hr>
<h2>This is heading 2</h2>
<p>This is some other text.</p>
<hr>
Try it Yourself »
The <head> element is a container for metadata. HTML metadata is data about
the HTML document. Metadata is not displayed.
The <head> element is placed between the <html> tag and the <body> tag:
Example
<!DOCTYPE html>
<html>
<head>
<title>My First HTML</title>
<meta charset="UTF-8">
</head>
<body>
.
.
.
Try it Yourself »
Note: Metadata typically define the document title, character set, styles, links,
scripts, and other meta information.
HTML Paragraphs
The HTML <p> element defines a paragraph:
Example
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
Try it Yourself »
Note: Browsers automatically add some white space (a margin) before and
after a paragraph.
HTML Display
You cannot be sure how HTML will be displayed.
Large or small screens, and resized windows will create different results.
With HTML, you cannot change the output by adding extra spaces or extra lines
in your HTML code.
The browser will remove any extra spaces and extra lines when the page is
displayed:
Example
<p>
This paragraph
contains a lot of lines
in the source code,
but the browser
ignores it.
</p>
<p>
This paragraph
contains a lot of spaces
in the source code,
but the browser
ignores it.
</p>
Try it Yourself »
Example
<p>This is a paragraph.
<p>This is another paragraph.
Try it Yourself »
The example above will work in most browsers, but do not rely on it.
Note: Dropping the end tag can produce unexpected results or errors.
Use <br> if you want a line break (a new line) without starting a new
paragraph:
Example
<p>This is<br>a paragraph<br>with line breaks.</p>
Try it Yourself »
The <br> tag is an empty tag, which means that it has no end tag.
The Poem Problem
This poem will display on a single line:
Example
<p>
My Bonnie lies over the ocean.
Try it Yourself »
Example
<pre>
My Bonnie lies over the ocean.
Try it Yourself »
HTML Styles
Example
I am Red
I am Blue
I am Big
Try it Yourself »
<tagname style="property:value;">
Example
<body style="background-color:powderblue;">
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
Try it Yourself »
HTML Text Color
The color property defines the text color for an HTML element:
Example
<h1 style="color:blue;">This is a heading</h1>
<p style="color:red;">This is a paragraph.</p>
Try it Yourself »
HTML Fonts
The font-family property defines the font to be used for an HTML element:
Example
<h1 style="font-family:verdana;">This is a heading</h1>
<p style="font-family:courier;">This is a paragraph.</p>
Try it Yourself »
Example
<h1 style="font-size:300%;">This is a heading</h1>
<p style="font-size:160%;">This is a paragraph.</p>
Try it Yourself »
Example
<h1 style="text-align:center;">Centered Heading</h1>
<p style="text-align:center;">Centered paragraph.</p>
Try it Yourself »
HTML Tables
HTML Table Example
Company Contact Country
Try it Yourself »
Each table row is defined with the <tr> tag. A table header is defined with
the <th> tag. By default, table headings are bold and centered. A table
data/cell is defined with the <td> tag.
Example
<table style="width:100%">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
Try it Yourself »
Note: The <td> elements are the data containers of the table.
They can contain all sorts of HTML elements; text, images, lists, other tables,
etc.
Example
table, th, td {
border: 1px solid black;
}
Try it Yourself »
Remember to define borders for both the table and the table cells.
Example
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
Try it Yourself »
HTML Table - Adding Cell Padding
Cell padding specifies the space between the cell content and its borders.
If you do not specify a padding, the table cells will be displayed without
padding.
Example
th, td {
padding: 15px;
}
Try it Yourself »
Example
th {
text-align: left;
}
Try it Yourself »
To set the border spacing for a table, use the CSS border-spacing property:
Example
table {
border-spacing: 5px;
}
Try it Yourself »
Note: If the table has collapsed borders, border-spacing has no effect.
Example
<table style="width:100%">
<tr>
<th>Name</th>
<th colspan="2">Telephone</th>
</tr>
<tr>
<td>Bill Gates</td>
<td>55577854</td>
<td>55577855</td>
</tr>
</table>
Try it Yourself »
Example
<table style="width:100%">
<tr>
<th>Name:</th>
<td>Bill Gates</td>
</tr>
<tr>
<th rowspan="2">Telephone:</th>
<td>55577854</td>
</tr>
<tr>
<td>55577855</td>
</tr>
</table>
Try it Yourself »
HTML Table - Adding a Caption
To add a caption to a table, use the <caption> tag:
Example
<table style="width:100%">
<caption>Monthly savings</caption>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$50</td>
</tr>
</table>
Try it Yourself »
Note: The <caption> tag must be inserted immediately after the <table> tag.
Example
<table id="t01">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
Now you can define a special style for this table:
table#t01 {
width: 100%;
background-color: #f1f1c1;
}
Try it Yourself »
Try it Yourself »
Computer - Software
Software is a set of programs, which is designed to perform a well-defined
function. A program is a sequence of instructions written to solve a particular
problem.
System Software
Application Software
System Software
The system software is a collection of programs designed to operate, control,
and extend the processing capabilities of the computer itself. System
software is generally prepared by the computer manufacturers. These
software products comprise of programs written in low-level languages,
which interact with the hardware at a very basic level. System software
serves as the interface between the hardware and the end users.
Fast in speed
Difficult to design
Difficult to understand
Less interactive
Smaller in size
Difficult to manipulate
Application Software
Application software products are designed to satisfy a particular need of a
particular environment. All software applications prepared in the computer
lab can come under the category of Application software.
Payroll Software
Microsoft Word
Microsoft Excel
Microsoft PowerPoint
Easy to design
More interactive
Slow in speed
Generally written in high-level language
Easy to understand
1. User's View
2. System View
User View:
The user view of the computer refers to the interface being used. Such systems are
designed for one user to monopolize its resources, to maximize the work that the user is
performing. In these cases, the operating system is designed mostly for ease of use, with
some attention paid to performance, and none paid to resource utilization.
System View:
Operating system can be viewed as a resource allocator also. A computer system
consists of many resources like - hardware and software - that must be managed
efficiently. The operating system acts as the manager of the resources, decides between
conflicting requests, controls execution of programs etc.
1. Processor management which involves putting the tasks into order and pairing them
into manageable size before they go to the CPU.
2. Memory management which coordinates data to and from RAM (random-access
memory) and determines the necessity for virtual memory.
3. Device management which provides interface between connected devices.
4. Storage management which directs permanent data storage.
5. Application which allows standard communication between software and your
computer.
6. User interface which allows you to communicate with your computer.
In this type of system, there is no direct interaction between user and the computer.
The user has to submit a job (written on cards or tape) to a computer operator.
Then computer operator places a batch of several jobs on an input device.
Jobs are batched together by type of languages and requirement.
Then a special program, the monitor, manages the execution of each program in the
batch.
The monitor is always in the main memory and available for execution.
In this the operating system, picks and begins to execute one job from memory.
Once this job needs an I/O operation operating system switches to another job (CPU
and OS always busy).
Jobs in the memory are always less than the number of jobs on disk(Job Pool).
If several jobs are ready to run at the same time, then system chooses which one to
run (CPU Scheduling).
In Non-multiprogrammed system, there are moments when CPU sits idle and does
not do any work.
In Multiprogramming system, CPU will never be idle and keeps on processing.
Time-Sharing Systems are very similar to Multiprogramming batch systems. In fact time
sharing systems are an extension of multiprogramming systems.
In time sharing systems the prime focus is on minimizing the response time, while in
multiprogramming the prime focus is to maximize the CPU usage.
MULTIPROCESSOR SYSTEMS
A multiprocessor system consists of several processors that share a common physical
memory. Multiprocessor system provides higher computing power and speed. In
multiprocessor system all processors operate under single operating system. Multiplicity
of the processors and how they do act together are transparent to the others.
Following are some advantages of this type of system.
1. Enhanced performance
2. Execution of several tasks by different processors concurrently, increases the
system's throughput without speeding up the execution of a single task.
3. If possible, system divides task into many subtasks and then these subtasks can be
executed in parallel in different processors. Thereby speeding up the execution of
single tasks.
DISTRIBUTED OPERATING SYSTEMS
The motivation behind developing distributed operating systems is the availability of
powerful and inexpensive microprocessors and advances in communication technology.
These advancements in technology have made it possible to design and develop
distributed systems comprising of many computers that are inter connected by
communication networks. The main benefit of distributed systems is its low
price/performance ratio.
Following are some advantages of this type of system.
1. As there are multiple systems involved, user at one site can utilize the resources of
systems at other sites for resource-intensive tasks.
2. Fast processing.
3. Less load on the Host Machine.
Interpreter
Interpreter is a translator which is used to convert programs in high-level language to
low-level language. Interpreter translates line by line and reports the error once it
encountered during the translation process.
It directly executes the operations specified in the source program when the input is
given by the user.
It gives better error diagnostics than a compiler.
Differences between compiler and interpreter
Assembler
Assembler is a translator which is used to translate the assembly language code into
machine language code.
Programming Language
Definition of language
A language is defined as the medium of expression of thoughts. All the human beings in this world
communicate with each other by a language. Similarly, computer also needs some expression
medium to communicate with others
A computer follows the instructions given by the programmer to perform a specific job. To perform a
particular task, programmer prepares a sequence of instructions, know as programmed. A program
written for a computer is known as Software. The programmed is stored in RAM .The CPU takes one
instruction of the programmed at a time from RAM and executes it. The instructions are executed
one by one in sequence and finally produce the desired result.
The Journey of computer software machine language to high level languages to modern 4GL / 5GL
languages is an interesting one. Let us talk about the same in detail.
1)FIRST GENERATION LANGUAGES 1GLs (Machine language)
When the human being stared programming the computer the instruction were given to it in a
language that it could easily understand. And that language was machine language. The binary
language a language, a language of Is and Os is known as Machine language. Any instruction in this
language is given in the form of string of 1s and 0s. Where the symbol I stand for the presence of
electrical pulse and 0 stands for the absence of electric pulse. A set of 1s and 0s as 11101101 has a
specific meaning to a computer even through it appears as binary number to us.
The writing of programmer in machine language is very cumbersome and complicated and this was
accomplished by expert only. All the instruction and imp data are to fed to the computer in numeric
form that is binary form.
A computer virus resides on a host computer and can replicate itself when
executed. Virus can steal user data, delete or modify files & documents, records
keystrokes & web sessions of a user. It can also steal or damage hard disk space,
it can slowdown CPU processing.
Activation of Virus
When the computer virus starts working, it is called the activation of virus. A virus
normally runs all the time in the computer. Different viruses are activated in
different ways. Many viruses are activated on a certain data. For example, a
popular virus“Friday, the 13th” is activated only if the date is 13 and the day is
Friday.
Email Attachments
Most of the viruses spread through emails. Email attachment is a file that is sent
along with an email. An email may contain an infected file attachment. Virus can
spread if the users opens and downloads an email attachment. It may harm the
computer when it isactivated. It may destroy files on the hard disk or may send
the virus automatically to all email addresses saved in the address book.
Networks
Virus can spread if an infected computer is connected to a network. The internet
is an example of such network. When a user downloads a file infected with virus
from the internet, the virus is copied to the computer. It may infect the files
stored on the computer.
Pirated Software
An illegal copy of software is called pirated software. Virus can spread if user
installs pirated software that contains a virus. A variety of pirated software is
available in CDs and from the internet. Some companies intentionally add virus
in the software. The virus is automatically activated if the user uses the software
without purchasing license.
1. The latest and updated version of Anti-Virus and firewall should be installed on
the computer.
3. USB drives should be scanned for viruses, and should not be used on infected
computers.
4. Junk or unknown emails should not be opened and must be deleted straightaway.
6. An important way of protection against virus is the use of back up of data. The
backup is used if the virus deletes data or modifies it. So back-up your data on
regular basis. There are some great softwares that can back up your data
automatically.
7. Freeware and shareware software from the internet normally contain viruses. It is
important to check the software before using them.
8. Your best protection is your common sense. Never click on suspicious links, never
download songs, videos or files from suspicious websites. Never share your
personal data with people you don’t know over the internet.
Data that can be read and understood without any special measures is
called plaintext or cleartext. The method of disguising plaintext in such a way as to hide
its substance is called encryption. Encrypting plaintext results in unreadable gibberish
called ciphertext. You use encryption to ensure that information is hidden from anyone
for whom it is not intended, even those who can see the encrypted data. The process of
reverting ciphertext to its original plaintext is called decryption.
Figure 1-1 illustrates this process.
Multimedia
Multimedia is more than one concurrent presentation medium (for example, on CD-
ROM or a Web site). Although still images are a different medium than text, multimedia
is typically used to mean the combination of text, sound, and/or motion video. Some
people might say that the addition of animated images (for example, animated GIF on
the Web) produces multimedia, but it has typically meant one of the following:
In live situations, the use of a speaker or actors and "props" together with sound,
images, and motion video