1 / 16

Structured Programming

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

Download Presentation

Structured Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Structured Programming General Introduction

  2. Content • Computer Languages • Programming terminology • Phases of writing programs • Typical C++ development environment

  3. 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

  4. 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

  5. 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)

  6. 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)

  7. 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

  8. 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.

  9. 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

  10. 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

  11. Source Code Editor

  12. 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.

  13. Typical C++ Environment

  14. Included Sections Chapter 1: from section 7, 8, and14

More Related