14141414CH
AP
TE
R
PROGRAMMING AND
LANGUAGES
14-2
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Competencies
Describe the six steps of programming
Discuss design tools
Describe program testing
Describe CASE tools & object-oriented software development
Explain the five generations of programming languages
14-3
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
What Is a Program?
A problem-solving procedure
A list of instructionsPrewritten
Custom-written
Application software
System software
14-4
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
What is Programming?
Programming is software development
Six step procedure1. Program specification
2. Program design
3. Program code
4. Program test
5. Program documentation
6. Program maintenance
14-5
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Step 1Program Specifications
14-6
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Input and Output Plans
14-7
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Step 2Program Design
Plan a solution
Use structured programming techniquesTop-down program design
Pseudocode
Flowcharts
Logic structures
14-8
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Top-Down Program Design
14-9
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Pseudocode
An outline of the logic for your program
A summary of the program
14-10
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Flowchart Symbols
14-11
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Logic Structures
Sequence structure
Selection structure
Loop structure
14-12
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Step 3Program Code
Coding
The good program Reliable
Well documented
Understandable to other programmers
Structured programs best method
14-13
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Step 4Program Test
DebuggingTesting
Eliminating errors
Syntax errors
Logic errors
Testing processing
14-14
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Step 5Documentation
Written descriptions and procedures about a program
Important for people who will use the programUsers
Operators
Programmers
14-15
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Step 6Program Maintenance
75% of total lifetime cost
Error-free operations
Effective program
Two categoriesOperations
Changing needs
14-16
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
CASE Tools
Computer-aided software engineering
Automate development processDesigning
Coding
Testing activities
14-17
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
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
14-18
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Generations of Programming Languages
Occurring in “generations”Levels
Machine languages to natural languages
Lower level closer to machine language
Higher level closer to human-like language
14-19
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Generations of Languages
1st -- Machine languages
2nd -- Assembly languages
3rd -- High level procedural languages
4th -- Problem-Oriented Languages
5th -- Natural Languages & Visual
programming
14-20
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
A Look to the FutureMI-Tech
Synapse Solutions has created a system called MI-tech
Understands word order and meaning
Computer translates "wish list" into machine language
14-21
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Key Terms
application generator (406)
assembly language (405)
beta testing (400)
code (396)
coding (396)
compiler (405)
computer-aided software engineering (CASE) tools (403)
debugging (399)
desk checking (399)
documentation (400)
DO UNTIL structure (394)
DO WHILE structure (394)
14-22
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Key Terms
fifth generation language (5GL) (407)
formatting language (396)
fourth generation language (4GL) (406)
generation (404)
higher level (404)
IFPS (interactive financial planning system) (406)
IF-THEN-ELSE structure (393)
interpreter (406)
level (404)
logic error (399)
logic structure (393)
14-23
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Key Terms
loop structure (393)
lower level (404)
machine language (405)
maintenance programmer (402)
module (392)
natural language (407)
object (404)
object code (405)
objectives (390)
object-oriented programming (OOP) (404)
object-oriented software development (404)
operator (401)
portable language (405)
presentation language (396)
14-24
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Key Terms
problem-oriented language (406)
procedural language (405)
program (388)
program analysis (389)
program coder (406)
program definition (389)
program design (391)
program documentation (400)
program flowchart (393)
program maintenance (402)
programmer (389)
programming (388)
programming language (396)
14-25
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Key Terms
program module (392)
program specification (389)
pseudocode (393)
query language (406)
selection structure (393)
sequence structure (393)
software development (388)
software engineer (389)
source code (405)
structured program (396)
structured programming techniques (391)
syntax error (399)
third generation language (3GL) (405)
14-26
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Key Terms
top-down program design (392)
user (401)
very high level language (406)
visual programming language (407)
14-27
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
FAQs
What is a program?
What is a software engineer?
What is the purpose of pseudocode?
What are the qualities of a good program?
What is the job of a maintenance programmer? Why is it important?
What are CASE tools?
What is object-oriented programming?
14-28
© 2005 The McGraw-Hill Companies, Inc. All Rights Reserved.
Discussion Questions
Discuss the six steps to create a program.
Describe the differences between formatting and programming languages. Give examples of each.
Explain the debugging process for a program.
Why is program documentation important?
Review the five generation levels of programming languages.