Vous êtes sur la page 1sur 13

3/20/2013

Technology
in Action Technology in Action

Alan Evans  • Kendall Martin Chapter 10


Mary Anne Poatsy
Behind the Scenes: Software Programming
Ninth Edition

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall

Information Systems include all


Chapter Topics
EXCEPT the following:
• Understanding software programming
1. People
• Life cycle of an information system
• Life cycle of a program 2. Data
3. Procedures
• Programming languages
4. Locations

0% 0% 0% 0%

1 2 3 4
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 2 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 3

Variable declaration tells the operating system


that the program needs to allocate storage Scope creep occurs when:
space in the:
1. The program requires
hundreds of additional
1. Hard drive lines of code due to
programming errors.
2. ROM
2. Clients request
3. RAM additional functionality
4. CPU and features which
extends the project
completion time.
0% 0%
0% 0% 0% 0%

1 2 3 4 1 2
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall

1
3/20/2013

Programming languages are


Understanding
classified in several major groupings
referred to as:
Software Programming
• Types of tasks that are candidates for
1. Generations automation:
2. Classes – Routine
3. Objects – Repetitive
4. Designs – Work with electronic data
– Follow a series of clear steps
• When existing software cannot be found,
programming is mandatory
0% 0% 0% 0%

1 2 3 4
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 7

Life Cycle of an Information System System Development Life Cycle


• System • To create modern software, an entire team
– A collection of pieces working together to is needed
achieve a common goal • Programs require many phases to
• An information system includes: complete
– Data • Must be available for multiple operating
– People systems and work over networks
– Procedures • Must be free of errors and well supported
– Hardware
– Software
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 8 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 9

Which of the following is NOT a


Six Steps in the SDLC
phase in the SDLC?

1. Design
2. Analysis
3. Development and
Documentation
Each step must be 4. Revisions
completed before
you can progress to
the next step. 0% 0% 0% 0%

1 2 3 4
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 10 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 11

2
3/20/2013

Problem & Opportunity Identification Analysis

• Development steering committee formed • Analysts explore problem to be solved


to evaluate systems development • Develop program specifications
proposals – Clear statement of goals and objectives of
• Reviews ideas project

• Decides which projects to take forward • Feasibility assessment is performed


based on available resources • User requirements are defined
– Personnel and funding • Analysts recommend a plan of action

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 12 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 13

Design Development and Documentation


• A detailed plan for programmers is developed
• Flowcharts and data-flow diagrams are used for • Actual programming takes place
the current and proposed system • First phase of the program development
Data-flow diagram life cycle (PDLC)

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 14 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 15

Testing and Installation Maintenance and Evaluation


• Program is tested to ensure it works • Performance of the system is monitored
properly • Corrections and modifications to the
• Program is installed for use program are made
• Additional enhancements that users
request are evaluated
• Appropriate program modifications are
made

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 16 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 17

3
3/20/2013

Flowcharts and Data-flow diagrams are created


during which stage of the SDLC? Joint Application Development

1. Problem • JAD helps designers adapt to changes in


Identification program specifications
2. Analysis • Includes customer involvement
3. Design • No communication delays
4. Testing • Also referred to as:
– Accelerated design
– Facilitated team technique
0% 0% 0% 0%

1 2 3 4
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 18 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 19

Ethics in IT The Life Cycle of a Program


• Programming is the process of translating
The Association of Computing Machinery a task into a series of commands a
(ACM) and the Institute of Electrical and computer will use to perform that task
Electronic Engineers (IEEE) have established
eight principles for ethical software • Programming involves:
engineering practices: – Identifying the parts of a task the computer
can perform
1. Public 5. Management – Describing tasks in a highly specific and
2. Client and Employer 6. Profession complete manner
3. Product 7. Colleagues – Translating this description into a language
4. Judgment 8. Self understood by the computer’s CPU

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 20 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 21

Program Development Life Cycle Step 1: Describing the Problem


• Programmers develop a complete
description of problem
• Problem statement identifies task to be
automated
• Statement describes how software will
behave

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 22 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 23

4
3/20/2013

Step 2: Making a Plan Step 3: Coding


• Problem statement is translated into a • Algorithm is translated into programming
set of specific, sequential steps known code
as an algorithm • Programmers must think in terms of
• Algorithm is written in natural ordinary operations that a CPU can perform
language such as English

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 24 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 25

Step 4: Debugging Step 5: Finishing the Project


• Code goes through • Software is tested
process of debugging – Programming team
• Programmers repair – People who will use program
any errors found in • Results of entire project are documented
code • Users are trained to use program
efficiently

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 26 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 27

