Introduction To Information Technology

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 60

Introduction to Information Technology

Information technology (IT) is the application


of computers and telecommunications equipment to store, retrieve, transmit and
manipulate data,[1] often in the context of a business or other enterprise.[2]
The term is commonly used as a synonym for computers and computer networks,
but it also encompasses other information distribution technologies such as
television and telephones. Several industries are associated with information
technology, including computer
hardware, software, electronics, semiconductors, internet, telecommunications
equipment, engineering, healthcare, e-commerce and computer services.[3][a]
Humans have been storing, retrieving, manipulating and communicating information
since the Sumerians developed writing in about 3000 BC,[5] but the term information
technology in its modern sense first appeared in a 1958 article published in
the Harvard Business Review; authors Harold J. Leavitt and Thomas L. Whisler
commented that "the new technology does not yet have a single established name.
We shall call it information technology (IT)." Their definition consists of three
categories: techniques for processing, the application of statistical and mathematical
methods to decision-making, and the simulation of higher-order thinking through
computer programs.[6]
Based on the storage and processing technologies employed, it is possible to
distinguish among four distinct phases of IT development: the pre-mechanical era
(3000 BC – 1450 AD), the mechanical phase (1450–1840), the electromechanical
phase (1840–1940) and the electronic age (1940–present).[5] This article focuses on
the most recent period (electronic), which began in about 1940.

History of computer technology[edit


Devices have been used to aid computation for thousands of years, probably initially in the form
of a tally stick.[7] The Antikythera mechanism, dating from about the beginning of the first century
BC, is generally considered to be the earliest known mechanical analog computer, and the
earliest known geared mechanism.[8] Comparable geared devices did not emerge in Europe until
the 16th century,[9] and it was not until 1645 that the first mechanical calculator capable of
performing the four basic arithmetical operations was developed.[10]
Electronic computers, using either relays or valves, began to appear in the early 1940s. The
electromechanicalZuse , completed in 1941, was the world's first programmable computer, and
by modern standards one of the first machines that could be considered a
complete computing machine. Colossus, developed during the Second World War to
decrypt German messages was the first electronic digital computer. Although it was
programmable, it was not general-purpose, being designed to perform only a single task. It also
lacked the ability to store its program in memory; programming was carried out using plugs and
switches to alter the internal wiring.[11] The first recognizably modern electronic digital stored-
program computer was the Manchester Small-Scale Experimental Machine (SSEM), which ran
its first program on 21 June 1948.[12]
The development of transistors in the late 1940s at Bell Laboratories allowed a new generation of
computers to be designed with greatly reduced power consumption. The first commercially
available stored-program computer, the Ferranti Mark I, contained 4050 valves and had a power
consumption of 25 kilowatts. By comparison the first transistorized computer, developed at the
University of Manchester and operational by November 1953, consumed only 165 watts in its
final version.
The history of computers goes back over 200 years. At first theorized by
mathematicians and entrepreneurs, during the 19th century mechanical calculating
machines were designed and built to solve the increasingly complex number-
crunching challenges. The advancement of technology enabled ever more-complex
computers by the early 20th century, and computers became larger and more
powerful.

Today, computers are almost unrecognizable from designs of the 19th century, such
as Charles Babbage's Analytical Engine — or even from the huge computers of the
20th century that occupied whole rooms, such as the Electronic Numerical Integrator
and Calculator.

Here's a brief history of computers, from their primitive number-crunching origins to


the powerful modern-day machines that surf the Internet, run games and stream
multimedia.

1801: Joseph Marie Jacquard, a French merchant and inventor invents a loom that
uses punched wooden cards to automatically weave fabric designs. Early computers
would use similar punch cards.
1821: English mathematician Charles Babbage conceives of a steam-driven
calculating machine that would be able to compute tables of numbers. Funded by the
British government, the project, called the "Difference Engine" fails due to the lack of
technology at the time, according to the University of Minnesota.
1848: Ada Lovelace, an English mathematician and the daughter of poet Lord Byron,
writes the world's first computer program. According to Anna Siffert, a professor of
theoretical mathematics at the University of Münster in Germany, Lovelace writes the
first program while translating a paper on Babbage's Analytical Engine from French
into English. "She also provides her own comments on the text. Her annotations,
simply called "notes," turn out to be three times as long as the actual transcript,"
Siffert wrote in an article for The Max Planck Society. "Lovelace also adds a step-by-
step description for computation of Bernoulli numbers with Babbage's machine —
basically an algorithm — which, in effect, makes her the world's first computer
programmer." Bernoulli numbers are a sequence of rational numbers often used in
computation.
1853: Swedish inventor Per Georg Scheutz and his son Edvard design the world's
first printing calculator. The machine is significant for being the first to "compute
tabular differences and print the results," according to Uta C. Merzbach's book,
"Georg Scheutz and the First Printing Calculator" (Smithsonian Institution Press, 1977).
1890: Herman Hollerith designs a punch-card system to help calculate the 1890 U.S.
Census. The machine, saves the government several years of calculations, and the
U.S. taxpayer approximately $5 million, according to Columbia University Hollerith
later establishes a company that will eventually become International Business
Machines Corporation (IBM).
1931: At the Massachusetts Institute of Technology (MIT), Vannevar Bush invents
and builds the Differential Analyzer, the first large-scale automatic general-purpose
mechanical analog computer, according to Stanford University.
1936: Alan Turing, a British scientist and mathematician, presents the principle of a
universal machine, later called the Turing machine, in a paper called "On
Computable Numbers…" according to Chris Bernhardt's book "Turing's Vision" (The
MIT Press, 2017). Turing machines are capable of computing anything that is
computable. The central concept of the modern computer is based on his ideas.
Turing is later involved in the development of the Turing-Welchman Bombe, an
electro-mechanical device designed to decipher Nazi codes during World War II,
according to the UK's National Museum of Computing.
1937: John Vincent Atanasoff, a professor of physics and mathematics at Iowa State
University, submits a grant proposal to build the first electric-only computer, without
using gears, cams, belts or shafts.
1939: David Packard and Bill Hewlett found the Hewlett Packard Company in Palo
Alto, California. The pair decide the name of their new company by the toss of a
coin, and Hewlett-Packard's first headquarters are in Packard's garage, according
to MIT.
1941: German inventor and engineer Konrad Zuse completes his Z3 machine, the
world's earliest digital computer, according to Gerard O'Regan's book "A Brief History
of Computing" (Springer, 2021). The machine was destroyed during a bombing raid
on Berlin during World War II. Zuse fled the German capital after the defeat of Nazi
Germany and later released the world's first commercial digital computer, the Z4, in
1950, according to O'Regan.
1941: Atanasoff and his graduate student, Clifford Berry, design the first digital
electronic computer in the U.S., called the Atanasoff-Berry Computer (ABC). This
marks the first time a computer is able to store information on its main memory, and
is capable of performing one operation every 15 seconds, according to the book
"Birthing the Computer" (Cambridge Scholars Publishing, 2016)
1945: Two professors at the University of Pennsylvania, John Mauchly and J.
Presper Eckert, design and build the Electronic Numerical Integrator and Calculator
(ENIAC). The machine is the first "automatic, general-purpose, electronic, decimal,
digital computer," according to Edwin D. Reilly's book "Milestones in Computer
Science and Information Technology" (Greenwood Press, 2003).
1946: Mauchly and Presper leave the University of Pennsylvania and receive funding from
the Census Bureau to build the UNIVAC, the first commercial computer for business and
government applications.
1947: William Shockley, John Bardeen and Walter Brattain of Bell Laboratories invent
the transistor. They discover how to make an electric switch with solid materials and without
the need for a vacuum.
1949: A team at the University of Cambridge develops the Electronic Delay Storage
Automatic Calculator (EDSAC), "the first practical stored-program computer," according to
O'Regan. "EDSAC ran its first program in May 1949 when it calculated a table of squares
and a list of prime numbers," O'Regan wrote. In November 1949, scientists with the Council
of Scientific and Industrial Research (CSIR), now called CSIRO, build Australia's first digital
computer called the Council for Scientific and Industrial Research Automatic Computer
(CSIRAC). CSIRAC is the first digital computer in the world to play music, according to
O'Regan.
1953: Grace Hopper develops the first computer language, which eventually becomes known
as COBOL, which stands for COmmon, Business-Oriented Language according to
the National Museum of American History. Hopper is later dubbed the "First Lady of
Software" in her posthumous Presidential Medal of Freedom citation. Thomas Johnson
Watson Jr., son of IBM CEO Thomas Johnson Watson Sr., conceives the IBM 701 EDPM to
help the United Nations keep tabs on Korea during the war.
1954: John Backus and his team of programmers at IBM publish a paper describing their
newly created FORTRAN programming language, an acronym for FORmula TRANslation,
according to MIT.
1958: Jack Kilby and Robert Noyce unveil the integrated circuit, known as the computer
chip. Kilby is later awarded the Nobel Prize in Physics for his work.
1968: Douglas Engelbart reveals a prototype of the modern computer at the Fall Joint
Computer Conference, San Francisco. His presentation, called "A Research Center for
Augmenting Human Intellect" includes a live demonstration of his computer, including a
mouse and a graphical user interface (GUI), according to the Doug Engelbart Institute. This
marks the development of the computer from a specialized machine for academics to a
technology that is more accessible to the general public.
1969: Ken Thompson, Dennis Ritchie and a group of other developers at Bell Labs
produce UNIX, an operating system that made "large-scale networking of diverse
computing systems — and the internet — practical," according to Bell Labs.. The
team behind UNIX continued to develop the operating system using the C
programming language, which they also optimized.
1970: The newly formed Intel unveils the Intel 1103, the first Dynamic Access
Memory (DRAM) chip.
1971: A team of IBM engineers led by Alan Shugart invents the "floppy disk,"
enabling data to be shared among different computers.
1972: Ralph Baer, a German-American engineer, releases Magnavox Odyssey, the
world's first home game console, in September 1972 , according to the Computer
Museum of America. Months later, entrepreneur Nolan Bushnell and engineer Al
Alcorn with Atari release Pong, the world's first commercially successful video
game.
1973: Robert Metcalfe, a member of the research staff for Xerox, develops Ethernet
for connecting multiple computers and other hardware.
1977: The Commodore Personal Electronic Transactor (PET), is released onto the
home computer market, featuring an MOS Technology 8-bit 6502 microprocessor,
which controls the screen, keyboard and cassette player. The PET is especially
successful in the education market, according to O'Regan.
1975: The magazine cover of the January issue of "Popular Electronics" highlights
the Altair 8080 as the "world's first minicomputer kit to rival commercial models."
After seeing the magazine issue, two "computer geeks," Paul Allen and Bill Gates,
offer to write software for the Altair, using the new BASIC language. On April 4, after
the success of this first endeavor, the two childhood friends form their own software
company, Microsoft.
1976: Steve Jobs and Steve Wozniak co-found Apple Computer on April Fool's Day.
They unveil Apple I, the first computer with a single-circuit board and ROM (Read
Only Memory),
1977: Radio Shack began its initial production run of 3,000 TRS-80 Model 1
computers — disparagingly known as the "Trash 80" — priced at $599, according to
the National Museum of American History. Within a year, the company took 250,000
orders for the computer, according to the book "How TRS-80 Enthusiasts Helped Spark
the PC Revolution" (The Seeker Books, 2007).
1977: The first West Coast Computer Faire is held in San Francisco. Jobs and
Wozniak present the Apple II computer at the Faire, which includes color graphics
and features an audio cassette drive for storage.
1978: VisiCalc, the first computerized spreadsheet program is introduced.
1979: MicroPro International, founded by software engineer Seymour Rubenstein,
releases WordStar, the world's first commercially successful word processor.
WordStar is programmed by Rob Barnaby, and includes 137,000 lines of code,
according to Matthew G. Kirschenbaum's book "Track Changes: A Literary History of
Word Processing" (Harvard University Press, 2016).
1981: "Acorn," IBM's first personal computer, is released onto the market at a price
point of $1,565, according to IBM. Acorn uses the MS-DOS operating system from
Windows. Optional features include a display, printer, two diskette drives, extra
memory, a game adapter and more.
1983: The Apple Lisa, standing for "Local Integrated Software Architecture" but also
the name of Steve Jobs' daughter, according to the National Museum of American
History (NMAH), is the first personal computer to feature a GUI. The machine also
includes a drop-down menu and icons. Also this year, the Gavilan SC is released
and is the first portable computer with a flip-form design and the very first to be sold
as a "laptop."
1984: The Apple Macintosh is announced to the world during a Superbowl
advertisement. The Macintosh is launched with a retail price of $2,500, according to
the NMAH.
1985: As a response to the Apple Lisa's GUI, Microsoft releases Windows in
November 1985, the Guardian reported. Meanwhile, Commodore announces the
Amiga 1000.
1989: Tim Berners-Lee, a British researcher at the European Organization for
Nuclear Research (CERN), submits his proposal for what would become the World
Wide Web. His paper details his ideas for Hyper Text Markup Language (HTML), the
building blocks of the Web.
1993: The Pentium microprocessor advances the use of graphics and music on PCs.
1996: Sergey Brin and Larry Page develop the Google search engine at Stanford
University.
1997: Microsoft invests $150 million in Apple, which at the time is struggling
financially. This investment ends an ongoing court case in which Apple accused
Microsoft of copying its operating system.
1999: Wi-Fi, the abbreviated term for "wireless fidelity" is developed, initially covering
a distance of up to 300 feet (91 meters) Wired reported.
2001: Mac OS X, later renamed OS X then simply macOS, is released by Apple as
the successor to its standard Mac Operating System. OS X goes through 16 different
versions, each with "10" as its title, and the first nine iterations are nicknamed after
big cats, with the first being codenamed "Cheetah," TechRadar reported.
2003: AMD's Athlon 64, the first 64-bit processor for personal computers, is released
to customers.
2004: The Mozilla Corporation launches Mozilla Firefox 1.0. The Web browser is one
of the first major challenges to Internet Explorer, owned by Microsoft. During its first
five years, Firefox exceeded a billion downloads by users, according to the Web
Design Museum.
2005: Google buys Android, a Linux-based mobile phone operating system
2006: The MacBook Pro from Apple hits the shelves. The Pro is the company's first
Intel-based, dual-core mobile computer.
2009: Microsoft launches Windows 7 on July 22. The new operating system features
the ability to pin applications to the taskbar, scatter windows away by shaking
another window, easy-to-access jumplists, easier previews of tiles and more,

2010: The iPad, Apple's flagship handheld tablet, is unveiled.


2011: Google releases the Chromebook, which runs on Google Chrome OS.
2015: Apple releases the Apple Watch. Microsoft releases Windows 10.
2016: The first reprogrammable quantum computer was created. "Until now, there hasn't
been any quantum-computing platform that had the capability to program new
algorithms into their system. They're usually each tailored to attack a particular
algorithm," said study lead author Shantanu Debnath, a quantum physicist and
optical engineer at the University of Maryland, College Park.
2017: The Defense Advanced Research Projects Agency (DARPA) is developing a
new "Molecular Informatics" program that uses molecules as computers. "Chemistry
offers a rich set of properties that we may be able to harness for rapid, scalable
information storage and processing," Anne Fischer, program manager in DARPA's
Defense Sciences Office, said in a statement. "Millions of molecules exist, and each
molecule has a unique three-dimensional atomic structure as well as variables such
as shape, size, or even color. This richness provides a vast design space for
exploring novel and multi-value ways to encode and process data beyond the 0s and
1s of current logic-based, digital architectures."
Computer hardware includes the physical parts of a computer, such as the case,[1] central
processing unit (CPU), random access memory (RAM), monitor, mouse, keyboard, computer
data storage, graphics card, sound card, speakers and motherboard.[2]
By contrast, software is the set of instructions that can be stored and run by hardware. Hardware
is so-termed because it is "hard" or rigid with respect to changes, whereas software is "soft"
because it is easy to change.
Hardware is typically directed by the software to execute any command or instruction. A
combination of hardware and software forms a usable computing system, although other
systems exist with only hardware.

Types of computer systems[edit]


Personal computer[edit]

Basic hardware components of a personal computer, including a monitor, a motherboard, a CPU, a RAM,
two expansion cards, a power supply, an optical disc drive, a hard disk drive, a keyboard and a mouse
Inside a custom-built computer: power supply at the bottom has its own cooling fan

The personal computer is one of the most common types of computer due to its versatility and
relatively low price. Desktop personal computers have a monitor, a keyboard, a mouse, and
a computer case. The computer case holds the motherboard, fixed or removable disk drives for
data storage, the power supply, and may contain other peripheral devices such as modems or
network interfaces. Some models of desktop computers integrated the monitor and keyboard into
the same case as the processor and power supply. Separating the elements allows the user to
arrange the components in a pleasing, comfortable array, at the cost of managing power and
data cables between them.
Laptops are designed for portability but operate similarly to desktop PCs.[1] They may use lower-
power or reduced size components, with lower performance than a similarly priced desktop
computer.[5] Laptops contain the keyboard, display, and processor in one case. The monitor in the
folding upper cover of the case can be closed for transportation, to protect the screen and
keyboard. Instead of a mouse, laptops may have a touchpad or pointing stick.
Tablets are portable computer that uses a touch screen as the primary input device. Tablets
generally weigh less and are smaller than laptops.
Some tablets include fold-out keyboards, or offer connections to separate external keyboards.
Some models of laptop computers have a detachable keyboard, which allows the system to be
configured as a touch-screen tablet. They are sometimes called "2-in-1 detachable laptops" or
"tablet-laptop hybrids".[6]
Case[edit]
Main article: Computer case

The computer case encloses most of the components of the system. It provides mechanical
support and protection for internal elements such as the motherboard, disk drives, and power
supplies, and controls and directs the flow of cooling air over internal components. The case is
also part of the system to control electromagnetic interference radiated by the computer and
protects internal parts from electrostatic discharge. Large tower cases provide space for multiple
disk drives or other peripherals and usually stand on the floor, while desktop cases provide less
expansion room. All-in-one style designs include a video display built into the same case.
Portable and laptop computers require cases that provide impact protection for the unit.
Hobbyists may decorate the cases with colored lights, paint, or other features, in an activity
called case modding.
Power supply[edit]
Main article: Power supply unit

A power supply unit (PSU) converts alternating current (AC) electric power to low-voltage direct
current (DC) power for the computer. Laptops can run on built-in rechargeable battery.[7] The
PSU typically uses a switched-mode power supply (SMPS), with power MOSFETs (power metal–
oxide–semiconductor field-effect transistors) used in the converters and regulator circuits of the
SMPS.[8]
Motherboard[edit]

Computer motherboard
Main article: Motherboard

The motherboard is the main component of a computer. It is a board with integrated circuitry that
connects the other parts of the computer including the CPU, the RAM, the disk drives
(CD, DVD, hard disk, or any others) as well as any peripherals connected via the ports or
the expansion slots. The integrated circuit (IC) chips in a computer typically contain billions of
tiny metal–oxide–semiconductor field-effect transistors (MOSFETs).[9]
Components directly attached to or to part of the motherboard include:

 The CPU (central processing unit), which performs most of the calculations which enable a
computer to function, and is referred to as the brain of the computer. It takes program
instructions from random-access memory (RAM), interprets and processes them and then
sends back results so that the relevant components can carry out the instructions. The CPU
is a microprocessor, which is fabricated on a metal–oxide–semiconductor (MOS) integrated
circuit (IC) chip. It is usually cooled by a heat sink and fan, or water-cooling system. Most
newer CPU includes an on-die graphics processing unit (GPU). The clock speed of CPU
governs how fast it executes instructions and is measured in GHz; typical values lie between
1 GHz and 5 GHz. Many modern computers have the option to overclock the CPU which
enhances performance at the expense of greater thermal output and thus a need for
improved cooling.
 The chipset, which includes the north bridge, mediates communication between the CPU
and the other components of the system, including main memory; as well as south bridge,
which is connected to the north bridge, and supports auxiliary interfaces and buses; and,
finally, a Super I/O chip, connected through the south bridge, which supports the slowest and
most legacy components like serial ports, hardware monitoring and fan control.
 Random-access memory (RAM), which stores the code and data that are being actively
