programming languages chapter 5. what is “programming” writing source code and turning it into a...

14
Programming Languages Chapter 5

Upload: valentine-nigel-lewis

Post on 19-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Programming Languages Chapter 5. What is “Programming” Writing source code and turning it into a sequence of machine language instructions that the computer

Programming Languages

Chapter 5

Page 2: Programming Languages Chapter 5. What is “Programming” Writing source code and turning it into a sequence of machine language instructions that the computer

What is “Programming”

Writing source code and turning it into a sequence of machine language instructions that the computer can execute.

Page 3: Programming Languages Chapter 5. What is “Programming” Writing source code and turning it into a sequence of machine language instructions that the computer

“Generations” of Programming Languages

Page 4: Programming Languages Chapter 5. What is “Programming” Writing source code and turning it into a sequence of machine language instructions that the computer

“Generations” of Programming Languages

First Generation Machine language

Second Generation Assembly language

Third Generation “High-level” languages such as Pascal, C, COBOL, Fortran

Fourth Generation Scripting languages such as SQL, Applescript, VBScript

Fifth Generation? Natural language? Automatic code generation? Object-oriented

languages?

Page 5: Programming Languages Chapter 5. What is “Programming” Writing source code and turning it into a sequence of machine language instructions that the computer

Four types of programming languages

Functional Lisp, ML, Scheme Good for evaluating expressions.

Declarative Prolog Good for making logical inferences.

Imperative C, Pascal, Fortran, COBOL Good at performing calculations, implementing algorithms.

Object-oriented C++, Java, C#, Visual Basic Much like imperative languages, but have support for “communication” among

objects.

Page 6: Programming Languages Chapter 5. What is “Programming” Writing source code and turning it into a sequence of machine language instructions that the computer

History of Programming Languages

Page 7: Programming Languages Chapter 5. What is “Programming” Writing source code and turning it into a sequence of machine language instructions that the computer

Integrated Development Environments

Source-code editor Source-code management Compiler Interactive debugger

Page 8: Programming Languages Chapter 5. What is “Programming” Writing source code and turning it into a sequence of machine language instructions that the computer

Visual Basic IDE

Page 9: Programming Languages Chapter 5. What is “Programming” Writing source code and turning it into a sequence of machine language instructions that the computer

Visual C++ IDE

Page 10: Programming Languages Chapter 5. What is “Programming” Writing source code and turning it into a sequence of machine language instructions that the computer

“Variables”

Page 11: Programming Languages Chapter 5. What is “Programming” Writing source code and turning it into a sequence of machine language instructions that the computer

While loop control structure

Page 12: Programming Languages Chapter 5. What is “Programming” Writing source code and turning it into a sequence of machine language instructions that the computer

For-loop control structure

Page 13: Programming Languages Chapter 5. What is “Programming” Writing source code and turning it into a sequence of machine language instructions that the computer

If conditional control structure

Page 14: Programming Languages Chapter 5. What is “Programming” Writing source code and turning it into a sequence of machine language instructions that the computer

Case conditional control structure