Chapter 13 Objectives
What is programming languages?
The types of generations programming languages
Describe various ways to develop Web pages including
HTML, scripting languages, DHTML, XML, and WML.
List the six steps in the program development cycle
Explain the basic control structures used in designing
solutions to programming problems.
Computer
Programs and Programming Languages
What is programming
language?
A program is a sequence of
symbols that specifies a computation. A programming language is a set of rules
that specify which sequences of symbols constitute a program, and what computation the
program describes. Programs and
languages can be defined as purely formal mathematical objects.
A programming language is an
abstraction mechanism. It enables a programmer to specify a computation
abstractly, and to let a program (usually called an assembler, compiler or interpreter)
implement the specification in the detailed form needed for execution on a
computer.
What are low level
languages and high level languages?
Low level languages are machines
that dependent that only run on one computer example machine and assembly
language. High level languages are often machine independent that can run on
many different types of computer
Types of generation
programming languages
First
generation programming languages
Machine Language only language computer directly
recognizes, is the first generation programming language. Machine
languages instruction uses series of binary digits (1s and 0s), it could be the
combination of numbers and letters that represents binary digits. The binary
digit correspond to the on and off electrical state. They are sometimes time
consuming and tedious.
Second generation programming languages
Assembly Language is referred to as the second
generation of programming language with the assembly language a programmer
write instructions using symbols instruction codes, since machine codes are too
hard to remember, each processor manufacture designs an “easy-toremember”names
for each op-code.programmer writes abbreviations such
as A for addition, C for
compare, L for load, and M for multiply.
Despite this advantages assembly
languages are difficult to learn and understand. The assembly languages must
first convert the program to a machine language before the computer can
execute, or run, the program. A source programme contains the language
instruction, or code to be converted to machine language.
Third generation
programming languages
Procedural language are often
called third generation programming language, in procedural language the
programmer writes instruction that tells the computer what to accomplish and
how to do it.it uses series of English like words to write instruction. Most widely used are BASIC, COBOL,
and C.
A compiler is a separate program that converts
the entire source program into machine language before executing, it stores the
object code on storage media for execution later, and it also checks the source
program for errors.
An
interpreter reads a code statement,
converts it to one or more machine language instructions, and then executes
those machine language instructions. Program that translates and executes one
program code statement at time it does not produce object program.
A
sample of machine coding language.
Examples of 3rd
generation languages
The C programming language, Powerful
language originally designed to write system software. They requires
professional programming skills. Mostly many programmes are written in C. it is
used in solving business and scientific problems C runs on almost any type of
computer with any operating system, but it is used most often with the UNIX and
Linux operating systems.
COBOL (Common
Business-Oriented Language) Designed for business applications, English-like
statements make code easy to read, write, and maintain. COBOL especially is
useful for processing transactions, such as payroll and billing, on mainframe
computers. COBOL programs also run on other types of computers.
Object –oriented programming
language Used to implement object-oriented design Major benefit is ability to
reuse existing objects, C++ and Java
are complete object-oriented languages
Java
Developed by Sun Microsystems Similar to C++ but uses just-in-time (JIT)
compiler to convert source code into machine code
C++ Includes all elements of C, plus additional features for working with
object-oriented concepts, Used to develop database and Web applications.
A sample program in c++ coding
language
Fourth-generation
programming languages
Nonprocedural
language that enables users and programmers to access data in a database, popular
4GL is SQL, query language that allows users to manage data in relational DBMS.
These powerful languages allow database administrators to define a database and
its structure. They also enable users to maintain and access the data in the
database.
Fifth –generation programming
languages
5GL (Fifth- Generation
Language) is also a programming
language that uses a visual or graphical development interface to create source
language that is usually compiled with a 3GL or 4GL language compiler. 5GL is
also known as natural language.
Fifth generation programming allows people to interact with computers without
needing any specialized knowledge. People can talk to computers and the voice
recognition system can convert spoken sounds into written words. Visual
programming allows you to easily envision object-oriented programming class
hierarchies and drag icons to assemble program components.
Web Development
What is web
development?
They
are the variety of techniques web developers use to create web pages.
HTML and XHTML
HTML
(Hypertext Markup Language) is a special formatting language that programmers
use to format documents for display on the Web. You view a Web page written
with HTML in a Web browser such as Internet Explorer, Safari, Firefox, Opera,
or Google Chrome. Similarly, XHTML (extensible HTML) is a markup language that
enables Web sites to be displayed more easily on micro browsers in smart phones
and other mobile devices, as well as on desktop and notebook computers. Are not actually programming languages. They are, however, languages that
have specific rules for defining the placement and format of text, graphics,
video, and audio on a Web page
XML and WML
XML (Extensible Markup Language)
allows developers to create customized tags, Server sends entire record to
client, enabling client to do much of processing without going back to server. For
example, a smart phone, a PDA, and a notebook computer all could display the
same XML page or use different formats or sections of the XML page. WML (Wireless
Markup Language) allows developers to design pages specifically for micro
browsers, Uses wireless application protocol (WAP), standard that specifies how
wireless devices communicate with Web. Smart phones and other mobile devices
use WML as their markup language.
Scripting
languages
Typically easy to learn and use,
most popular
scripting languages include JavaScript, Perl, PHP, Rexx, Tcl, and VBScript.
JavaScript adds
dynamic content and interactive elements to Web page
VBScript
(Visual Basic, Scripting Edition) adds intelligence and interactivity to Web page
Perl (Practical
Extraction and Report Language) has powerful text processing capabilities
Dynamic HTML
(DHTML)
Is a type of HTML that allows
Web developers to include more graphical interest and interactivity in a Web
page, without the Web page accessing the Web server? That is, the client’s
computer automatically updates and changes its own content. Dynamic HTML
works by using the document object model, cascading style sheets and scripting
language.
The six steps in the program development life cycle
Basically, SDLC consists of all the
steps/stages of software starting from its inception to its implementation. There
are in fact numerous types of SDLC models (Agile, Waterfall et al) and
depending upon your requirements you can choose any of them to meet your
purpose.
Given below are some phases, which
are common in every SDLC model. Let us go through them to get an idea.
1. Requirement Gathering and
Analysis:
Requirement gathering and analysis is
the first stage of any SDLC model. This phase is basically the brainstorming
phase and often consists of sub-stages like Feasibility Analysis to check how
much of the idea can be put into action. If any particular software needs to be
modified, the underlying problem(s) of that software is sorted out along with
finding ways to solve it.
2. System Analysis:
This is the second phase of SDLC
where the entire system is defined in detail. In fact, it this stage wherein a
detailed blueprint of various processes of the software is developed. If needed
the system is divided into smaller parts to make it easier more manageable for
the developers, designers, testers, project managers and other professionals
who are going to work on the software in the latter stages.
3. System Design:
In this phase, the physical system is
designed with the help of the logical design prepared by system analysts. The
analysts and designers work together and use certain tools and software to
create the overall system design, including the probable output.
4. Coding:
As the name implies, in this stage
the software is coded with precision. A team of programmers are assigned by the
company to work on the software. More often than not, the work is sub-divided
under a sub-phase called Task Allocation, where each developer is assigned a
part of the work depending on his or her skill set(s). This helps complete the
coding efficiently.
5. Testing:
When the software is ready, it is
sent to the testing department where Quality Analysts test it thoroughly for
different errors by forming various test cases. They either test the software
manually or using automated testing tools and ensure that each and every component of the
software works fine. Once the QA makes sure that the software is error-free, it
goes to the next stage, which is Implementation.
6. Implementation:
This is the final stage of software
development life cycle. In this stage, if the software is run on various
systems by users. If it runs smoothly on these systems without any flaw, then
it is considered ready to be launched.
Basic control structures and design
tools used in designing solutions to programming problems
Control Structure
A control structure, also known as a construct, depicts the logical order of program
instructions. Three basic control structures are sequence, selection, and
repetition.
i)
A
selection control structure tells the program which action to take, based on a
certain condition. Two common types of selection control structures are the
if-then-else and the case. When a program evaluates the condition in an if-then
else control structure, it yields one of two possibilities: true or false
ii)
With
the case control structure, a condition can yield one of three or more
possibilities. The size of a beverage, for example, might be one of these
options: small, medium, large, or extra-large. A case control structure would
determine the price of the beverage based on the size purchased.
iii)
Repetition
Control Structure, the repetition control structure enables a program to
perform one or more actions repeatedly as long as a certain condition is met. The
two types of repetition control structure are:
a)
Do-while
control structure repeats as long as condition is true.
b)
Do-until
control structure repeats until condition is true
Design tools in Programming
Design tools
it is used by programmers to help document a solution algorithm.
Ø Program flowchart, graphically shows
logic in solution algorithm, connect most symbols on a program flowchart with
solid lines. These lines show the direction of the program. Dotted lines on a
flowchart connect comment symbols.
Ø Flowcharting software to develop
flowcharts. This software makes it easy to modify and update flowcharts, two
popular flowcharting programs are Smart Draw and Visio.

garde you (3)
ReplyDeletei give you (3)
ReplyDelete