Sie sind auf Seite 1von 16

Programming

& Languages
Programs
• Programs convert data (unprocessed facts)
into information (processed facts).

• For example, a payroll program would


instruct the computer to take the number
of hours you worked in a week (data) and
multiply it by your pay rate (data) to
determine how much you are paid for the
week (information).
Generations of Programming
Languages (Low-Level)
Vary according to the make of computer—cannot be run on
more than one kind of computer (not “portable” from one
machine to another)
● Machine Languages (1GL): Data represented in 1s and
0s is written in machine language
○ 111100100111001111010010000100000111000000101011
● Assembly Languages (2GL): Use abbreviations or
mnemonics that are automatically converted to the
appropriate sequence of 1s and 0s
○ Obscure but much easier for humans to understand and to use
○ ADD, SUB, MULT, SHR, SHL, JMP, XOR, XNOR, etc.
○ E.g., ADD 210(8,13),02B(4,7)
Generations of Programming
Languages (High-Level)
● Procedural Languages (3GL): Designed to express
the logic—the procedures—that can solve general
problems
○ Most widely used languages to create software
applications
○ Require some training to use
○ C, C++, Java, Javascript, and Visual Basic
● Task-Oriented Languages (4GL): Very high-level
languages, designed to solve specific problems
○ Many 4GLs are part of a database management system.
○ Require little special training on the part of the
user.
○ Perl, PHP, Python, Ruby and SQL
3GL Compiled and Interpreted
Code
● Compiler: Converts the programmer’s procedural
language program (source code) into a machine
language code (object code).
○ Object code can be saved and run later.
○ Examples of procedural languages using compilers
are the standard versions of C++ and Visual Basic.
● Interpreter: Converts the procedural language
one statement at a time into machine code just
before it is to be executed.
○ No object code is saved.
○ An example of a procedural language using an
interpreter is the standard version of BASIC.
Types of Task-Oriented
Languages (4GL)
● Query Languages: Enable non-programmers to
use certain easily understood commands to
search and generate reports from a
database.
○ E.g., SELECT client FROM dailyLog WHERE
serviceEnd >17
● Application Generators: A program that
provides modules of prewritten code to
quickly create a program by referencing
the module(s) that performs certain tasks.
Problem and Constraint
Languages (Fifth Generation)
Computer languages that incorporate the concepts of
artificial intelligence to allow a person to provide a
system with a problem and some constraints, and then
request a solution.
● Would enable a computer to learn and to apply new
information as people do.
● Instead of coding (keying in specific commands), we
would communicate more directly to a computer using
natural languages.
● E.g., Get patientDiagnosis from patientSymptoms
“sneezing”, “coughing”, “aching”
● Mercury, prolog, OPSS
Why Are There A Lot Of
Programming Languages?
● Each programming language is well-suited for
a specific purpose or for unique types of
software:
○ Complicated scientific computations
○ Business and accounting calculations
○ Graphics and video display

● Similar to foreign languages, each


programming language has its own way of
expressing or communicating instruction to
the computer
Software Development
or Programming Tools
● For the creation, debugging, and maintenance of
programs
● Important for keeping our applications working
properly (bug-free)
● Used by software developers and engineers
● Integrated Development Environments (IDEs):
Usually includes source code editor, build
automation tools, compiler, interpreter, and/or
debugger
○ Eclipse: Java applications
○ Microsoft Visual Studio: Windows apps
○ Xcode: Mac and iOS apps
“Hello, World!” in Different Programming Languages

Das könnte Ihnen auch gefallen