accessed by the CPU. For example, when a web browser is opened on the computer it takes
up memory; this is stored in the RAM until the web browser is closed. It is typically a type
of dynamic RAM (DRAM), such as synchronous DRAM (SDRAM), where MOS
memory chips store data on memory cells consisting of MOSFETs and MOS capacitors.
RAM usually comes on dual in-line memory modules (DIMMs) in the sizes of 2GB, 4GB, and
8GB, but can be much larger.
 Read-only memory (ROM), which stores the BIOS that runs when the computer is powered
on or otherwise begins execution, a process known as Bootstrapping, or "booting" or
"booting up". The ROM is typically a nonvolatile BIOS memory chip, which stores data
on floating-gate MOSFET memory cells.
o The BIOS (Basic Input Output System) includes boot firmware and power management
firmware. Newer motherboards use Unified Extensible Firmware Interface (UEFI) instead
of BIOS.
 Buses that connect the CPU to various internal components and to expand cards for
graphics and sound.
 The CMOS (complementary MOS) battery, which powers the CMOS memory for date and
time in the BIOS chip. This battery is generally a watch battery.
 The video card (also known as the graphics card), which processes computer graphics. More
powerful graphics cards are better suited to handle strenuous tasks, such as playing
intensive video games or running computer graphics software. A video card contains
a graphics processing unit (GPU) and video memory (typically a type of SDRAM), both
fabricated on MOS integrated circuit (MOS IC) chips.
 Power MOSFETs make up the voltage regulator module (VRM), which controls how
much voltage other hardware components receive.[8]
Expansion cards[edit]
Expansion card

An expansion card in computing is a printed circuit board that can be inserted into an expansion
slot of a computer motherboard or backplane to add functionality to a computer system via the
expansion bus. Expansion cards can be used to obtain or expand on features not offered by the
motherboard.
Storage devices[edit]
Computer data storage

A storage device is any computing hardware and digital media that is used for storing, porting
and extracting data files and objects. It can hold and store information both temporarily and
permanently and can be internal or external to a computer, server or any similar computing
device. Data storage is a core function and fundamental component of computers.
Fixed media
Data is stored by a computer using a variety of media. Hard disk drives (HDDs) are found in
virtually all older computers, due to their high capacity and low cost, but solid-state drives (SSDs)
are faster and more power efficient, although currently more expensive than hard drives in terms
of dollar per gigabyte,[10] so are often found in personal computers built post-2007.[11] SSDs
use flash memory, which stores data on MOS memory chips consisting of floating-gate
MOSFET memory cells. Some systems may use a disk array controller for greater performance
or reliability.
Removable media
To transfer data between computers, an external flash memory device (such as a memory
card or USB flash drive) or optical disc (such as a CD-ROM, DVD-ROM or BD-ROM) may be
used. Their usefulness depends on being readable by other systems; the majority of machines
have an optical disk drive (ODD), and virtually all have at least one Universal Serial Bus (USB)
port. Additionally, USB sticks are typically pre-formatted with the FAT32 file system, which is
widely supported across operating systems.
Input and output peripherals[
Main article: Peripheral

Input and output devices are typically housed externally to the main computer chassis. The
following are either standard or very common to many computer systems.
Input device
Input devices allow the user to enter information into the system, or control its operation. Most
personal computers have a mouse and keyboard, but laptop systems typically use
a touchpad instead of a mouse. Other input devices include webcams, microphones, joysticks,
and image scanners.
Output device
Output devices are designed around the senses of human beings. For example, monitors display
text that can be read, speakers produce sound that can be heard.[12] Such devices also could
include printers or a Braille embosser.

Mainframe computer[edit]
A mainframe computer is a much larger computer that typically fills a room and may cost many
hundreds or thousands of times as much as a personal computer. They are designed to perform
large numbers of calculations for governments and large enterprises.

Departmental computing[edit]
In the 1960s and 1970s, more and more departments started to use cheaper and dedicated
systems for specific purposes like process control and laboratory automation. A minicomputer,
or colloquially mini, is a class of smaller computers that was developed in the mid-1960s[13][14] and
sold for much less than mainframe[15] and mid-size computers from IBM and its direct competitors.
Supercomputer[edit]
Main article: Supercomputer

A supercomputer is superficially similar to a mainframe but is instead intended for extremely


demanding computational tasks. As of November 2021, the fastest supercomputer on
the TOP500 supercomputer list is Fugaku, in Japan, with a LINPACK benchmark score of 415
PFLOPS, superseding the second fastest, Summit, in the United States, by around 294
PFLOPS.
The term supercomputer does not refer to a specific technology. Rather it indicates the fastest
computations available at any given time. In mid-2011, the fastest supercomputers boasted
speeds exceeding one petaflop, or 1 quadrillion (10^15 or 1,000 trillion) floating-point operations
per second. Supercomputers are fast but extremely costly, so they are generally used by large
organizations to execute computationally demanding tasks involving large data sets.
Supercomputers typically run military and scientific applications. Although costly, they are also
being used for commercial applications where huge amounts of data must be analyzed. For
example, large banks employ supercomputers to calculate the risks and returns of various
investment strategies, and healthcare organizations use them to analyze giant databases of
patient data to determine optimal treatments for various diseases and problems incurring to the
country.
oftware is a collection of instructions that tell a computer how to work.[1][2] This is in contrast
to hardware, from which the system is built and which actually performs the work.
At the lowest programming level, executable code consists of machine language instructions
supported by an individual processor—typically a central processing unit (CPU) or a graphics
processing unit (GPU). Machine language consists of groups of binary
values signifying processor instructions that change the state of the computer from its preceding
state. For example, an instruction may change the value stored in a particular storage location in
the computer—an effect that is not directly observable to the user. An instruction may also
invoke one of many input or output operations, for example displaying some text on a computer
screen; causing state changes which should be visible to the user. The processor executes the
instructions in the order they are provided, unless it is instructed to "jump" to a different
instruction, or is interrupted by the operating system. As of 2015, most personal
computers, smartphone devices and servers have processors with multiple execution
units or multiple processors performing computation together, and computing has become a
much more concurrent activity than in the past.
The majority of software is written in high-level programming languages. They are easier and
more efficient for programmers because they are closer to natural languages than machine
languages.[3] High-level languages are translated into machine language using a compiler or
an interpreter or a combination of the two. Software may also be written in a low-level assembly
language, which has a strong correspondence to the computer's machine language instructions
and is translated into machine language using an assembler.

Types
See also: Software categories

Blender, a free software program


On virtually all computer platforms, software can be grouped into a few broad categories.

Purpose, or domain of use


Based on the goal, computer software can be divided into:

 Application software uses the computer system to perform special functions beyond the
basic operation of the computer itself. There are many different types of application software
because the range of tasks that can be performed with a modern computer is so large—
see list of software.
 System software manages hardware behaviour, as to provide basic functionalities that are
required by users, or for other software to run properly, if at all. System software is also
designed for providing a platform for running application software,[13] and it includes the
following:
o Operating systems are essential collections of software that manage resources and
provide common services for other software that runs "on top" of them. Supervisory
programs, boot loaders, shells and window systems are core parts of operating systems.
In practice, an operating system comes bundled with additional software (including
application software) so that a user can potentially do some work with a computer that
only has one operating system.
o Device drivers operate or control a particular type of device that is attached to a
computer. Each device needs at least one corresponding device driver; because a
computer typically has at minimum at least one input device and at least one output
device, a computer typically needs more than one device driver.
o Utilities are computer programs designed to assist users in the maintenance and care of
their computers.
 Malicious software, or malware, is software that is developed to harm or disrupt
computers. Malware is closely associated with computer-related crimes, though some
malicious programs may have been designed as practical jokes.
Nature or domain of execution

 Desktop applications such as web browsers and Microsoft Office, as well


as smartphone and tablet applications (called "apps").[citation needed]
 JavaScript scripts are pieces of software traditionally embedded in web pages that are run
directly inside the web browser when a web page is loaded without the need for a web
browser plugin. Software written in other programming languages can also be run within the
web browser if the software is either translated into JavaScript, or if a web browser plugin
that supports that language is installed; the most common example of the latter
is ActionScript scripts, which are supported by the Adobe Flash plugin.[citation needed]
 Server software, including:
o Web applications, which usually run on the web server and output dynamically
generated web pages to web browsers, using e.g. PHP, Java, ASP.NET, or
even JavaScript that runs on the server. In modern times these commonly include some
JavaScript to be run in the web browser as well, in which case they typically run partly on
the server, partly in the web browser.[citation needed]
 Plugins and extensions are software that extends or modifies the functionality of another
piece of software, and require that software be used in order to function.[14]
 Embedded software resides as firmware within embedded systems, devices dedicated to a
single use or a few uses such as cars and televisions (although some embedded devices
such as wireless chipsets can themselves be part of an ordinary, non-embedded computer
system such as a PC or smartphone).[15] In the embedded system context there is sometimes
no clear distinction between the system software and the application software. However,
some embedded systems run embedded operating systems, and these systems do retain
the distinction between system software and application software (although typically there
will only be one, fixed application which is always run).[citation needed]
 Microcode is a special, relatively obscure type of embedded software which tells the
processor itself how to execute machine code, so it is actually a lower level than machine
code.[citation needed] It is typically proprietary to the processor manufacturer, and any necessary
correctional microcode software updates are supplied by them to users (which is much
cheaper than shipping replacement processor hardware). Thus an ordinary programmer
would not expect to ever have to deal with it.[citation needed]
Programming tools
Main article: Programming tool

Programming tools are also software in the form of programs or applications that developers use
to create, debug, maintain, or otherwise support software.[16]
Software is written in one or more programming languages; there are many programming
languages in existence, and each has at least one implementation, each of which consists of its
own set of programming tools. These tools may be relatively self-contained programs such
as compilers, debuggers, interpreters, linkers, and text editors, that can be combined to
accomplish a task; or they may form an integrated development environment (IDE), which
combines much or all of the functionality of such self-contained tools.[citation needed] IDEs may do this
by either invoking the relevant individual tools or by re-implementing their functionality in a new
way.[citation needed] An IDE can make it easier to do specific tasks, such as searching in files in a
particular project.[citation needed] Many programming language implementations provide the option of
using both individual tools or an IDE.[citation needed]

Topics
Architecture
See also: Software architecture

People who use modern general purpose computers (as opposed to embedded systems, analog
computers and supercomputers) usually see three layers of software performing a variety of
tasks: platform, application, and user software.[citation needed]

 Platform software
The platform includes the firmware, device drivers, an operating system, and typically
a graphical user interface which, in total, allow a user to interact with the computer and
its peripherals (associated equipment). Platform software often comes bundled with the
computer. On a PC one will usually have the ability to change the platform software.
 Application software
Application software is what most people think of when they think of software.[citation needed] Typical
examples include office suites and video games. Application software is often purchased
separately from computer hardware. Sometimes applications are bundled with the computer,
but that does not change the fact that they run as independent applications. Applications are
usually independent programs from the operating system, though they are often tailored for
specific platforms. Most users think of compilers, databases, and other "system software" as
applications.[citation needed]
 User-written software
End-user development tailors systems to meet users' specific needs. User software includes
spreadsheet templates and word processor templates.[citation needed] Even email filters are a kind
of user software. Users create this software themselves and often overlook how important it
is.[citation needed] Depending on how competently the user-written software has been integrated into
default application packages, many users may not be aware of the distinction between the
original packages, and what has been added by co-workers.[citation needed]
Execution
Main article: Execution (computing)
Computer software has to be "loaded" into the computer's storage (such as the hard
drive or memory). Once the software has loaded, the computer is able to execute the software.
This involves passing instructions from the application software, through the system software, to
the hardware which ultimately receives the instruction as machine code. Each instruction causes
the computer to carry out an operation—moving data, carrying out a computation, or altering
the control flow of instructions.[citation needed]
Data movement is typically from one place in memory to another. Sometimes it involves moving
data between memory and registers which enable high-speed data access in the CPU. Moving
data, especially large amounts of it, can be costly; this is sometimes avoided by using "pointers"
to data instead.[citation needed] Computations include simple operations such as incrementing the value
of a variable data element. More complex computations may involve many operations and data
elements together.[citation needed]

