Information Technology INT1001: Programming Languages
Information Technology INT1001: Programming Languages
Programming is the creation of software applications. Programmers are the people who create the software applications. A programming language is a language used by programmers to create programs or software that the computer understands.
Copyright 2009 Pearson Education, Inc. Publishing as Prentice Hall 4
Syntax is the vocabulary and grammar of a programming language. Code is the programming instructions created by the programmers. Source code, the only form of code that humans can read, is program code in its original form.
Machine language Assembly language Procedural languages Nonprocedural languages Natural languages
Machine language
First-generation language Based on binary numbers The only programming language a computer understands directly
Assembly language
A low-level, second-generation language Requires programming individual instructions for each task to be performed by the microprocessor Mnemonics
Uses brief abbreviations for program instructions Makes language easier to use than machine language
9
Procedural languages
Third-generation languages Considered high-level languages Do not require programmers to know details relating to the processing of data Easier to read, write, and maintain
10
Two utility programs that translate code so that the computer can interpret and run programs are:
Compilers
Translate source code into object code Translate source code and execute instructions
Interpreters
11
12
Divide programs into self-contained modules Use information hiding: keeping information about one module secret from authors of other modules
13
Nonprocedural languages
Fourth-generation languages
Report generators (database reports) Query languages Doesnt require programmers to deal with stepby-step procedures to achieve the appropriate programming outcome
14
Natural language
Fifth-generation languages Still being perfected Nonprocedural Use everyday language to program
15
Programmers must select the programming language that can best meets the users needs. Two programming languages that have been used since the 1950s are:
COBOL (Common Business-Oriented Language) for business applications Fortran (formula translator) for scientific/math/engineering applications
16
Object-oriented languages
18
Web-based languages
Not considered programming languages Enable the interpretation of both text and objects by browsers Two types:
19
Markup languages
Define text structure through a set of instructions that are identified with tags. Content lies between tags.
20
HTML (Hypertext Markup Language) XML (Extensible Markup Language) XHTML (eXtensible Hypertext Markup Language
21
Scripting languages
Use basic programs called scripts to control Web page actions or responses VBScript JavaScript Visual Studio.NET
22
Used to overcome debugging and maintenance problems Made up of six phases, from problem definition through program implementation and maintenance
23
24
A programming language, which is made up of its own vocabulary and syntax, creates instructions that a computer understands. Machine language is based on binary code. Assembly language is similar but a little easier to understand than machine language. Both are difficult and demanding compared to later languages.
Copyright 2009 Pearson Education, Inc. Publishing as Prentice Hall 25
Unlike machine and assembly languages, third-generation (high-level) programming languages do not require programmers to have a thorough understanding of processor details. Fourth-generation languages, although even easier for programmers to use, are mostly restricted to accessing databases.
Copyright 2009 Pearson Education, Inc. Publishing as Prentice Hall 26
Object-oriented programming languages work with prebuilt objects for fast, even simpler programming when compared to earlier-generation languages. The program development life cycle (PDLC) minimizes errors and maintenance problems.
Copyright 2009 Pearson Education, Inc. Publishing as Prentice Hall 27
The six phases of the program development life cycle (PDLC) are (1) defining the problem, (2) designing the program, (3) coding the program, (4) testing and debugging the program, (5) documenting the program, and (6) implementing and maintaining the program.
Copyright 2009 Pearson Education, Inc. Publishing as Prentice Hall 28
Debugging and maintaining programs using top-down program design are simpler because program functions are divided into separate modules. Algorithms to perform any processing task can be created by programmers using sequence, selection, and repetition control structures.
Copyright 2009 Pearson Education, Inc. Publishing as Prentice Hall 29
There are two types of bugs: syntax errors, which are errors caused by faulty command structure, and logic errors, which are errors caused by faulty programming design.
30