240 likes | 478 Views
Structured Programming. General Introduction. Content. Computer Languages Programming terminology Phases of writing programs Typical C++ development environment. Objectives. By the end you should recognize: Computer language Types of programming languages C++ as a high level language
E N D
Structured Programming General Introduction
Content • Computer Languages • Programming terminology • Phases of writing programs • Typical C++ development environment
Objectives • By the end you should recognize: • Computer language • Types of programming languages • C++ as a high level language • The C++ development environment • Programming related terms • Programming steps • What a compiler is and what it does • How a C++ program is processed
Programming Languages Three types of computer languages • Machine language • “Natural language” of computer • Only language computer directly understands • Generally consist of strings of 0s and 1s • Instruct computers to perform elementary operations • Cumbersome for humans
Programming Languages (cont.) • Assembly language • English-like abbreviations representing elementary computer operations • Clearer to humans • Incomprehensible to computers • Convert to machine language by translator programs (assemblers)
Programming Languages • High-level languages • Similar to everyday English • Uses common mathematical notations • Clearer to humans • Single statements accomplish substantial tasks • Incomprehensible to computers • Convert to machine language by translator programs (compilers)
C++ Applications in Real World • Adobe systems • Photoshop and ImageReady, • Illustrator and Acrobat • Microsoft • Windows XP , Microsoft Office , Internet Explorer , Visual Studio • iPod user interface
Terms • Algorithm • Set of precisely defined steps to calculate an answer to a problem or set of problems • Programming • Art and science of solving problems by the following procedure • Find or invent a general solution to a problem • Express this solution as an algorithm or set of algorithms • Translate the algorithm(s) into terms so simple that a stupid machine like a computer can follow them to calculate the specific answer for any specific problem.
Terms (cont.) • Source code • Program in a form suitable for reading and writing by a human being • Executable program (executable) • Program in a form suitable for running on a computer • Compilation • Process of translating source code into object code • Compiler • Program that performs compilation as defined above
How to Write a Program • Define the problem precisely • Find and/or create the algorithms that will solve the problem • Use a C++ Editor to implement the algorithm to obtain the source code • Use the Compiler to • Check correctness of source code • If No errors, Translate source code into • executable program (object code with machine language ) • The user runs the resulting executable program on a computer
Source Code Editor
More Details • Source code Vs. object code • refer to the "before" and "after" versions of a computer program that is compiled before it is ready to run in a computer • To write C++ programs • a text editor (Notepad) or a visual programming tool is needed • The object code file • contains a sequence of instructions that the processor can understand but that is difficult for a human to read or modify.
Included Sections Chapter 1: from section 7, 8, and14