Quality and reliability


Main articles: Software quality and Software testing

Software quality is very important, especially for commercial and system software. If software is
faulty, it can delete a person's work, crash the computer and do other unexpected things. Faults
and errors are called "bugs" which are often discovered during alpha and beta testing.[citation
needed]
Software is often also a victim to what is known as software aging, the progressive
performance degradation resulting from a combination of unseen bugs.[citation needed]
Many bugs are discovered and fixed through software testing. However, software testing rarely—
if ever—eliminates every bug; some programmers say that "every program has at least one more
bug" (Lubarsky's Law).[17] In the waterfall method of software development, separate testing
teams are typically employed, but in newer approaches, collectively termed agile software
development, developers often do all their own testing, and demonstrate the software to
users/clients regularly to obtain feedback.[citation needed] Software can be tested through unit
testing, regression testing and other methods, which are done manually, or most commonly,
automatically, since the amount of code to be tested can be large.[citation needed] Programs containing
command software enable hardware engineering and system operations to function much easier
together.[citation needed]

License
Main article: Software license

The software's license gives the user the right to use the software in the licensed environment,
and in the case of free software licenses, also grants other rights such as the right to make
copies.[citation needed]
Proprietary software can be divided into two types:

 freeware, which includes the category of "free trial" software or "freemium" software (in the
past, the term shareware was often used for free trial/freemium software). As the name
suggests, freeware can be used for free, although in the case of free trials or freemium
software, this is sometimes only true for a limited period of time or with limited functionality.[18]
 software available for a fee, which can only be legally used on purchase of a license.[19]
Open-source software comes with a free software license, granting the recipient the rights to
modify and redistribute the software.[20]

Patents
Main articles: Software patent and Software patent debate

Software patents, like other types of patents, are theoretically supposed to give an inventor an
exclusive, time-limited license for a detailed idea (e.g. an algorithm) on how to implement a piece
of software, or a component of a piece of software. Ideas for useful things that software could do,
and user requirements, are not supposed to be patentable, and concrete implementations (i.e.
the actual software packages implementing the patent) are not supposed to be patentable either
—the latter are already covered by copyright, generally automatically. So software patents are
supposed to cover the middle area, between requirements and concrete implementation. In
some countries, a requirement for the claimed invention to have an effect on the physical world
may also be part of the requirements for a software patent to be held valid—although
since all useful software has effects on the physical world, this requirement may be open to
debate. Meanwhile, American copyright law was applied to various aspects of the writing of the
software code.[21]
Software patents are controversial in the software industry with many people holding different
views about them. One of the sources of controversy is that the aforementioned split between
initial ideas and patent does not seem to be honored in practice by patent lawyers—for example
the patent for aspect-oriented programming (AOP), which purported to claim rights
over any programming tool implementing the idea of AOP, howsoever implemented.[citation
needed]
Another source of controversy is the effect on innovation, with many distinguished experts
and companies arguing that software is such a fast-moving field that software patents merely
create vast additional litigation costs and risks, and actually retard innovation.[citation needed] In the case
of debates about software patents outside the United States, the argument has been made that
large American corporations and patent lawyers are likely to be the primary beneficiaries of
allowing or continue to allow software patents.[citation needed]

Design and implementation


Main articles: Software development, Computer programming, and Software engineering

Design and implementation of software varies depending on the complexity of the software. For
instance, the design and creation of Microsoft Word took much more time than designing and
developing Microsoft Notepad because the latter has much more basic functionality.[citation needed]
Software is usually developed in integrated development environments (IDE)
like Eclipse, IntelliJ and Microsoft Visual Studio that can simplify the process and compile the
software.[citation needed] As noted in a different section, software is usually created on top of existing
software and the application programming interface (API) that the underlying software provides
like GTK+, JavaBeans or Swing.[citation needed] Libraries (APIs) can be categorized by their purpose.
For instance, the Spring Framework is used for implementing enterprise applications,
the Windows Forms library is used for designing graphical user interface (GUI) applications like
Microsoft Word, and Windows Communication Foundation is used for designing web services.
[citation needed]
When a program is designed, it relies upon the API. For instance, a Microsoft Windows
desktop application might call API functions in the .NET Windows Forms library
like Form1.Close() and Form1.Show()[22] to close or open the application. Without these APIs, the
programmer needs to write these functionalities entirely themselves. Companies
like Oracle and Microsoft provide their own APIs so that many applications are written using
their software libraries that usually have numerous APIs in them.[citation needed]
Data structures such as hash tables, arrays, and binary trees, and algorithms such as quicksort,
can be useful for creating software.
Computer software has special economic characteristics that make its design, creation, and
distribution different from most other economic goods.[specify][23][24]
A person who creates software is called a programmer, software engineer or software developer,
terms that all have a similar meaning. More informal terms for programmer also exist such as
"coder" and "hacker" – although use of the latter word may cause confusion, because it is more
often used to mean someone who illegally breaks into computer systems.

Components of Data Communication


System
 Last Updated : 25 Jun, 2020
Data Communication is defined as exchange of data between two devices
via some form of transmission media such as a cable, wire or it can be air or
vacuum also. For occurrence of data communication, communicating
devices must be a part of communication system made up of a combination
of hardware or software devices and programs.
Data Communication System Components :
There are mainly five components of a data communication system:
1. Message
2. Sender
3. Receiver
4. Transmission Medium
5. Set of rules (Protocol)
All above mentioned elements are described below:

– Components of Data Communication System


1. Message :
This is most useful asset of a data communication system. The message
simply refers to data or piece of information which is to be communicated.
A message could be in any form, it may be in form of a text file, an audio
file, a video file, etc.

2. Sender :
To transfer message from source to destination, someone must be there
who will play role of a source. Sender plays part of a source in data
communication system. It is simple a device that sends data message.
The device could be in form of a computer, mobile, telephone, laptop,
video camera, or a workstation, etc.

3. Receiver :
It is destination where finally message sent by source has arrived. It is a
device that receives message. Same as sender, receiver can also be in
form of a computer, telephone mobile, workstation, etc.

4. Transmission Medium :
In entire process of data communication, there must be something which
could act as a bridge between sender and receiver, Transmission medium
plays that part. It is physical path by which data or message travels from
sender to receiver. Transmission medium could be guided (with wires) or
unguided (without wires), for example, twisted pair cable, fiber optic cable,
radio waves, microwaves, etc.

5. Set of rules (Protocol) :


To govern data communications, various sets of rules had been already
designed by the designers of the communication systems, which
represent a kind of agreement between communicating devices. These
are defined as protocol. In simple terms, the protocol is a set of rules that
govern data communication. If two different devices are connected but
there is no protocol among them, there would not be any kind of
communication between those two devices. Thus the protocol is
necessary for data communication to take place.

A typical example of a data communication system is sending an e-mail. The


user which send email act as sender, message is data which user wants to
send, receiver is one whom user wants to send message, there are many
protocols involved in this entire process, one of them is Simple Mail Transfer
Protocol (SMTP), both sender and receiver must have an internet connection
which uses a wireless medium to send and receive email.

Information Systems Information systems (IS) is concerned with the information that
computer systems can provide to aid a company, non-profit or governmental organization in
defining and achieving its goals. It is also concerned with the processes that an enterprise can
implement and improve using information technology. IS professionals must understand both
technical and organizational factors, and must be able to help an organization determine how
information and technologyenabled business processes can provide a foundation for superior
organizational performance. They serve as a bridge between the technical and management
communities within an organization. What information does the enterprise need? How is that
information generated? Is it delivered to the people who need it? Is it presented to them in
ways that permit them to use it readily? Is the organization structured to be able to use
technology effectively? Are the business processes of the organization well designed? Do
they use the opportunities created by information technology fully? Does the organization use
the communication and collaboration capabilities of information technologies appropriately?
Is the organization capable of adapting quickly enough to changing external circumstances?
These are the important issues that businesses rely on IS people to address. A majority of IS
programs are located in business schools; however, they may have different names such as
management information systems, computer information systems, or business information
systems. All IS degrees combine business and computing topics, but the emphasis between
technical and organizational issues varies among programs. For example, programs differ
substantially in the amount of programming required. Traditionally, many graduates of IS
programs have functioned in roles that are similar to the roles for which IT programs
explicitly prepare their students. Information systems graduates continue to fill these roles,
but the new programs in information technology offer an alternative path to these positions.
Occupations in this field include: • Project Managers • Chief Information Officers (CIO) •
Technical Writers • System Analysts • Data Communication Analysts Computer Science
Computer science (CS) spans the range from theory through programming to cutting-edge
development of computing solutions. Computer science offers a foundation that permits
graduates to adapt to new technologies and new ideas. The work of computer scientists falls
into three categories: a) designing and building software; b) developing effective ways to
solve computing problems, such as storing information in databases, sending data over
networks or providing new approaches to security problems; and c) devising new and better
ways of using computers and addressing particular challenges in areas such as robotics,
computer vision, or digital forensics (although these specializations are not available in all
computer science programs). Most computer science programs require some mathematical
background. Let us consider what is involved in a career path in each area. • Career Path 1:
Designing and implementing software. This refers to the work of software development
which has grown to include aspects of web development, interface design, security issues,
mobile computing, and so on. This is the career path that the majority of computer science
graduates follow. While a bachelor’s degree is generally sufficient for entry into this kind of
career, many software professionals return to school to obtain a terminal master’s degree.
(Rarely is a doctorate involved.) Career opportunities occur in a wide variety of settings
including large or small software companies, large or small computer services companies,
and large organizations of all kinds (industry, government, banking, healthcare, etc.). Degree
programs in software engineering also educate students for this career path. • Career Path 2:
Devising new ways to use computers. This refers to innovation in the application of computer
technology. A career path in this area can involve advanced graduate work, followed by a
position in a research university or industrial research and development laboratory; it can
involve entrepreneurial activity such as was evident during the dot-com boom of the 1990s;
or it can involve a combination of the two. • Career Path 3: Developing effective ways to
solve computing problems. This refers to the application or development of computer science
theory and knowledge of algorithms to ensure the best possible solutions for computationally
intensive problems. As a practical matter, a career path in the development of new computer
science theory typically requires graduate work to the Ph.D. level, followed by a position in a
research university or an industrial research and development laboratory. • Career Path 4:
Planning and managing organizational technology infrastructure. This is the type of work for
which the new information technology (IT) programs explicitly aim to educate students.
Career paths 2 and 3 are undeniably in the domain of computer science graduates. Career
paths 1 and 4 have spawned the new majors in software engineering and information
technology, respectively, and information systems graduates often follow Career path 1, too.
Computer scientists continue to fill these positions, but programs in software engineering,
information technology, and information systems offer alternative paths to these careers.
Occupations in this field include: • Computer Programmer • Java Developer • Database
Administrator • Software Engineer • Network Engineer Information Technology Information
technology (IT) is a label that has two meanings. In common usage, the term “information
technology” is often used to refer to all of computing. As a name of an undergraduate degree
program, it refers to the preparation of students to meet the computer technology needs of
business, government, healthcare, schools, and other kinds of organizations. IT professionals
possess the right combination of knowledge and practical, hands-on expertise to take care of
both an organization’s information technology infrastructure and the people who use it. They
assume responsibility for selecting hardware and software products appropriate for an
organization. They integrate those products with organizational needs and infrastructure, and
install, customize and maintain those applications, thereby providing a secure and effective
environment that supports the activities of the organization’s computer users. In IT,
programming often involves writing short programs that typically connect existing
components (scripting). Planning and managing an organization’s IT infrastructure is a
difficult and complex job that requires a solid foundation in applied computing as well as
management and people skills. Those in the IT discipline require special skills – in
understanding, for example, how networked systems are composed and structured, and what
their strengths and weaknesses are. There are important software systems concerns such as
reliability, security, usability, and effectiveness and efficiency for their intended purpose; all
of these concerns are vital. These topics are difficult and intellectually demanding.
Occupations in the field include: • Network Administrator • Information Technology
Manager • Computer Support Specialist • Data Security Administrator • Computer
Technician.

Bioinformatics is generally defined as the application of computer science, mathematics


and statistics to the development of algorithms and statistical models involved in the
management and analysis of biological data. Although bioinformatics appears to be a
new field of research, it has been around since the 1960s. The first person to see the
potential of using computers in the fields of biology and medicine was the remarkable
scientist Margaret Dayhoff. Dayhoff applied computational methods during her PhD
thesis in electrochemistry to calculate molecular energies of organic molecules. During
her career, she made several contributions to the bioinformatics field, being the most
remarkable her publication of the first catalog of proteins the Atlas of Protein Sequence
and Structure. Since then, she has been known as the pioneer of Bioinformatics.
The Human Genome Project: the propulsive turbine of bioinformatics

The Human Genome Project, initiated in 1991, aimed to identify the sequence of letters that
make up human DNA and to map all protein-coding genes. In a cell, DNA stores the
information that biologically defines an individual in letters A (Adenine), T (Thymine), C
(Cytosine) and G (Guanine). This huge amount of information, which totals more than 3
billion letters, is stored and organized in 23 chromosomes. DNA is transformed, through a
complex process, into proteins that are the basic components of life, as they perform several
functions that ensure the cell's survival.

Mapping all protein-coding genes has several implications not only in the understanding of
human biology, but also in health care. For example, it has allowed not only the identification
of genes involved in normal biology, but also of genes linked to diseases. The identification
of genes involved in pathophysiology such as Alzheimer's or cancers is crucial to identify the
causes of such diseases, which will eventually lead to improved diagnosis and treatments.

Thus, the Human Genome Project became a key moment for the field of modern
bioinformatics. It fueled the need to develop algorithms and models to understand the gems
of information often hidden in the vast amounts of data that elude human discernment.

The role of bioinformaticians


In the Human Genome Project context, for example, programs were written to assemble
whole genome sequencing (WGS). This may seem a bit mysterious, but in simple words, to
discern the order of the complete sequence of a genome, given its huge size, it needs to be cut
into small pieces of DNA. These pieces will be processed by a sequencing instrument that
reads the DNA and converts it into the digital sequence of letters (ATCG). Therefore, the
next step is to assemble all the sequences to obtain the global sequence of the genome which
will allow finally to map all the protein-coding genes.

OOPs (Object-Oriented Programming


System)
Object means a real-world entity such as a pen, chair, table, computer, watch,
etc. Object-Oriented Programming is a methodology or paradigm to design a
program using classes and objects. It simplifies software development and
maintenance by providing some concepts:

o Object
o Class
o Inheritance
o Polymorphism
o Abstraction
o Encapsulation

Apart from these concepts, there are some other terms which are used in Object-
Oriented design:

o Coupling
o Cohesion
o Association
o Aggregation
o Composition
Object

Any entity that has state and behavior is known as an object. For example, a chair,
pen, table, keyboard, bike, etc. It can be physical or logical.

An Object can be defined as an instance of a class. An object contains an address and


takes up some space in memory. Objects can communicate without knowing the
details of each other's data or code. The only necessary thing is the type of message
accepted and the type of response returned by the objects.

Example: A dog is an object because it has states like color, name, breed, etc. as well
as behaviors like wagging the tail, barking, eating, etc.

Class
Collection of objects is called class. It is a logical entity.

A class can also be defined as a blueprint from which you can create an individual
object. Class doesn't consume any space.

Inheritance
When one object acquires all the properties and behaviors of a parent object, it is
known as inheritance. It provides code reusability. It is used to achieve runtime
polymorphism.

Polymorphism
If one task is performed in different ways, it is known as polymorphism. For example:
to convince the customer differently, to draw something, for example, shape,
triangle, rectangle, etc.

In Java, we use method overloading and method overriding to achieve


polymorphism.

Another example can be to speak something; for example, a cat speaks meow, dog
barks woof, etc.

Abstraction

Hiding internal details and showing functionality is known as abstraction. For example
phone call, we don't know the internal processing.

In Java, we use abstract class and interface to achieve abstraction.


Encapsulation
Binding (or wrapping) code and data together into a single unit are known as
encapsulation. For example, a capsule, it is wrapped with different medicines.

A java class is the example of encapsulation. Java bean is the fully encapsulated class
because all the data members are private here.

Coupling
Coupling refers to the knowledge or information or dependency of another class. It
arises when classes are aware of each other. If a class has the details information of
another class, there is strong coupling. In Java, we use private, protected, and public
modifiers to display the visibility level of a class, method, and field. You can use
interfaces for the weaker coupling because there is no concrete implementation.

Cohesion
Cohesion refers to the level of a component which performs a single well-defined
task. A single well-defined task is done by a highly cohesive method. The weakly
cohesive method will split the task into separate parts. The java.io package is a highly
cohesive package because it has I/O related classes and interface. However, the
java.util package is a weakly cohesive package because it has unrelated classes and
interfaces.

Association
Association represents the relationship between the objects. Here, one object can be
associated with one object or many objects. There can be four types of association
between the objects:

o One to One
o One to Many
o Many to One, and
o Many to Many

Let's understand the relationship with real-time examples. For example, One country
can have one prime minister (one to one), and a prime minister can have many
ministers (one to many). Also, many MP's can have one prime minister (many to one),
and many ministers can have many departments (many to many).

Association can be undirectional or bidirectional.


Aggregation
Aggregation is a way to achieve Association. Aggregation represents the relationship
where one object contains other objects as a part of its state. It represents the weak
relationship between objects. It is also termed as a has-a relationship in Java. Like,
inheritance represents the is-a relationship. It is another way to reuse objects.

Composition
The composition is also a way to achieve Association. The composition represents
the relationship where one object contains other objects as a part of its state. There
is a strong relationship between the containing object and the dependent object. It is
the state where containing objects do not have an independent existence. If you
delete the parent object, all the child objects will be deleted automatically.

dvantage of OOPs over Procedure-oriented


programming language
1) OOPs makes development and maintenance easier, whereas, in a procedure-
oriented programming language, it is not easy to manage if code grows as project
size increases.

2) OOPs provides data hiding, whereas, in a procedure-oriented programming


language, global data can be accessed from anywhere.

Figure: Data Representation in Procedure-Oriented Programming


What is an object in Java

An entity that has state and behavior is known as an object e.g., chair, bike, marker,
pen, table, car, etc. It can be physical or logical (tangible and intangible). The example
of an intangible object is the banking system.

An object has three characteristics:

o State: represents the data (value) of an object.


o Behavior: represents the behavior (functionality) of an object such as deposit,
withdraw, etc.
o Identity: An object identity is typically implemented via a unique ID. The value of the
ID is not visible to the external user. However, it is used internally by the JVM to
identify each object uniquely.
For Example, Pen is an object. Its name is Reynolds; color is white, known as its state.
It is used to write, so writing is its behavior.

An object is an instance of a class. A class is a template or blueprint from which


objects are created. So, an object is the instance(result) of a class.

