Chapter 4 Comp
Chapter 4 Comp
A computer program is written in a specific language that a computer can understand and interpret.
Here information was entered into the computer in the form of long series of 1s and 0s or the
binary codes. Binary instructions are equivalent to the on/off signals.
Programs written in assembly language require a translator to convert them into machine
language. This is we called an assembler.
This generation of language contains instructions in the form of English like commands to
perform a task.
A translator needed to translate the symbolic instructions in the form of English like
commands to perform a task.
Increase productivity because programmers have to type fewer lines of codes to get
something done.
Ex: IBM’S ADRS2, APL, CSP AND AS, POWER BUILDER, Access and Structured Query Language
(SQL)
This generation languages are designed to make the computer solve a given problem without
much involvement of the programmer.
These languages are used mainly in artificial intelligence research.Means computer are now
have the ability to think for themselves and draw their own inferences using programmed
information in large databases.
This is defined as a computer program that converts instructions written in a given computer
language to another.
The output of the assembler program is then called the object code or the machine code.
Complier
Compiler is a program that translates source code into object code. ...
Because compilers translate source code into object code, which is unique for each type of
computer, many compilers are available for the same language. For example, there is a
FORTRAN compiler for PCs and another for Apple Macintosh computers.
The basic disadvantage of using complier is that a lot of disk space is used.
Interpreter
In computer science, an interpreter is a computer program that directly executes instructions
written in a programming or scripting language, without requiring them previously to have been
compiled into a machine language program.
The disadvantage of an interpreter is that it has no memory to store the translated lines.Every
time a program is executed, the source code has to be converted afresh.
Modular Programming
Modular programming is a software design technique that emphasizes separating the functionality
of a program into independent, interchangeable modules, such that each contains everything
necessary to execute only one aspect of the desired functionality.
Procedural programming
Procedural Programming involves writing down a list of instructions to tell the computer what it
should do step-by-step to finish the task at hand.
In OOP Programed is no longer series of instructions but the collections of objects. These
objects contain both data and instructions that are assigned to classes and can perform
specific task.
Advantages
1. Programmers can build programs form preexisting objects and can use features
from one program in another.
2. Result in faster development and save times.
3. Reduces maintain cost
4. Improves flexibility for future reference.
Ex: C++, Java, ADA
Even-driven Programming
In computer programming, event-driven programming is a programming paradigm in which the
flow of the program is determined by events such as user actions (mouse clicks, key presses),
sensor outputs, or messages from other programs or threads.
The process of rapidly creating an application without extensive pre-planning is typically referred
as RAD
Ex: RAD
Exercise