Chapter 14 ppt下载

Download Report

Transcript Chapter 14 ppt下载

Chapter 14

Programming and Languages

College of Computer and Information Science

Key Words & Terms

• application generator: 代码生成器 • assembly language: 汇编语言 • beta testing: beta 测试 • code: 代码 • coding: 编码 • compiler: 编译器 • computer-aided software engineering (CASE) tools: 计算机辅助 软件工程工具 • debugging: 调试 • desk checking: 桌面检测 • DO UNTIL structure: 一种循环结构 DO UNTIL • DO WHILE structure: 一种循环结构 DO WHILE • documentation: 文档化 • fifth-generation language (5GL): 第五代语言 • formatting language: 格式化语言 • fourth-generation language (4GL): 第四代语言 • generation: 代,级 • higher level: 高级

College of Computer and Information Science

14-2

Key Words & Terms

• IF-THEN-ELSE structure: 分支结构 • IFPS (interactive financial planning system): 交互式财务策划系统 • interpreter: 解释器 • levels: 层次,级 • logic error: 逻辑错 • logic structure: 逻辑结构 • loop structure: 循环结构 • lower level: 低级 • machine language: 机器语言 • maintenance programmer: 维护程序员 • markup language: 标记语言 • module: 模块 • natural language: 自然语言 • object: 对象 • object code: 对象代码 • object-oriented programming (OOP): 面向对象程序设计 • object-oriented software development: 面向对象软件开发 • objectives: 目标,对象

College of Computer and Information Science

14-3

Key Words & Terms

• • • • • • • • • • • • • • • • • • operators: 操作员 portable language: 可移植语言 problem-oriented language: 面向问题语言 procedural language: 过程语言 program: 程序 program analysis: 程序分析 program coder: 代码生成器 program definition: 程序定义 program design: 程序设计 program documentation: 程序文档 program flowchart: 程序流程图 program maintenance: 程序维护 program modules: 程序模块 program specification: 程序说明 programmer: 程序员 programming: 编程,程序设计 programming language: 程序设计语言 pseudo-code: 伪码

College of Computer and Information Science

14-4

Key Words & Terms

• query language: 查询语言 • selection structure: 选择结构 • sequence structure: 顺序结构 • software development: 软件开发 • software engineer: 软件工程 • source code: 源代码 • structured program: 结构化程序 • structured programming techniques: 结构化程序设计技术 • syntax error: 语法错 • third generation language (3GL) : 第三代语言 • top-down program design: 自上而下程序设计 • user: 用户 • very high level language: 超高级语言 • visual programming language: 可视化程序设计语言

College of Computer and Information Science

14-5

Page 4398

Competencies

(Page 1 of 2) • • •

Describe the six steps of programming Discuss design tools including top-down design, pseudocode , flowcharts, and logic structures Describe program testing and the tools for finding and removing errors

College of Computer and Information Science

14-6

Page 398

Competencies

(Page 2 of 2) • •

Describe CASE tools and object-oriented software development Explain the five generations of programming languages

College of Computer and Information Science

14-7

Page 399

Introduction

• • •

In this chapter programming is described in two parts: (1) the steps in the programming process and (2) some of the programming languages available.

Programming is part of Phase 4, systems development, in the systems life cycle.

Competent end users need to understand the relationship between systems development and programming.

College of Computer and Information Science

14-8

Page 400

Programs and Programming

• •

What is a Program ? A problem-solving procedure

A list of instructions

• • • •

Prewritten Custom-written Application software System software

College of Computer and Information Science

14-9

Page 400

What is Programming?

• •

Programming is software development

– – – – – –

Six step procedure Program specification Program design Program code Program test Program documentation Program maintenance

College of Computer and Information Science

14-10

Page 401

Step 1: Program Specification

• •

Also called programs definition or program analysis

– – –

5 Step Process

Program Objectives

Desired Output

Input Data Processing Requirements Document Program Specifications

College of Computer and Information Science

14-11

Page 401

Program Objectives

• •

Objectives are the problems that you are trying to solve Programming requires a clear statement of the problem that you are looking to address

Return

College of Computer and Information Science

14-12

Page 402

Program Specification Steps Continued

• • • •

Desired output Input Data Processing Requirements Program Specifications Document End user’s sketch of desired output Example of statement of hours worked

College of Computer and Information Science

14-13

Page 403

Step 2: Program Design

• •

Plan a solution Use structured programming techniques

– – – –

Top-down program design Pseudocode Flowcharts Logic structures

College of Computer and Information Science

14-14

Page 407

Step 3: Program Code

• •

Writing the program or coding The good program

Reliable

– –

Catch input errors Understandable to other programmers

– –

Structured programs best method Use the most appropriate computer language

Coding

College of Computer and Information Science

14-19

Coding

• Formatting or presentation language • Programming language

Page 408 College of Computer and Information Science

14-20

Page 422

Step 4: Program Test

• • • •

Debugging

– –

Testing Eliminating errors Syntax errors Logic errors Testing process

College of Computer and Information Science

14-21

Page 411

Step 5: Program Documentation

• •

Written descriptions and procedures about a program Important for people who will use the program

Users

– –

Operators Programmers

College of Computer and Information Science

14-22

Page 412

Step 6: Program Maintenance

• • • •

75% of total lifetime cost Error-free operations Effective program Two categories

– –

Operations Changing needs

College of Computer and Information Science

14-23

Page 414

Case Tools

Computer-aided software engineering (CASE)

Automate development process

• • •

Designing Coding Testing activities

College of Computer and Information Science

14-24

Object-Oriented Software Development

Focuses less on procedures, more on relationship between objects

OOP: Object-oriented programming

Object contains both the data and the processing operations

Page 415 College of Computer and Information Science

14-25

Page 415

Generations of Programming Languages

(Page 1 of 2) •

Occurring in “generations” or “ levels ”

Levels Machine languages to natural languages

There are five generations :

– –

Lower level Higher level closer to machine language closer to human-like language

College of Computer and Information Science

14-26

Page 415

Generations of Programming Languages

(Page 2 of 2) • • • • •

1 st -- Machine languages 2 nd - Assembly languages 3 rd -- High level procedural languages (3GL) 4 th - Problem-Oriented languages 5 th -- Natural Languages & Visual programming languages (5GL) (4GL)

College of Computer and Information Science

14-27

Language Translators

• compiler compiling linking resource code========>.obj=======>.exe

• interpreter

College of Computer and Information Science

14-28

Page 428

Discussion Questions

(Page 1 of 2) • • •

Identify and discuss each of the six steps of programming.

Describe CASE tools and OOP. How does CASE assist programmers?

What is meant by “generation” in reference to programming languages? What is the difference between low-level and high-level languages?

College of Computer and Information Science

14-29

Page 428

Discussion Questions

(Page 2 of 2) •

What is the difference between a compiler and an interpreter?

What are logic structures? Describe the differences between the three logic types.

College of Computer and Information Science

14-30

College of Computer and Information Science

14-31

End of Chapter 14

College of Computer and Information Science

14-32