Object Definitions:

o An object is a real-world entity.


o An object is a runtime entity.
o The object is an entity which has state and behavior.
o The object is an instance of a class.
What is a class in Java
A class is a group of objects which have common properties. It is a template or
blueprint from which objects are created. It is a logical entity. It can't be physical.

A class in Java can contain:

o Fields
o Methods
o Constructors
o Blocks
o Nested class and interface
Syntax to declare a class:

1. class <class_name>{
2. field;
3. method;
4. }

Instance variable in Java


A variable which is created inside the class but outside the method is known as an
instance variable. Instance variable doesn't get memory at compile time. It gets
memory at runtime when an object or instance is created. That is why it is known as
an instance variable.

Method in Java
In Java, a method is like a function which is used to expose the behavior of an object.

Advantage of Method
o Code Reusability
o Code Optimization

new keyword in Java


The new keyword is used to allocate memory at runtime. All objects get memory in
Heap memory area.
Object and Class Example: main within the class

In this example, we have created a Student class which has two data members id and
name. We are creating the object of the Student class by new keyword and printing
the object's value.

Here, we are creating a main() method inside the class.

File: Student.java

1. //Java Program to illustrate how to define a class and fields


2. //Defining a Student class.
3. class Student{
4. //defining fields
5. int id;//field or data member or instance variable
6. String name;
7. //creating main method inside the Student class
8. public static void main(String args[]){
9. //Creating an object or instance
10. Student s1=new Student();//creating an object of Student
11. //Printing values of the object
12. System.out.println(s1.id);//accessing member through reference variable
13. System.out.println(s1.name);
14. }
15. }
Test it Now

Output:

0
null
Object and Class Example: main outside the class

In real time development, we create classes and use it from another class. It is a
better approach than previous one. Let's see a simple example, where we are having
main() method in another class.

We can have multiple classes in different Java files or single Java file. If you define
multiple classes in a single Java source file, it is a good idea to save the file name
with the class name which has main() method.

File: TestStudent1.java

1. //Java Program to demonstrate having the main method in


2. //another class
3. //Creating Student class.
4. class Student{
5. int id;
6. String name;
7. }
8. //Creating another class TestStudent1 which contains the main method
9. class TestStudent1{
10. public static void main(String args[]){
11. Student s1=new Student();
12. System.out.println(s1.id);
13. System.out.println(s1.name);
14. }
15. }
Test it Now

Output:

0
null
3 Ways to initialize object
There are 3 ways to initialize object in Java.

1. By reference variable
2. By method
3. By constructor

1) Object and Class Example: Initialization through reference

Initializing an object means storing data into the object. Let's see a simple example
where we are going to initialize the object through a reference variable.

File: TestStudent2.java

1. class Student{
2. int id;
3. String name;
4. }
5. class TestStudent2{
6. public static void main(String args[]){
7. Student s1=new Student();
8. s1.id=101;
9. s1.name="Sonoo";
10. System.out.println(s1.id+" "+s1.name);//printing members with a white space
11. }
12. }
Test it Now

Output:

101 Sonoo
We can also create multiple objects and store information in it through reference
variable.

File: TestStudent3.java

1. class Student{
2. int id;
3. String name;
4. }
5. class TestStudent3{
6. public static void main(String args[]){
7. //Creating objects
8. Student s1=new Student();
9. Student s2=new Student();
10. //Initializing objects
11. s1.id=101;
12. s1.name="Sonoo";
13. s2.id=102;
14. s2.name="Amit";
15. //Printing data
16. System.out.println(s1.id+" "+s1.name);
17. System.out.println(s2.id+" "+s2.name);
18. }
19. }
Test it Now

Output:

101 Sonoo
102 Amit
2) Object and Class Example: Initialization through method

In this example, we are creating the two objects of Student class and initializing the
value to these objects by invoking the insertRecord method. Here, we are displaying
the state (data) of the objects by invoking the displayInformation() method.

File: TestStudent4.java

1. class Student{
2. int rollno;
3. String name;
4. void insertRecord(int r, String n){
5. rollno=r;
6. name=n;
7. }
8. void displayInformation(){System.out.println(rollno+" "+name);}
9. }
10. class TestStudent4{
11. public static void main(String args[]){
12. Student s1=new Student();
13. Student s2=new Student();
14. s1.insertRecord(111,"Karan");
15. s2.insertRecord(222,"Aryan");
16. s1.displayInformation();
17. s2.displayInformation();
18. }
19. }
Test it Now

Output:

111 Karan
222 Aryan
As you can see in the above figure, object gets the memory in heap memory area.
The reference variable refers to the object allocated in the heap memory area. Here,
s1 and s2 both are reference variables that refer to the objects allocated in memory.

3) Object and Class Example: Initialization through a


constructor

We will learn about constructors in Java later.

Object and Class Example: Employee

Let's see an example where we are maintaining records of employees.

File: TestEmployee.java

1. class Employee{
2. int id;
3. String name;
4. float salary;
5. void insert(int i, String n, float s) {
6. id=i;
7. name=n;
8. salary=s;
9. }
10. void display(){System.out.println(id+" "+name+" "+salary);}
11. }
12. public class TestEmployee {
13. public static void main(String[] args) {
14. Employee e1=new Employee();
15. Employee e2=new Employee();
16. Employee e3=new Employee();
17. e1.insert(101,"ajeet",45000);
18. e2.insert(102,"irfan",25000);
19. e3.insert(103,"nakul",55000);
20. e1.display();
21. e2.display();
22. e3.display();
23. }
24. }

Inheritance in Java
1. Inheritance
2. Types of Inheritance
3. Why multiple inheritance is not possible in Java in case of class?

Inheritance in Java is a mechanism in which one object acquires all the properties
and behaviors of a parent object. It is an important part of OOPs (Object Oriented
programming system).

The idea behind inheritance in Java is that you can create new classes that are built
upon existing classes. When you inherit from an existing class, you can reuse
methods and fields of the parent class. Moreover, you can add new methods and
fields in your current class also.
Inheritance represents the IS-A relationship which is also known as a parent-
child relationship.

Why use inheritance in java


o For Method Overriding (so runtime polymorphism can be achieved).
o For Code Reusability.

Terms used in Inheritance


o Class: A class is a group of objects which have common properties. It is a template or
blueprint from which objects are created.
o Sub Class/Child Class: Subclass is a class which inherits the other class. It is also
called a derived class, extended class, or child class.
o Super Class/Parent Class: Superclass is the class from where a subclass inherits the
features. It is also called a base class or a parent class.
o Reusability: As the name specifies, reusability is a mechanism which facilitates you to
reuse the fields and methods of the existing class when you create a new class. You
can use the same fields and methods already defined in the previous class.

The syntax of Java Inheritance


1. class Subclass-name extends Superclass-name
2. {
3. //methods and fields
4. }

The extends keyword indicates that you are making a new class that derives from an
existing class. The meaning of "extends" is to increase the functionality.

In the terminology of Java, a class which is inherited is called a parent or superclass,


and the new class is called child or subclass.
Java Inheritance Example

As displayed in the above figure, Programmer is the subclass and Employee is the
superclass. The relationship between the two classes is Programmer IS-A Employee.
It means that Programmer is a type of Employee.

1. class Employee{
2. float salary=40000;
3. }
4. class Programmer extends Employee{
5. int bonus=10000;
6. public static void main(String args[]){
7. Programmer p=new Programmer();
8. System.out.println("Programmer salary is:"+p.salary);
9. System.out.println("Bonus of Programmer is:"+p.bonus);
10. }
11. }
Test it Now

Programmer salary is:40000.0


Bonus of programmer is:10000

In the above example, Programmer object can access the field of own class as well as
of Employee class i.e. code reusability.
Types of inheritance in java
On the basis of class, there can be three types of inheritance in java: single, multilevel
and hierarchical.

In java programming, multiple and hybrid inheritance is supported through interface


only. We will learn about interfaces later.

Note: Multiple inheritance is not supported in Java through class.

When one class inherits multiple classes, it is known as multiple inheritance. For
Example:
Single Inheritance Example
When a class inherits another class, it is known as a single inheritance. In the example
given below, Dog class inherits the Animal class, so there is the single inheritance.

File: TestInheritance.java

1. class Animal{
2. void eat(){System.out.println("eating...");}
3. }
4. class Dog extends Animal{
5. void bark(){System.out.println("barking...");}
6. }
7. class TestInheritance{
8. public static void main(String args[]){
9. Dog d=new Dog();
10. d.bark();
11. d.eat();
12. }}
Output:

barking...
eating...

Multilevel Inheritance Example


When there is a chain of inheritance, it is known as multilevel inheritance. As you can
see in the example given below, BabyDog class inherits the Dog class which again
inherits the Animal class, so there is a multilevel inheritance.

File: TestInheritance2.java

1. class Animal{
2. void eat(){System.out.println("eating...");}
3. }
4. class Dog extends Animal{
5. void bark(){System.out.println("barking...");}
6. }
7. class BabyDog extends Dog{
8. void weep(){System.out.println("weeping...");}
9. }
10. class TestInheritance2{
11. public static void main(String args[]){
12. BabyDog d=new BabyDog();
13. d.weep();
14. d.bark();
15. d.eat();
16. }}

Output:

weeping...
barking...
eating...

Hierarchical Inheritance Example


When two or more classes inherits a single class, it is known as hierarchical
inheritance. In the example given below, Dog and Cat classes inherits the Animal
class, so there is hierarchical inheritance.

File: TestInheritance3.java
1. class Animal{
2. void eat(){System.out.println("eating...");}
3. }
4. class Dog extends Animal{
5. void bark(){System.out.println("barking...");}
6. }
7. class Cat extends Animal{
8. void meow(){System.out.println("meowing...");}
9. }
10. class TestInheritance3{
11. public static void main(String args[]){
12. Cat c=new Cat();
13. c.meow();
14. c.eat();
15. //c.bark();//C.T.Error
16. }}

Figure: Data Representation in Object-Oriented Programming

3) OOPs provides the ability to simulate real-world event much more effectively. We
can provide the solution of real word problem if we are using the Object-Oriented
Programming language.
What is the difference between an object-oriented
programming language and object-based
programming language?
Object-based programming language follows all the features of OOPs except
Inheritance. JavaScript and VBScript are examples of object-based programming
languages.