Describing the Problem Creating Problem Statements


• The Problem Statement • Programmers interact with users to
– Staring point of programming work describe three relevant things:
– Clear description of tasks the computer 1. Data – raw input users have at the start
program must accomplish 2. Information – result users require
– How the program will execute these tasks 3. Method – process of how program converts
– How the program will respond to unusual the inputs to correct outputs
situations

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 28 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 29

5
3/20/2013

Parking Garage Example


Making a Plan
Program Goal: To compute the total pay for a fixed number of hours worked at a
parking garage.
Inputs: Number of Hours Worked........................ a positive number

Outputs: Total Pay Earned .................................... a positive number


• Algorithm Development
Process: The Total Pay Earned is computed as $7.50 per hour for the first eight
hours worked each day. Any hours worked beyond the first eight are
– Set of specific sequential steps
billed at $11.25 per hour.

Error Handling: The input (Number of Hours Worked) must be a positive real number.
– Describe exactly what computer program
If it is a negative number or other non-acceptable character, the
program will force the user to re-enter the information. must do to complete task
Testing Plan: INPUT OUTPUT NOTES
– Use natural language
8 8*7.50 Testing positive input

3 3*7.50 Testing positive input

12 8*7.50 + 4*11.25 Testing overtime input

–6 Error message/ask user to Handling error


re-enter value

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 30 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 31

Flowchart Pseudocode
Bold terms show actions that are common in
programming, such as reading data, making
decisions, printing, and so on.

1. Ask the user how many hours they worked


today
2. If the number of hours worked < = 8,
compute total pay without overtime
otherwise,
compute total pay with overtime pay
3. Print total pay

Underlined words are information items that


appear repeatedly in the algorithm.

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 32 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 33

Developing the Algorithm Top-Down Design


• Decision Making and Design • Problem is divided into a series of high-level
– Convert problem statement into list of steps or
tasks
actions • Detailed subtasks are created from high-level
– Only simplest algorithms execute same series tasks
of actions every time they run
– Complex problems involve choices and
include decision points

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 34 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 35

6
3/20/2013

Object-Oriented Analysis Writing Program Code


• Classes (categories of • Programmers select best programming
inputs) are identified language for the problem
• Classes are defined by
• Translate the algorithm into that language
information (data) and
actions (methods or • Translation is act of coding
behaviors)
• Reusability is key

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 36 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 37

Generations of
Coding
Programming Languages
• Speaking the Language of the Computer
Level Generation Example
– Syntax
Low 1GL Machine • Agreed-upon set of rules of language used
2GL Assembly – Keywords
High 3GL FORTRAN, BASIC, C, Java • Set of words with predefined meanings

4GL SQL
– Data types
• Describe the kind of data being stored in memory
Natural 5GL PROLOG
– Operators
• Coding symbols that represent fundamental actions

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 38 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 39

Which of the following translates


Compilation
source code, line by line?
• Compilation is the process of converting
1. Compliers
code into machine language
2. Interpreters
• A compiler reads the source code and
3. Translators translates it into machine language
4. Both 2 & 3 • After compilation, programmers have an
executable program

0% 0% 0% 0%

1 2 3 4
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 41

7
3/20/2013

Interpreter Coding Tools


• Some programming languages do not have
a compiler, but use an interpreter instead • Integrated Development Environment
– The interpreter translates source code into a – Developmental tool that helps programmers
line-by-line intermediate form write, compile, and test programs
– Each line is executed before the next line is • Every language has its own specific IDE
compiled
– Programmers do not have to wait for the entire
program to be recompiled each time they make
a change
– Programmers can immediately see the results
of changes as they are making them
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 42 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 43

Debugging Finishing the Project


• Getting Rid of Errors • Testing and Documentation
– Process of running program over and over – Internal testing – a group with the software
• To find errors company uses program in every way possible
• To make sure the program behaves the way it – External testing – people like those who will
should eventually purchase the program work with it

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 44 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 45

I have used a beta version of a


Programming Languages
software program.
• Many languages for many projects
1. Yes • Create a solution to meet several
2. No competing objectives
– Software must run quickly and reliably
– Simple to expand when demands change
– Completed on time for minimal cost
– Use smallest amount of system resources
0% 0%

1 2
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 47

8
3/20/2013

Selecting the Right Language Building Applications


• Programming team considers several • Programs often have a number of
factors common features
– Space available – Scroll bars
– Speed required – Title bars
– Organizational resources available – Text boxes
– Type of target application – Buttons
• Several languages include controls that
make it easy to include these features

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 48 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 49

