Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2007 Prentice-Hall, Inc. 1 Technology in Action.

Similar presentations


Presentation on theme: "© 2007 Prentice-Hall, Inc. 1 Technology in Action."— Presentation transcript:

1 © 2007 Prentice-Hall, Inc. 1 Technology in Action

2 © 2007 Prentice-Hall, Inc. 2 Technology in Action Chapter 10 Behind the Scenes: Software Programming

3 © 2007 Prentice-Hall, Inc. 3 Chapter Topics System development life cycleSystem development life cycle Life cycle of a programLife cycle of a program Problem statementProblem statement AlgorithmsAlgorithms Moving from algorithm to codeMoving from algorithm to code Moving from code to machine language Testing programsMoving from code to machine language Testing programs Completing a programCompleting a program Selecting the right programming languageSelecting the right programming language Most popular programming languagesMost popular programming languages

4 © 2007 Prentice-Hall, Inc. 4 Information Systems SystemSystem –A collection of pieces working together to achieve a common goal An information system includesAn information system includes –Data –People –Procedures –Hardware/Software System development life cycle (SDLC)System development life cycle (SDLC) –An organized process (or set of steps) used to develop systems in an orderly fashion

5 © 2007 Prentice-Hall, Inc. 5 System Development Life Cycle Problem/ Opportunity Identification Analysis Design Development & Documentation Testing & Installation Maintenance & Evaluation System Development Life Cycle

6 © 2007 Prentice-Hall, Inc. 6 Problem/Opportunity Identification The existing system is evaluated:The existing system is evaluated: –Problems are defined –New proposals are reviewed –Decisions are made to proceed with the projects –Document the process and relevant problems/opportunities defined

7 © 2007 Prentice-Hall, Inc. 7 Analysis A program specification is developed (goals and objectives of the project)A program specification is developed (goals and objectives of the project) Feasibility assessment is performedFeasibility assessment is performed User requirements are definedUser requirements are defined Analysts recommend a plan of actionAnalysts recommend a plan of action The plan is documentedThe plan is documented

8 © 2007 Prentice-Hall, Inc. 8 Design A detailed plan for programmers is developedA detailed plan for programmers is developed Flowcharts and data-flow diagrams are used for the current and proposed systemFlowcharts and data-flow diagrams are used for the current and proposed system Document the designDocument the design Data-flow diagram Flowchart

9 © 2007 Prentice-Hall, Inc. 9 Development & Documentation Actual programming takes placeActual programming takes place First phase of the program development life cycle (PDLC)First phase of the program development life cycle (PDLC) Development is documentedDevelopment is documented User documentation is createdUser documentation is created

10 © 2007 Prentice-Hall, Inc. 10 Testing & Installation Testing the program for proper operationTesting the program for proper operation Installation of the program for useInstallation of the program for use Document testing and resultsDocument testing and results

11 © 2007 Prentice-Hall, Inc. 11 Maintenance & Evaluation Performance of the system is monitoredPerformance of the system is monitored Corrections and modifications to the program are madeCorrections and modifications to the program are made Document maintenance procedures and results.Document maintenance procedures and results.

12 © 2007 Prentice-Hall, Inc. 12 The Life Cycle of a Program Programming is the process of translating a task into a series of commands a computer will use to perform that taskProgramming is the process of translating a task into a series of commands a computer will use to perform that task Programming involves:Programming involves: –Identifying the parts of a task the computer can perform –Describing tasks in a specific and complete manner –Translating the tasks into a language that is understood by the computer’s CPU

13 © 2007 Prentice-Hall, Inc. 13 Program Development Life Cycle Step 5 Finishing the Project Step 4 Debugging Step 3 Coding Step 2 Making a Plan Step 1 Describing the Problem

14 © 2007 Prentice-Hall, Inc. 14 Step 1 : Describing the Problem The problem statement is:The problem statement is: –The starting point of programming –A description of tasks the program is to accomplish –How the program will execute the tasks –Created through interaction between the programmer and the user The program statement includes error handling and a testing planThe program statement includes error handling and a testing plan

15 © 2007 Prentice-Hall, Inc. 15 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 PROCESS: The Total Pay Earned is computed as $7.32 per hour for the first eight hours worked each day. Any hours worked beyond the first eight are billed at $11.73 per hour. ERROR HANDLING: The input Number of Hours Worked must be a positive real number. If it is a negative number or other non-acceptable character, the program will force the user to re-enter the information. TESTING PLAN:INPUTOUTPUTNOTES 88*7.32Testing positive input 33*7.32Testing positive input 128*7.32 + 4*11.73Testing overtime input –6–6 Error message/ask user to re-enter value Handling error Parking Garage Example

16 © 2007 Prentice-Hall, Inc. 16 Step 2: Developing an Algorithm Algorithm development:Algorithm development: –A set of specific, sequential steps that describe what the computer program must do –Complex algorithms include decision points: Binary (yes/no)Binary (yes/no) Loop (repeating actions)Loop (repeating actions) –Visual tools used to track algorithm and decision points: Head off to cafe Buy textbook Go to accounting lecture YesNo Yes Wake Up Check wallet for $ Do I have > $80 Go get gas Did I get $80 from the ATM? Do I have my credit card? Go to the ATM for cash

17 © 2007 Prentice-Hall, Inc. 17 Flowchart and Pseudocode Underlined words are information items that appear repeatedly in the algorithm. 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 Bold terms show actions that are common in programming, such as reading data, making decisions, printing, and so on. Flowchart Pseudocode

18 © 2007 Prentice-Hall, Inc. 18 Top-Down Design Problem is divided into a series of high-level tasksProblem is divided into a series of high-level tasks Detailed subtasks are created from high-level tasksDetailed subtasks are created from high-level tasks