Polymorphism in Java is a concept by which we can perform a single action in


different ways. Polymorphism is derived from 2 Greek words: poly and morphs. The
word "poly" means many and "morphs" means forms. So polymorphism means many
forms.

There are two types of polymorphism in Java: compile-time polymorphism and


runtime polymorphism. We can perform polymorphism in java by method
overloading and method overriding.

If you overload a static method in Java, it is the example of compile time


polymorphism. Here, we will focus on runtime polymorphism in java.

Abstract class in Java


A class which is declared with the abstract keyword is known as an abstract class
in Java. It can have abstract and non-abstract methods (method with the body).

Before learning the Java abstract class, let's understand the abstraction in Java first.

Abstraction in Java
Abstraction is a process of hiding the implementation details and showing only
functionality to the user.

Another way, it shows only essential things to the user and hides the internal details,
for example, sending SMS where you type the text and send the message. You don't
know the internal processing about the message delivery.

Abstraction lets you focus on what the object does instead of how it does it.
Ways to achieve Abstraction

There are two ways to achieve abstraction in java

1. Abstract class (0 to 100%)


2. Interface (100%)

Abstract class in Java


A class which is declared as abstract is known as an abstract class. It can have
abstract and non-abstract methods. It needs to be extended and its method
implemented. It cannot be instantiated.

Points to Remember
o An abstract class must be declared with an abstract keyword.
o It can have abstract and non-abstract methods.
o It cannot be instantiated.
o It can have constructors and static methods also.
o It can have final methods which will force the subclass not to change the body of the
method.
Example of abstract class

1. abstract class A{}

Abstract Method in Java


A method which is declared as abstract and does not have implementation is known
as an abstract method.

Example of abstract method

1. abstract void printStatus();//no method body and abstract

Example of Abstract class that has an abstract method

In this example, Bike is an abstract class that contains only one abstract method run.
Its implementation is provided by the Honda class.
1. abstract class Bike{
2. abstract void run();
3. }
4. class Honda4 extends Bike{
5. void run(){System.out.println("running safely");}
6. public static void main(String args[]){
7. Bike obj = new Honda4();
8. obj.run();
9. }
10. }

Encapsulation in Java
Encapsulation in Java is a process of wrapping code and data together into a single
unit, for example, a capsule which is mixed of several medicines.

We can create a fully encapsulated class in Java by making all the data members of
the class private. Now we can use setter and getter methods to set and get the data
in it.

The Java Bean class is the example of a fully encapsulated class.

Advantage of Encapsulation in Java


By providing only a setter or getter method, you can make the class read-only or
write-only. In other words, you can skip the getter or setter methods.

It provides you the control over the data. Suppose you want to set the value of id
which should be greater than 100 only, you can write the logic inside the setter
method. You can write the logic not to store the negative numbers in the setter
methods.

It is a way to achieve data hiding in Java because other class will not be able to
access the data through the private data members.

The encapsulate class is easy to test. So, it is better for unit testing.
The standard IDE's are providing the facility to generate the getters and setters. So, it
is easy and fast to create an encapsulated class in Java.

Simple Example of Encapsulation in Java

Let's see the simple example of encapsulation that has only one field with its setter
and getter methods.

File: Student.java

1. //A Java class which is a fully encapsulated class.


2. //It has a private data member and getter and setter methods.
3. package com.javatpoint;
4. public class Student{
5. //private data member
6. private String name;
7. //getter method for name
8. public String getName(){
9. return name;
10. }
11. //setter method for name
12. public void setName(String name){
13. this.name=name
14. }
15. }

What is virtual function?


Virtual function is a member function that is declared within the base class and can
be redefined by the derived class.

Let's understand through an example.

1. #include <iostream>
2. using namespace std;
3. class base
4. {
5. public:
6. void show()
7. {
8. std::cout << "Base class" << std::endl;
9. }
10. };
11. class derived1 : public base
12. {
13. public:
14. void show()
15. {
16. std::cout << "Derived class 1" << std::endl;
17. }
18. };
19. class derived2 : public base
20. {
21. public:
22. void show()
23. {
24. std::cout << "Derived class 2" << std::endl;
25. }
26. };
27. int main()
28. {
29. base *b;
30. derived1 d1;
31. derived2 d2;
32. b=&d1;
33. b->show();
34. b=&d2;
35. b->show();
36. return 0;
37. }

In the above code, we have not used the virtual method. We have created a base
class that contains the show() function. The two classes are also created named as
'derived1' and 'derived2' that are inheriting the properties of the base class. Both
'derived1' and 'derived2' classes have redefined the show() function. Inside the main()
method, pointer variable 'b' of class base is declared. The objects of classes derived1
and derived2 are d1 and d2 respectively. Although the 'b' contains the addresses of
d1 and d2, but when calling the show() method; it always calls the show() method of
the base class rather than calling the functions of the derived1 and derived2 class.

Differences between the virtual function and pure


virtual function

Virtual function Pure virtual function

A virtual function is a member function in a base class that A pure virtual function is a member funct
can be redefined in a derived class. declaration is provided in a base class and
class.

The classes which are containing virtual functions are not The classes which are containing pure virtu
abstract classes. classes.

In case of a virtual function, definition of a function is In case of a pure virtual function, defin
provided in the base class. provided in the base class.

The base class that contains a virtual function can be The base class that contains a pure virt
instantiated. abstract class, and that cannot be instantiat

If the derived class will not redefine the virtual function of If the derived class does not define the pur
the base class, then there will be no effect on the throw any error but the derived class becom
compilation.

All the derived classes may or may not redefine the virtual All the derived classes must define the pure
function.
At the core of the C++ Standard Template Library are following three well-structured
components −

Sr.No Component & Description

1 Containers
Containers are used to manage collections of objects of a certain kind. There are severa
different types of containers like deque, list, vector, map etc.

2 Algorithms
Algorithms act on containers. They provide the means by which you will perform
initialization, sorting, searching, and transforming of the contents of containers.

3 Iterators
Iterators are used to step through the elements of collections of objects. These collections
may be containers or subsets of containers.

We will discuss about all the three C++ STL components in next chapter while
discussing C++ Standard Library. For now, keep in mind that all the three
components have a rich set of pre-defined functions which help us in doing
complicated tasks in very easy fashion.
Let us take the following program that demonstrates the vector container (a C++
Standard Template) which is similar to an array with an exception that it
automatically handles its own storage requirements in case it grows −
Live Demo
#include <iostream>
#include <vector>
using namespace std;

int main() {

// create a vector to store int


vector<int> vec;
int i;

// display the original size of vec


cout << "vector size = " << vec.size() << endl;

// push 5 values into the vector


for(i = 0; i < 5; i++) {
vec.push_back(i);
}

// display extended size of vec


cout << "extended vector size = " << vec.size() << endl;

// access 5 values from the vector


for(i = 0; i < 5; i++) {
cout << "value of vec [" << i << "] = " << vec[i] << endl;
}

// use iterator to access the values


vector<int>::iterator v = vec.begin();
while( v != vec.end()) {
cout << "value of v = " << *v << endl;
v++;
}

return 0;
}

When the above code is compiled and executed, it produces the following result −
vector size = 0
extended vector size = 5
value of vec [0] = 0
value of vec [1] = 1
value of vec [2] = 2
value of vec [3] = 3
value of vec [4] = 4
value of v = 0
value of v = 1
value of v = 2
value of v = 3
value of v = 4
Here are following points to be noted related to various functions we used in the
above example −
 The push_back( ) member function inserts value at the end of the vector,
expanding its size as needed.
 The size( ) function displays the size of the vector.
 The function begin( ) returns an iterator to the start of the vector.
 The function end( ) returns an iterator to the end of the vector.

4.1. Why Use Files?

All the programs we have looked at so far use input only from the
keyboard, and output only to the screen. If we were restricted to use only
the keyboard and screen as input and output devices, it would be difficult
to handle large amounts of input data, and output data would always be
lost as soon as we turned the computer off. To avoid these problems, we
can store data in some secondary storage device, usually magnetic tapes
or discs. Data can be created by one program, stored on these devices,
and then accessed or modified by other programs when necessary. To
achieve this, the data is packaged up on the storage devices as data
structures called files.

The easiest way to think about a file is as a linear sequence of characters.


In a simplifed picture (which ignores special characters for text
formatting) these lecture notes might be stored in a file called
"Lecture_4" as:

Figure 4.1.1

(BACK TO COURSE CONTENTS)

4.2 Streams

Before we can work with files in C++, we need to become acquainted with
the notion of a stream. We can think of a stream as a channel or conduit
on which data is passed from senders to receivers. As far as the programs
we will use are concerned, streams allow travel in only one direction. Data
can be sent out from the program on an output stream, or received into
the program on an input stream. For example, at the start of a program,
the standard input stream "cin" is connected to the keyboard and the
standard output stream "cout" is connected to the screen.

In fact, input and output streams such as "cin" and "cout" are examples
of (stream) objects. So learning about streams is a good way to introduce
some of the syntax and ideas behind the object-oriented part of C++. The
header file which lists the operations on streams both to and from files is
called "fstream". We will therefore assume that the program fragments
discussed below are embedded in programs containing the "include"
statement

#include<fstream>

As we shall see, the essential characteristic of stream processing is that


data elements must be sent to or received from a stream one at a time,
i.e. in serial fashion.
Creating Streams

Before we can use an input or output stream in a program, we must


"create" it. Statements to create streams look like variable declarations,
and are usually placed at the top of programs or function implementations
along with the variable declarations. So for example the statements

ifstream in_stream;
ofstream out_stream;

respectively create a stream called "in_stream" belonging to


the class (like type) "ifstream" (input-file-stream), and a stream called
"out_stream" belonging to the class "ofstream" (output-file-stream).
However, the analogy between streams and ordinary variables (of type
"int", "char", etc.) can't be taken too far. We cannot, for example, use
simple assignment statements with streams (e.g. we can't just write
"in_stream1 = in_stream2").

Connecting and Disconnecting Streams to Files

Having created a stream, we can connect it to a file using the member


function "open(...)". (We have already come across some member
functions for output streams, such as "precision(...)" and
"width(...)", in Lecture 2.) The function "open(...)" has a different
effect for ifstreams than for ofstreams (i.e. the function is polymorphic).

To connect the ifstream "in_stream" to the file "Lecture_4", we use the


following statement:

in_stream.open("Lecture_4");

This connects "in_stream" to the beginning of "Lecture_4".


Diagramatically, we end up in the following situation:

Figure 4.2.1
To connect the ofstream "out_stream" to the file "Lecture_4", we use an
analogous statement:

out_stream.open("Lecture_4");

Although this connects "out_stream" to "Lecture_4", it also deletes the


previous contents of the file, ready for new input. Diagramatically, we end
up as follows:

Figure 4.2.2

To disconnect connect the ifstream "in_stream" to whatever file it is


connected to, we write:

in_stream.close();

Diagramatically, the situation changes from that of Figure 4.2.1 to:

File represents storage medium for storing data or information.


Streams refer to sequence of bytes. In Files we store data i.e. text or
binary data permanently and use these data to read or write in the
form of input output operations by transferring bytes of data. So we
use the term File Streams/File handling. We use the header
file <fstream>

 ofstream: It represents output Stream and this is used for


writing in files.
 ifstream: It represents input Stream and this is used for
reading from files.

 fstream: It represents both output Stream and input Stream.


So it can read from files and write to files.

Operations in File Handling:

 Creating a file: open()

 Reading data: read()

 Writing new data: write()

 Closing a file: close()

Creating/Opening a File

We create/open a file by specifying new path of the file and mode


of operation. Operations can be reading, writing, appending and
truncating. Syntax for file creation: FilePointer.open("Path",ios::mode);

 Example of file opened for writing: st.open("E:\studytonight.txt",ios::out);

 Example of file opened for reading: st.open("E:\studytonight.txt",ios::in);

 Example of file opened for appending: st.open("E:\studytonight.txt",ios::app);

 Example of file opened for truncating: st.open("E:\studytonight.txt",ios::trunc);

Random Access
Function Sequential Access (FILE) More Information
(DISK)
Storage space Disk blocks Volumes Space allocation and
allocation and tracking by blocks
tracking uses more database
storage space, and
requires more
processing power
than space allocation
and tracking by
Random Access
Function Sequential Access (FILE) More Information
(DISK)
volume.
Concurrent volume
access means that
A volume can be
A volume can be accessed two or more
Concurrent volume accessed
concurrently by different different operations
access concurrently by
operations can access the same
different operations
volume at the same
time.
Multi-session restore
enables backup-
archive clients to
perform multiple
restore sessions for
no-query restore
operations,
increasing the speed
of restores. Active-
data pools that are
defined by using
sequential-access
Multiple concurrent sessions
disk (FILE) enable
access different volumes
fast client restore
simultaneously on both the
Client restore One session per because the server
server and the storage agent.
operations restore does not physically
Active versions of client
mount tapes and
backup data are collocated in
does not position
active-data pools.
past inactive files.

For more
information,
see Backing up
primary storage
pools, and the
information about
client restore
operations in
the Optimizing
Performance guide.
Available for use in Not available Available for LAN-free Using LAN-free
LAN-free backup backup when using IBM® backup, data moves
General Parallel File System. over a dedicated
storage area network
(SAN) to the
sequential-access
storage device,
freeing up
bandwidth on the
LAN.
Random Access
Function Sequential Access (FILE) More Information
(DISK)

For more
information,
see LAN-free data
movement.
For more
information about
volumes on random-
access media, see

The Tivoli Storage


Manager server acquires and Co
Operators need to
defines scratch volumes as nfiguring random
define volumes and
needed if storage access volumes on
specify their sizes,
administrators set disk devices
or define space
Volume the MAXSCRATCH paramet
triggers to
configuration er to a value greater than zero.
automatically Configuring
allocate space when random access
Operators can also define
a threshold is
space triggers to automatically volumes on disk
reached. devices
allocate space when a
threshold is reached.
For more
information about
volumes on FILE
devices,
see Configuring
FILE sequential
volumes on disk
devices.
Caching can
improve how
Server caching is
quickly the Tivoli
available, but
Tivoli Storage Storage
overhead is incurred
Manager server Server caching is not Manager server
in freeing the cached
caching (after files necessary because access retrieves files during
space. For example,
are migrated to the times are comparable to client restore or
as part of a backup
next storage pool in random access (DISK) access retrieve operations.
operation, the server
the storage pool times.
must erase cached
hierarchy) For more
files to make room
information,
for storing new files.
see Caching in disk
storage pools.
Recovery of disk When caching is The server recovers disk space For more
space enabled, the space in a process that is information about
Random Access
Function Sequential Access (FILE) More Information
(DISK)
that is occupied by
cached files is
reclaimed on
demand by the called reclamation, which
server. involves copying physical
files to another volume, reclamation,
When caching is making the reclaimed volume see Reclaiming
disabled, the server available for reuse. This space in sequential-
recovers disk space minimizes the amount of access storage pools.
immediately after all overhead because there is no
physical files are mount time required.
migrated or deleted
from within an
aggregate.
An aggregate is two
or more files that are
grouped together for
storage purposes.
Most data from
backup-archive
Aggregate reconstruction clients is stored in
occurs as part of the aggregates.
reclamation process. It is also Aggregates
Not available; the
Aggregate available by using accumulate empty
result is wasted
reconstruction the RECONSTRUCT paramespace as files are
space
ter on the MOVE deleted, expire, or as
DATA and MOVE they are deactivated
NODEDATA commands. in active-data pools.

For more
information,
see Tivoli Storage
Manager
reclamation.
Copy storage pools
and active-data
pools provide extra
levels of protection
Available for use as for client data.
copy storage pools Not available Available
or active-data pools For more
information,
see Backing up
primary storage
pools.
File location Volume location is FILE volumes use directories.
limited by the A list of directories can be
trigger prefix or by specified. If directories
Random Access
Function Sequential Access (FILE) More Information
(DISK)
correspond with file systems,
manual specification
performance is optimized.
Use the AUDIT
VOLUME comman
d to identify
inconsistencies
between information
about a volume in
the database and the
actual content of the
Use volume. You can
the REUSEDELAY paramete specify whether
r to retain volumes in a the Tivoli Storage
pending state. Volumes are Manager server
Restoring the not rewritten until the resolves the
See More
database to an specified number of days have database
Information
earlier level elapsed. During database inconsistencies it
restoration, if the data is finds.
physically present, it can be
accessed after DSMSERV For more
RESTORE DB. information about
auditing volumes,
see Auditing storage
pool volumes. For
more information
about reuse delay,
see Delaying reuse
of volumes for
recovery purposes.
Performed by volume. Files
are not migrated from a
Performed by node. volume until all files on the
For more
Migration from volume have met the threshold
information,
Migration random-access pools for migration delay as
see Migrating disk
can use multiple specified for the storage pool.
storage pools.
processes. Migration from sequential-
access pools can use multiple
processes.
Performed by node
and file space. Every
Performed by volume. For a
storage pool backup
primary pool, there is no need
operation must For more
to scan every object in the
Storage pool backup check every file in information,
primary pool every time the
the primary pool to see Storage pools.
pool is backed up to a copy
determine whether
storage pool.
the file must be
backed up.
Copying active data Performed by node Performed by volume. For a For more
Random Access
Function Sequential Access (FILE) More Information
(DISK)
and file space. Every
storage pool copy
primary pool, there is no need
operation must
to scan every object in the
check every file in information,
primary pool every time the
the primary pool to see Storage pools.
active data in the pool is
determine whether
copied to an active-data pool.
the file must be
copied.
Major benefits by
moving data from
non-collocated
storage to DISK
storage, and then
Some benefit by moving data For more
allowing data to
Transferring data from non-collocated storage to information,
migrate to
from non-collocated FILE storage, and then see Keeping client
collocated storage.
to collocated storage moving data to collocated files together using
storage. collocation.
For more
information,
seeRestoring files to
a storage pool with
collocation enabled.
If shredding is
enabled, sensitive
data is destroyed
after it is deleted For more
from a storage pool. Shredding is not supported on information,
Shredding data
Write caching on a sequential access disk devices. see Securing
random access sensitive client data.
device must be
disabled if shredding
is enforced.
Duplicate data in primary,
copy, and active-data pools
For more
can be identified and
information,
Data deduplication Not available removed, reducing the overall
see Deduplicating
amount of time that is
data.
required to retrieve data from
disk.
Comparing random access and sequential access disk devices
An exception is a problem that arises during the execution of a program. A C++
exception is a response to an exceptional circumstance that arises while a program
is running, such as an attempt to divide by zero.
Exceptions provide a way to transfer control from one part of a program to another.
C++ exception handling is built upon three keywords: try, catch, and throw.
 throw − A program throws an exception when a problem shows up. This is
done using a throw keyword.
 catch − A program catches an exception with an exception handler at the
place in a program where you want to handle the problem.
The catch keyword indicates the catching of an exception.
 try − A try block identifies a block of code for which particular exceptions will
be activated. It's followed by one or more catch blocks.
Assuming a block will raise an exception, a method catches an exception using a
combination of the try and catch keywords. A try/catch block is placed around the
code that might generate an exception. Code within a try/catch block is referred to
as protected code, and the syntax for using try/catch as follows −
try {
// protected code
} catch( ExceptionName e1 ) {
// catch block
} catch( ExceptionName e2 ) {
// catch block
} catch( ExceptionName eN ) {
// catch block
}
You can list down multiple catch statements to catch different type of exceptions in
case your try block raises more than one exception in different situations.

Throwing Exceptions
Exceptions can be thrown anywhere within a code block using throw statement.
The operand of the throw statement determines a type for the exception and can be
any expression and the type of the result of the expression determines the type of
exception thrown.
Following is an example of throwing an exception when dividing by zero condition
occurs −
double division(int a, int b) {
if( b == 0 ) {
throw "Division by zero condition!";
}
return (a/b);
}

Catching Exceptions
The catch block following the try block catches any exception. You can specify
what type of exception you want to catch and this is determined by the exception
declaration that appears in parentheses following the keyword catch.
try {
// protected code
} catch( ExceptionName e ) {
// code to handle ExceptionName exception
}
Above code will catch an exception of ExceptionName type. If you want to specify
that a catch block should handle any type of exception that is thrown in a try block,
you must put an ellipsis, ..., between the parentheses enclosing the exception
declaration as follows −
try {
// protected code
} catch(...) {
// code to handle any exception
}

You might also like