Professional Documents
Culture Documents
Lecture 19
Programming Languages
1
Last time we discussed what to implement Today we are going to discuss the tool that is used to implement SW
Todays Lecture
To understand the role of programming languages in computing To understand the differences among low- & high-level, interpreted & compiled, and structured & object-oriented programming languages
Programming?
5
Types of Programs?
7
Batch Programs
These are typically started from a shell (or
automatically via a scheduler) and tend to follow a pattern of: Initialize internal data Read input data Process that data Print or store results Key feature: No user interaction with the computer while the program is running
Examples?
Event-Driven Programs
Examples? GUIs, microwave, camera The system sends events to the program and the program responds to these as they arrive. Events can include things a user does - like clicking the mouse - or things that the system itself does - like updating the clock.
Programming Language?
10
A vocabulary and set of grammatical rules for instructing a computer to perform specific tasks
11
Machine Language Assembly Language (1956-63) LISP (1956) Ada(1983) Fortran (1957) C++ (1983-85) COBOL (1959) QBasic (1986) PL/1(1964) Perl (1987) BASIC (1964) VisualBasic (1991) Pascal (1970) PowerBuilder Smalltalk (1972) Java (1995) C (1972) JavaScript C# (2001)
14
High-level programming languages, while simple compared to human languages, are more complex than the languages the uP actually understands, called machine languages
Each different type of microprocessors has its own unique machine language
18
Lying between machine languages & high-level languages are languages called assembly languages
19
Assembly languages are similar to machine languages, but are easier to program in as they allow a programmer to substitute names for numbers
20
22
Regardless of what language you use, you eventually need to convert your program into a language that the computer can understand Two ways for doing that: compile the program or interpret the program
23
Interpreters:
Immediate response, but execute code slowly
Compilers:
Takes longer to compile, but super-fast execution
26
Both interpreters and compilers are available for most high-level languages.
27
30
32
The question of which language is best is one that consumes a lot of time and energy among computer professionals Every language has its strengths and weaknesses
33
FORTRAN is a particularly good language for processing numerical data, but it does not lend itself very well to large business programs
Pascal is very good for writing well-structured and readable programs, but it is not as flexible as the C programming language C++ embodies powerful object-oriented features, but it is complex and difficult to learn
34
The choice of which language to use can also depend on the: type of computer the program is to run on, and the
expertise of the programmer
35
Can a single language have all the good bits of other languages?
36
What changes in the field of computer languages can we expect in the near future?
41
Programming
Development
43
SW Methodology?
44
Design
The set of (often flexible) rules and guidelines a team of developers follow to construct reasonably complex SW systems
45
Making small changes in the functionality of the systems sometimes leads to major re-design exercise 48
49
Object-Oriented Languages
Programming languages specifically designed to make it easy to implement object-oriented designs
50
Reading Material
Programming Languages http://www.wikipedia.com/wiki/Programming_language What is Object-Oriented Software?
http://highered.mcgraw-hill.com/sites/0077097610
VisualBasic: Taming the Wooly Mammoth http://computer.org/software/so2000/pdf/s3016.pdf
51
52