Visual Basic 2010 C and C++


• C
• Visual Basic 2010 is the current version – Developed for system programmers
• Builds object-oriented applications for: – Provides higher-level programming features
– Windows • if statements and for loops
– The Web • C++
– Mobile Devices – Uses same symbols and keywords as C
• Easy to drag and drop entire programming – Better security
components into application – Support for reuse of existing code
– Includes object-oriented design

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 50 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 51

Java and C# Objective C


• Java
– Object-oriented features • Language most often used to program
– Large set of existing classes applications to run under Mac OS X
– Architecture neutral – Object-oriented language
– Java applets: Small Java-based programs – Superset of the C language
• C# – Often used with library called Cocoa
– Completing program released by Microsoft

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 52 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 53

9
3/20/2013

Building Web Applications Scripting Languages for the Web


• HTML/XHTML • Simple programming language limited to
– HyperText Markup Language/eXtensible performing a set of specialized tasks
HyperText Markup Language • Scripts allow decisions to be made and
– Not a true programming language calculations to be performed
– Uses special symbols (tags) to control how • JavaScript, VBScript, and PHP work well
Web pages are viewed
with HTML

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 54 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 55

ASP, JSP, and PHP Flash and XML


• Used by programmers to build Web sites • Adobe Flash
with interactive capabilities – Used to develop Web-based multimedia
• User supplies information that is translated – Includes its own scripting language,
into a request. ActionScript
• Scripting code controls automatic writing • XML (eXtensible Markup Language)
of the custom page returned to user’s – Enables designers to define data-based tags
computer – Makes it easier for Web site to transfer key
information on its page to another site

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 56 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 57

AJAX Building Mobile Applications


• Asynchronous JavaScript And XML • Special languages and supporting tools
– Allows creation of Web applications that can help speed development of applications
update information without requiring a page for mobile devices like smart phones and
refresh tablets
– Uses existing technologies to do more • Specific features include GPS capability,
processing in the browser
software keyboards, and touch-sensitive
– Users have a more responsive experience
screens
• User interface must take smaller screen
size into account
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 58 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 59

10
3/20/2013

Which of the following seeks intensive client


The Next Great Language involvement from the beginning of the project?

• Never easy to predict which language will 1. Program


become the next “great” language Development Life
• Experts predict that as projects grow in Cycle
size, time to compile will also grow 2. System Development
• Interpreted languages could become more Life Cycle
important because they have virtually no 3. Joint Application
compile time Development
– Python, Ruby, and Smalltalk 4. Client Development 0% 0% 0% 0%
Programming 1 2 3 4
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 60 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall

In object oriented analysis, which of the


_____ provide a visual representation of following represents a “method” for an
the patterns an algorithm follows. employee?

1. Pseudo Code 1. Social Security


2. Flowcharts Number()
3. JAD 2. GoToWork()
4. Top-down designs 3. CollectPay()
4. Both 2 & 3

0% 0% 0% 0% 0% 0% 0% 0%

1 2 3 4 1 2 3 4
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 62 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall

Which of the following is NOT a


Which of the following is not a 3GL?
scripting language?
1. BASIC 1. JavaScript
2. COBOL 2. PHP
3. Java 3. JAVA
4. SQL 4. HTML

0% 0% 0% 0% 0% 0% 0% 0%

1 2 3 4 1 2 3 4
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 64 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall

11
3/20/2013

Chapter 10 Summary Questions Chapter 10 Summary Questions


1. Why do I need to understand how to 2. What is a system development life cycle,
create software? and what are the phases in the cycle?

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 66 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 67

Chapter 10 Summary Questions Chapter 10 Summary Questions


3. What is the life cycle of a program? 4. What role does a problem statement play
in programming?

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 68 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 69

Chapter 10 Summary Questions Chapter 10 Summary Questions


5. How do programmers create algorithms 6. What steps are involved in completing
and move from algorithm to code? the program?

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 70 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 71

12
3/20/2013

Chapter 10 Summary Questions Chapter 10 Summary Questions


7. How do programmers select the right
8. What are the most popular programming
programming language for a specific
languages for different types of
task?
application development?

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 72 Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 73

All rights reserved. No part of this publication may be reproduced, stored in a


retrieval system, or transmitted, in any form or by any means, electronic,
mechanical, photocopying, recording, or otherwise, without the prior written
permission of the publisher. Printed in the United States of America.

Copyright © 2012 Pearson Education, Inc.


Publishing as Prentice Hall

13

Vous aimerez peut-être aussi