19 © 2007 Prentice-Hall, Inc. 19 Object-Oriented Analysis Object-oriented analysisObject-oriented analysis Classes (categories of inputs) are identifiedClasses (categories of inputs) are identified Classes are defined by information (data) and actions (methods or behaviors)Classes are defined by information (data) and actions (methods or behaviors) Objects are defined by their class, data and behaviorObjects are defined by their class, data and behavior Interaction between classes is determinedInteraction between classes is determined Existing classes can be used for other projectsExisting classes can be used for other projects

20 © 2007 Prentice-Hall, Inc. 20 Step 3: Coding Coding is translating an algorithm into a programming languageCoding is translating an algorithm into a programming language Generations of programming languagesGenerations of programming languages

21 © 2007 Prentice-Hall, Inc. 21 Compilation Compilation is the process of converting code into machine languageCompilation is the process of converting code into machine language Compiler reads the source code and translates it into machine languageCompiler reads the source code and translates it into machine language After compilation, programmers have an executable programAfter compilation, programmers have an executable program

22 © 2007 Prentice-Hall, Inc. 22 Interpreter Interpreter translates source code into a line by line intermediate formInterpreter translates source code into a line by line intermediate form Each line is executed before the next line is compiledEach line is executed before the next line is 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 in the code.

23 © 2007 Prentice-Hall, Inc. 23 Step 4: Debugging Running a program to find errors is known as debuggingRunning a program to find errors is known as debugging Sample inputs are used to determine runtime (logic) errorsSample inputs are used to determine runtime (logic) errors Debugger: Tool that helps programmers locate runtime errorsDebugger: Tool that helps programmers locate runtime errors

24 © 2007 Prentice-Hall, Inc. 24 Step 5: Finishing the Project Users test the program (internal testing)Users test the program (internal testing) Beta version released:Beta version released: –Information collected about errors before final revision Software updates (service packs):Software updates (service packs): –Problems found after commercial release Documentation created:Documentation created: –User manuals –User training

25 © 2007 Prentice-Hall, Inc. 25 Programming Languages Selecting the right language:Selecting the right language: –Space available –Speed required –Organizational resources available –Type of target application Visual Basic C / C++ Java HTML JavaScript VBScript ASP / JSP Flash / XML

26 © 2007 Prentice-Hall, Inc. 26 Visual Basic Used to build Windows applicationsUsed to build Windows applications Object-oriented languageObject-oriented language VB.NET is the current versionVB.NET is the current version Sample Visual Basic

27 © 2007 Prentice-Hall, Inc. 27 C and C++ C –Developed for system programmers –Combines high and low level programming features –Modern operating systems written in C C++C++ –Uses the same features as C –Includes object-oriented design Sample C Sample C++

28 © 2007 Prentice-Hall, Inc. 28 Java Object-oriented featuresObject-oriented features Large set of existing classesLarge set of existing classes Architecture neutralArchitecture neutral Java applets: Small Java-based programsJava applets: Small Java-based programs

29 © 2007 Prentice-Hall, Inc. 29 Web Applications HTML/XHTMLHTML/XHTML –Hypertext Markup Language/Extensible Hypertext Markup Language –Not a true programming language –Uses special symbols (tags) to control how Web pages are viewed Extensible Markup Language (XML)Extensible Markup Language (XML) –Enables computers to efficiently transfer information between Web sites

30 © 2007 Prentice-Hall, Inc. 30 Web Applications JavaScriptJavaScript –Used to make Web pages more visually appealing and interactive VBScriptVBScript –A subset of Visual Basic –Used to add interactivity to Web pages

31 © 2007 Prentice-Hall, Inc. 31 Web Applications Active Server Pages (ASP) and Java Server Pages (JSP)Active Server Pages (ASP) and Java Server Pages (JSP) –Adds interactivity capabilities to Web pages –Translates user information into a request for more information from a company’s computer FlashFlash –Enables elaborate animations to be created for Web pages

32 © 2007 Prentice-Hall, Inc. 32 Chapter 10 Summary Questions What is a system development life cycle and what are the phases in the cycle?What is a system development life cycle and what are the phases in the cycle?

33 © 2007 Prentice-Hall, Inc. 33 Chapter 10 Summary Questions What is the life cycle of a program?What is the life cycle of a program?

34 © 2007 Prentice-Hall, Inc. 34 Chapter 10 Summary Questions What role does a problem statement play in programming?What role does a problem statement play in programming?

35 © 2007 Prentice-Hall, Inc. 35 Chapter 10 Summary Questions How do programmers create algorithms?How do programmers create algorithms?

36 © 2007 Prentice-Hall, Inc. 36 Chapter 10 Summary Questions How do programmers move from algorithm to code?How do programmers move from algorithm to code?

37 © 2007 Prentice-Hall, Inc. 37 Chapter 10 Summary Questions How does a programmer move from programming code to the 1s and 0s the CPU can understand?How does a programmer move from programming code to the 1s and 0s the CPU can understand?

38 © 2007 Prentice-Hall, Inc. 38 Chapter 10 Summary Questions How is a program tested?How is a program tested?

39 © 2007 Prentice-Hall, Inc. 39 Chapter 10 Summary Questions What steps are involved in completing the program?What steps are involved in completing the program?

40 © 2007 Prentice-Hall, Inc. 40 Chapter 10 Summary Questions How do programmers select the right programming language for a specific task?How do programmers select the right programming language for a specific task?

41 © 2007 Prentice-Hall, Inc. 41 Chapter 10 Summary Questions What are the most popular Windows and Web applications?What are the most popular Windows and Web applications?


Download ppt "© 2007 Prentice-Hall, Inc. 1 Technology in Action."

Similar presentations


Ads by Google