Chap1 - Chapter 1-Introduction 1 Outline Introduction to...

Info icon This preview shows pages 1–16. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Chapter 1-Introduction
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 Outline Introduction to Programming The first program in C Problem Solution and Software Development Algorithms Common Programming Errors
Image of page 2
3 Introduction to Programming Program: self-contained set of instructions used to operate a computer to produce a specific result Also called software Programming: the process of writing a program, or software Programmer
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 Computer Languages Low-level languages: languages that use instructions tied directly to one type of computer Examples: machine language, assembly language High-level languages : instructions resemble written languages, such as English,and can be run on a variety of computer types Examples: Visual Basic, C, C++, Java
Image of page 4
5 Computer Languages (continued) Machine language, consist of binary instructions :0 and 1 Writing in machine language is tedious! Assembly Language: programming language with symbolic names for codes, and decimals or labels for memory addresses Example: ADD 1, 2 MUL 2, 3 Assembly language programs must be translated into machine instructions, using an assembler
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
6 Computer Languages(continued)
Image of page 6
7 Computer Languages(continued) Source code: the programs written in a high- or low-level language Source code must be translated to machine instructions in one of two ways: Interpreter: each statement is translated individually and executed immediately after translation Compiler: all statements are translated and stored as an executable program, or object program; execution occurs later
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
8 Computer Languages(continued) Large C or C++ or Java programs may be stored in two or more separate program files due to Use of previously written code Use of code provided by the compiler Modular design of the program (for reusability of components) Linker : combines all of the compiled code required for the program
Image of page 8
9 Computer Languages(continued)
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
10 Programming Methods: Procedural and Object-Oriented Programs can also be classified by their orientation: Procedural: available instructions are used to create self-contained units called procedures Object-oriented: reusable objects, containing code and data, are manipulated Object-oriented languages support reusing existing code more easily
Image of page 10
11 Problem Solution and Software Development Software development procedure: method for solving problems and creating software solutions Consists of three phases: Phase I: Development and Design Phase II: Documentation Phase III: Maintenance Software engineering: discipline concerned with creating efficient, reliable, maintainable software
Image of page 11

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
12 Problem Solution and Software Development (continued) Figure 1.6 The three phases of software development.
Image of page 12
13 Problem Solution and Software Development: Phase I. Development and Design Program requirement: request for a program or a statement of a problem After a program requirement is received, Phase I begins Phase I consists of four steps: Analysis Design Coding Testing
Image of page 13

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon