| Programming
may be defined as “The process of creating
steps for a computer to perform a desired task.”
Thus programming is a means of controlling a computer’s
Central Processing Unit and its components (computer
memory/ storage, the arithmetical unit and the
logic unit) as well as the various peripherals
attached to the computer, to perform certain tasks
based upon the commands we give it. These commands
may be in a form very similar to readable English
(in which case they are called High Level Languages)
or in a cryptic code including a multitude of
zeros and ones (in which case they are called
Low Level Languages). In between these two extremes
is a hybrid sometimes called Mid Level Programming
Language; this includes features of both high
and low level languages.
Each developer of a computer program works with
a code, which to be intelligible to other programmers,
is developed into a syntax or language. Syntax
therefore can be described as a group of reserved
words that are used to give commands and accomplish
tasks using a particular computer language. If
the language developer wishes that the world use
his/ her particular language, he will get it tested,
copyrighted and published. The language is then
available for testing and use by other programmers.
Programmers have been writing computer code and
languages for the last 50 years or so. BASIC was
the world’s first common intelligible language
for the microcomputer or home computer (Personal
Computer).
Structured Programming is a technique for organizing
and coding computer programs in which a hierarchy
of modules is used, each having a single entry
and a single exit point, and in which control
is passed downward through the structure without
unconditional branches to higher levels of the
structure. In this new approach to programming
called the Modular Approach, the whole structure
of the program is drawn out first, the entire
project is divided into logical but separate parts,
and the parts are then linked together.
Let us now delve into the structure and characteristics
of the following four programming languages: C++,
Java, Visual Basic and Assembly Language.
C++:
The original C language was developed by Dennis
Ritchie and Brian Kerrighan in 1974. Quick C and
C++ are improvements on the original C language.
C++ was designed and implemented by a Scandinavian
called Bjarne Stroustrup. C++ is a general purpose
programming language that leans towards systems
programming. It is better than the original C
because it (a) supports data abstraction (b) supports
object-oriented programming and (c) supports generic
programming. The structure of a C Program is similar
to Fortran. C uses functions much in the same
way as Fortran’s functions and subroutines;
a main function ( ) combines all the functions.
Being an object oriented language, C++ has the
following advantages: (1) Debugging is easier
(2) It is possible to reuse the code (3) There
is more flexibility possible in applications.
Old-fashioned programs forced the user to proceed
step-by-step through a series of screens. Modern
event-driven programs present all the choices
at once and respond to the user's actions. Object-oriented
programming attempts to respond to these needs,
providing techniques for managing enormous complexity,
achieving reuse of software components, and coupling
data with the tasks that manipulate that data.
The essence of object-oriented programming is
to treat data and the procedures that act upon
the data as a single "object"--a self-contained
entity with an identity and certain characteristics
of its own.
C++ fully supports object-oriented programming,
including the four pillars of object-oriented
development: encapsulation, data hiding, inheritance,
and polymorphism. The property of being a self-contained
unit is called encapsulation. With encapsulation,
we can accomplish data hiding. Data hiding is
the highly valued characteristic that an object
can be used without the user knowing or caring
how it works internally.
C++ supports the properties of encapsulation
and data hiding through the creation of user-defined
types, called classes. Users of a well-defined
class do not need to know how the class works;
they just need to know how to use it.
C++ supports the idea of reuse through inheritance.
A new type, which is an extension of an existing
type, can be declared. This new subclass is said
to derive from the existing type and is sometimes
called a derived type.
C++ supports the idea that different objects do
"the right thing" through what is called
function polymorphism and class polymorphism.
Polymorphism refers to the same name taking many
forms.
C++ has been accredited by the American National
Standards Institute (ANSI), and similar institutions
in the UK and Germany. The ANSI standard is an
attempt to ensure that C++ is portable--that code
you write for one compiler will compile without
errors, using a compiler from any other vendor.
Source: Characteristics of a C++ Program (www.olemiss.edu/orgs/ieee/Nithya/tsld024.htm)
Java:
The name Java is a trademark of Sun Microsystems
and refers to the programming language developed
by Sun and released in 1995. Java is used to create
executable content that can be distributed through
networks.
Java brings interactivity to the Web through applications
that can all give the user immediate feedback
and accept user input continuously through mouse
or keyboard entries.
Java animates pages on the Web and makes interactive
and specialized applications possible. This gives
Web information providers the opportunity to create
a hypertext page that engages users in continuous,
real-time, and complex interaction. Java profoundly
changes the Web because it brings a richness of
interactivity and information delivery not possible
using previous Web software systems. Java makes
it possible for programmers to create software
that can be distributed across networks and run
on many different kinds of computers.
Java developers can create virtual worlds that
are not only three-dimensional but also animated
and interactive. Animation isn’t limited
to cartoon figures. Animation can also be made
interactive, where the user has some input on
its appearance. Another variation involves providing
the user with a way to interact with an interface
to get feedback. This is real-time interactivity.
The handlers and applications that Java makes
possible have the potential to dramatically extend
what can be browsed on the Web. The protocol and
content handlers, like the executable content
Java makes possible as applets, can be distributed
as needed to requesting Java-enabled browsers.
Java enriches the interactivity of the Web and
transforms the Web into a software delivery system:
Java’s essential design as a language to
deliver executable content makes it possible for
programmers to create software of any kind and
deliver it to users of Java-enabled browsers.
Java technology is not necessarily limited only
to the Web. Java technology can be deployed in
embedded systems, such as handheld devices, telephones,
and VCRs. Electronics firms have been working
to use Java technology in these devices.
Source: Java Unleashed: Everything You Need to
Know to Master Java (1st Edition)
Sams Publishing Company Copyright 1996
Visual Basic:
BASIC is an acronym for Beginner's All-purpose
Symbolic Instruction Code, developed by a group
of Stanford professors as an improvement over
Fortran. Over the years, there have been improvements
to the original BASIC, such as QBasic. Microsoft
introduced a new programming language, Visual
Basic, a few years ago. The advantages of Visual
Basic are:
• Visual Basic is based on the QBasic programming
language, so programming newcomers find Visual
Basic friendlier than other languages.
• Visual Basic is designed from the ground
up to be a Windows programming language. Inherent
in Visual Basic's fundamental design is the event-driven
program concept. Visual Basic is Event-Driven
and Procedural.
• Visual Basic is graphical in its programming
approach. You can literally create a complete
and working Visual Basic program by moving picture
icons on and off the screen without ever writing
one command in Visual Basic's programming language.
• A program written in Visual Basic looks
almost exactly like the output screen that results.
Source: Visual Basic In 12 Easy Lessons by Greg
Perry (Sams Publishing Co.)
Assembly Language:
Assembly language refers to the earliest of languages
developed for the computer. It was an improvement
over the complicated mechanisms or circuitry devised
for manipulating the computer’s switches
in On and Off states. The syntax of Assembly Language
comprises of commands such as MOV for move, PUH
for push etc. Different versions of assembly language
have been developed for different computers such
as the Z80, the Commodore and Microsoft PC. Modern
day assembly language uses the hexadecimal system,
comprising of digits from 0 to 9 and alpha characters
A to F. An assembler is used for compilation and
library functions.
People do not like Assembly Language because
it is too difficult to use. However it is a fact
that even the most powerful computer does not
understand anything else than machine language.
The job of all programming languages is to take
the source code that you type in a programming
language and to convert it to machine language
so that the computer can execute those instructions.
|