computing essentials 2014 programming and languages © 2014 by mcgraw-hill education. this...

23
Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part. © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part. Computing Essentials 2014 Programming And Languages Chapter 13

Upload: sophie-carroll

Post on 20-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Computing Essentials 2014

Programming And LanguagesChapter 13

Page 2: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Competencies (Page 1 of 2)Define programming of and 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.

2

Page 3: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Competencies (Page 2 of 2)Describe CASE tools and object-oriented software development.

Explain the five generations of programming languages.

3

Page 4: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Introduction

In this chapter, you focus on Phase 4, Systems Development, of the systems life cycle and learn about the programming process and some of the programming languages that are available

Competent end users need tounderstand the relationshipbetween systems developmentand programming

4

Page 5: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Programs and ProgrammingWhat is a program? A problem-solving procedure

A list of instructions Prewritten Custom-written Application software System software

5

Page 6: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

What is Programming?A list of instructions for the computer to follow to process data

Software developmentSix step procedure

1. Program specification2. Program design3. Program code4. Program test5. Program documentation6. Program maintenance

6

Page 7: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Step 1: Program SpecificationAlso called program definition or program analysis

Five steps to complete in the process

7

Page 8: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Program Objectives in Step 1Objectives are the problems that you are trying to solve

Programming requires a clear statement of the problem that you are looking to address

8

Page 9: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Program Specification in Step 1Desired outputNeeded input dataRequired processingDocumentation of program specifications

9

Example of input dataEnd user’s sketch of desired output

Page 10: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Step 3: Program Code Writing the program or coding Characteristics of a good program

Works reliably Produces the

correct output Catches common

input errors Code is well-documented

and understandable Uses an appropriate

computer language

10

Page 11: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Coding in Step 3

Content-markuplanguages

Programminglanguages

11

Page 12: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

HTML and C++ Code

12

Page 13: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Step 4: Program TestDebugging to test code and eliminate errorsSyntax errorsLogic errorsTesting process

13

Page 14: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Step 5: Program DocumentationWritten descriptions about a program

Important for people who will use and/or support the programUsersOperators Programmers

14

Page 15: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Step 6: Program Maintenance75% of total lifetime costEnsures program is

Error-freeEffectiveEfficient

Two activity categoriesOperationsChanging needs

15

Page 16: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Case Tools

Computer-aided software engineering (CASE)Automates portions of the development process Program design Coding Testing

16

Page 17: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

OOP Software Development Object-oriented programming (OOP)

Focuses less on procedures, more on relationships between objects

Objects contain both the dataand the processing operationsneeded to perform a task

17

Page 18: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Generations of Programming Languages (Page 1 of 2)

Occurring in “generations” or “levels”Coding from machine languages to human or natural languages

There are five distinct generationsLower level is closer to machine language

Higher level is closer to human-like language

18

Page 19: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Generations of Programming Languages (Page 2 of 2)

1st Gen: Machine languages

2nd Gen: Assembly languages

3rd Gen: High level procedural languages (3GLs)

4th Gen: Task-oriented languages (4GLs)

5th Gen: Problem and Constraint languages (5GL)

19

Page 20: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Careers In ITComputer programmers create, test, troubleshoot, update and repair programs

Employers seek individuals withDegree in Computer Science or Information Systems

Desired traits include patience, logical thinking, and attention to detail

Computer Programmers can expect to earn $49,000 to $89,000 annually

20

Page 21: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

A Look to the Future

Your Own Programmable Robot It may not be to much longer before you have your own robot

Hardware components needed to create are becoming cheapter

21

Page 22: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

Open-Ended 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?

22

Page 23: Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not

Computing Essentials 2014Programming and Languages

© 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner. This document may not be copied, scanned, duplicated, forwarded, distributed, or posted on a website, in whole or part.

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

23