Download presentation
Presentation is loading. Please wait.
PublishCleopatra Lucas Modified over 9 years ago
1
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.1 Technology In Action Chapter 10 Behind the Scenes: Software Programming Chapter 10 Behind the Scenes: Software Programming NEXT SLIDE
2
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.2 TopicsTopics System development life cycleSystem development life cycle Life cycle of a programLife cycle of a program Programming languagesProgramming languages System development life cycleSystem development life cycle Life cycle of a programLife cycle of a program Programming languagesProgramming languages NEXT SLIDE
3
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.3 SystemsSystems System:System: –A collection of pieces working together to achieve a common goal Information system includes:Information system includes: –Data –People –Procedures –Hardware –Software System development life cycle (SDLC):System development life cycle (SDLC): –An organized process used to develop systems in an orderly fashion System:System: –A collection of pieces working together to achieve a common goal Information system includes:Information system includes: –Data –People –Procedures –Hardware –Software System development life cycle (SDLC):System development life cycle (SDLC): –An organized process used to develop systems in an orderly fashion NEXT SLIDE
4
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.4 System Development Life Cycle Problem/ Opportunity Identification Analysis Design Development & Documentation Testing & Installation Maintenance & Evaluation System Development Life Cycle NEXT SLIDE
5
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.5 DesignDesign A detailed plan for programmers is developedA detailed plan for programmers is developed Flow charts and data-flow diagrams are used for the current and proposed systemFlow charts and data-flow diagrams are used for the current and proposed system A detailed plan for programmers is developedA detailed plan for programmers is developed Flow charts and data-flow diagrams are used for the current and proposed systemFlow charts and data-flow diagrams are used for the current and proposed system Data-flow diagram Flowchart
6
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.6 The Life Cycle of a Program a computer program is a set of detailed directions telling the computer exactly what to do, one step at a timea computer program is a set of detailed directions telling the computer exactly what to do, one step at a time 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 a computer program is a set of detailed directions telling the computer exactly what to do, one step at a timea computer program is a set of detailed directions telling the computer exactly what to do, one step at a time 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 NEXT SLIDE
7
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.7 Program Development Life Cycle Click on the steps for more informationClick on the steps for more information Step 5 Finishing the Project Step 4 Debugging Step 3 Coding Step 2 Making a Plan Step 1 Describing the Problem NEXT SLIDE
8
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.8 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 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 Example: problem statement Example: problem statement
9
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.9 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 –6Error message/ask user to re-enter value Handling error Parking Garage Example
10
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.10 Making a Plan 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: 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 Flowcharts Pseudocode
11
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.11 Top-Down Design and Object- Oriented Analysis 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 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 Get Input Process Data Output Results Announce Program Give Users instructions Read the input Determine if they qualify for overtime Compute pay Print TotalPay
12
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.12 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
13
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.13 Coding is translating an algorithm into a programming languageCoding is translating an algorithm into a programming language Generations of programming languages:Generations of programming languages: 1GLMachine Bits describe the commands to the CPU 1GLMachine Bits describe the commands to the CPU 1110 0101 1111 0000 1011 1110 0110 1110 0101 1111 0000 1011 1110 0110 2GLAssembly Words describe the commands to the CPU 2GLAssembly Words describe the commands to the CPU ADD Register 3, Register 4, Register 5 ADD Register 3, Register 4, Register 5 3GLFORTRAN, Symbols describe the commands to the CPU 3GLFORTRAN, Symbols describe the commands to the CPU BASIC, C TotalPay = Pay + OvertimePay; 4GLSQL More powerful commands allow complex 4GLSQL More powerful commands allow complex work to be done in a single sentence work to be done in a single sentence ALL EMPLOYERS WHERE “TotalPay” TOTAL MORE THAN 25000 5GLPROLOG, Graphical interfaces allow programmers to 5GLPROLOG, Graphical interfaces allow programmers to Visual Basic build applications without thinking about code Coding is translating an algorithm into a programming languageCoding is translating an algorithm into a programming language Generations of programming languages:Generations of programming languages: 1GLMachine Bits describe the commands to the CPU 1GLMachine Bits describe the commands to the CPU 1110 0101 1111 0000 1011 1110 0110 1110 0101 1111 0000 1011 1110 0110 2GLAssembly Words describe the commands to the CPU 2GLAssembly Words describe the commands to the CPU ADD Register 3, Register 4, Register 5 ADD Register 3, Register 4, Register 5 3GLFORTRAN, Symbols describe the commands to the CPU 3GLFORTRAN, Symbols describe the commands to the CPU BASIC, C TotalPay = Pay + OvertimePay; 4GLSQL More powerful commands allow complex 4GLSQL More powerful commands allow complex work to be done in a single sentence work to be done in a single sentence ALL EMPLOYERS WHERE “TotalPay” TOTAL MORE THAN 25000 5GLPROLOG, Graphical interfaces allow programmers to 5GLPROLOG, Graphical interfaces allow programmers to Visual Basic build applications without thinking about code CodingCoding Low Level High Level Natura l
14
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.14 CompilationCompilation 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 Interpreter translates source code into a line by line intermediate formInterpreter translates source code into a line by line intermediate form 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 Interpreter translates source code into a line by line intermediate formInterpreter translates source code into a line by line intermediate form
15
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.15 DebuggingDebugging 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 logic errorsSample inputs are used to determine logic errors 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 logic errorsSample inputs are used to determine logic errors
16
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.16 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 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
17
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.17 Programming Languages Selecting the right language:Selecting the right language: –Space available –Speed required –Organizational resources available –Type of target application 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 NEXT SLIDE
18
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.18 Low-level Language Z=X+YZ=X+Y 0000000000000100 0011000000000101 0001000000000110 1111000000000000 0000000000000001 0000000000000111 0000111100000000 Machine LanguageAssembly Language Load X add Y store Z Halt X:.data 3 Y:.data 4 Z:.data 0
19
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.19 C and C++ C:C: –Developed for system programmers –Combines high and low level programming features –Modern operating systems were written in C C++:C++: –Uses the same features as C –Includes object-oriented design C:C: –Developed for system programmers –Combines high and low level programming features –Modern operating systems were written in C C++:C++: –Uses the same features as C –Includes object-oriented design Sample C Sample C++ NEXT SLIDE
20
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.20 JavaJava Object-oriented featuresObject-oriented features Large set of existing classesLarge set of existing classes Architecture neutralArchitecture neutral Java applets:Java applets: –Small Java-based programs Object-oriented featuresObject-oriented features Large set of existing classesLarge set of existing classes Architecture neutralArchitecture neutral Java applets:Java applets: –Small Java-based programs Sample Java NEXT SLIDE
21
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.21 Web Applications Hypertext Markup language (HTML):Hypertext Markup language (HTML): –Not a true programming language –Uses special symbols (tags) to control how Web pages are viewed JavaScript:JavaScript: –Used to make Web pages more visually appealing and interactive VBScript:VBScript: –A subset of Visual Basic –Used to add interactivity to Web pages Hypertext Markup language (HTML):Hypertext Markup language (HTML): –Not a true programming language –Uses special symbols (tags) to control how Web pages are viewed JavaScript:JavaScript: –Used to make Web pages more visually appealing and interactive VBScript:VBScript: –A subset of Visual Basic –Used to add interactivity to Web pages NEXT SLIDE
22
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.22 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 Flash:Flash: –Enables elaborate animations to be created for Web pages Extensible Markup Language (XML):Extensible Markup Language (XML): –Enables computers to efficiently transfer information between Web sites 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 Flash:Flash: –Enables elaborate animations to be created for Web pages Extensible Markup Language (XML):Extensible Markup Language (XML): –Enables computers to efficiently transfer information between Web sites NEXT SLIDE
23
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.23 Team Time TopicTopic –Write a software program that tells a vending machine how to make proper change from the bills or coins the customer insert. The program needs to deliver the smallest possible amount of coins for each transaction. Four teamsFour teams –Description team. Generate a problem statement, including: Goal, inputs, outputs, process, error handling –Algorithm design team. Present the problem as a top-down design sequence of steps. Using flowchart. –Testing team. Creating a testing plan for the program. Develop a table listing combinations of inputs and correct outputs TopicTopic –Write a software program that tells a vending machine how to make proper change from the bills or coins the customer insert. The program needs to deliver the smallest possible amount of coins for each transaction. Four teamsFour teams –Description team. Generate a problem statement, including: Goal, inputs, outputs, process, error handling –Algorithm design team. Present the problem as a top-down design sequence of steps. Using flowchart. –Testing team. Creating a testing plan for the program. Develop a table listing combinations of inputs and correct outputs
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.