Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 16 Programming and Languages: Telling the Computer What to Do.

Similar presentations


Presentation on theme: "Chapter 16 Programming and Languages: Telling the Computer What to Do."— Presentation transcript:

1 Chapter 16 Programming and Languages: Telling the Computer What to Do

2 Programming n program (software) - a set of instructions written in a programming language that is designed to solve a problem n programming language - set of rules and symbols that provide a way of telling the computer what operations to perform –syntax - grammar rules –semantics - rules that define the meaning of an instruction

3 There are many programming languages because... n as computer science advances new ideas and techniques have been used to design new languages and improve old ones n different types of problems call for languages with different strengths

4 Programming process n define the problem n develop an algorithm (plan) –step-by-step procedure for solving the problem in a finite amount of time n code the program –convert the algorithm into programming instructions

5 Programming process n test and debug –compile (translate) the program into an executable form –run it with sample data –if errors (bugs) detected, adjust program and retest n documentation –developed throughout the process –includes problem definition, algorithm, comments in program, testing procedures

6 Levels of Programming Languages n machine language –only language computer can directly understand and execute –instructions are sequences of 0’s and 1’s –all programs must be translated into machine language to be executed –considered machine dependent because each processor has its own machine language (very low level)

7 Levels of Programming Languages n assembly language –low level language –machine dependent –replaces 0’s and 1’s with mnemonic names (abbreviations that are easy to remember) –requires an assembler to translate program into machine language –very tedious to use

8 Levels of Programming Languages n high-level languages –make use of familiar words and symbols to construct instructions –allow programmers to focus on problem- solving rather than hardware –machine independent –requires a translator program (usually a compiler) –examples: FORTRAN, COBOL, BASIC, C, C++, Java

9 Levels of Programming Languages n very high-level languages –aka fourth-generation languages –nonprocedural language - specify results and language develops solution –tend to be specialized applications n natural languages –closely resemble spoken or written English –system may require clarification –limited applicability


Download ppt "Chapter 16 Programming and Languages: Telling the Computer What to Do."

Similar presentations


Ads by Google