chapter 15 program development and programming languages n.
Skip this Video
Loading SlideShow in 5 Seconds..
Chapter 15 Program Development and Programming Languages PowerPoint Presentation
Download Presentation
Chapter 15 Program Development and Programming Languages

Chapter 15 Program Development and Programming Languages

148 Views Download Presentation
Download Presentation

Chapter 15 Program Development and Programming Languages

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Chapter 15Program Development and Programming Languages

  2. Chapter 15 Objectives Next Describe the object-oriented approach to program development Explain the six steps in the program development life cycle Describe top-down program design Identify programming languages commonly used today Explain structured program design and the three basic control structures Identify the uses of application generators, macros, and RAD tools Explain the differences among the categories of programming languages Describe various Web page development tools, including HTML, DHTML, XML, and WML Identify uses of multimedia authoring packages p.15.2

  3. What is a computer program? A set of instructions that directs a computer to perform tasks Computer programmers use program development tools that generate these instructions automatically use a programming language to write these instructions themselves What is a Computer Program? programming language A set of words, symbols, and codes that enables a programmer to communicate instructions to a computer Next p.15.2

  4. What is the program development life cycle (PDLC)? A set of steps programmers use to build computer programs The Program Development Life Cycle Next p.15.22 Fig. 15-1

  5. How is program development related to system development? Program development is an ongoing process within system development The Program Development Life Cycle Next p.15.3 Fig. 15-2

  6. What initiates the PDLC? During the analysis phase of the system development life cycle (SDLC), the development team recommends how to handle software needs If the company recommends in-house development, programmers begin the PDLC as part of the implementation phase The Program Development Life Cycle Next p.15.3 Fig. 15-2

  7. What is the program specification package? A detailed set of requirements for a system created by the systems analyst during the design phase of the SDLC Identifies the input, output, processing, and data requirements of each program and the relationships among programs The scope of the program specification package largely determines how many programmers work on the program development The Program Development Life Cycle programming team A group of programmers who develop the programs Next Click to view video p.15.3

  8. What is involved in analyzing the problem? Analyze the problem the program(s) should solve so you can begin to develop an appropriate solution In most cases, the solution requires more than one program Three major tasks Step 1 – Analyze Problem Review the program specifications package Meet with the systems analyst and users Identify each program’s input, output, and processing components Next p.15.4

  9. Package contains a variety of deliverables that identify input, output, design and data requirements By thoroughly reviewing the package, the programmer understands the nature and requirements of each program Why does the programmer review the program specification package? Step 1 – Analyze Problem charts screen and report layout charts diagrams data dictionary reports systems flowcharts structured English decision tables and decision trees Next p.15. 4

  10. What is an IPO chart? Also called a defining diagram Identifies a program’s inputs, its outputs, and the processing steps required to transform the inputs into the outputs Step 1 – Analyze Problem Next p.15.4 Fig. 15-3

  11. Three tasks grouping each program’s activities into modules devising a solution algorithm for each module testing the solution algorithms What is involved in designing programs? Step 2 – Design Programs top-down design Task 1 Focuses on what the program should do structured design Tasks 2 and 3 Determines how to build the programs based on the requirements Next p.15.5

  12. Breaks down the original set of program specifications into smaller, more manageable sections What is top-down design? Step 2 – Design Programs Identify the the major functions of a program, called the main routine or the main module Decompose (break down) the main routine into smaller sections called subroutines Analyze each subroutine to determine if it can be decomposed further Continue decomposing subroutines until each one performs a single function A section of a program that performs a single function is a module Next Click to view Web Link then click Top-Down Design p.15.5

  13. What is a hierarchy chart? Also called a structure chart or top-down chart Used to show program modules graphically Step 2 – Design Programs Next p.15. 6Fig. 15-4

  14. What is structured design? A technique that builds all program logic from a combination of three basic control structures A control structure is a design that determines the logical order of program instructions also called a construct Each module typically contains more than one control structure Step 2 – Design Programs sequence control structure selection control structure repetition control structure Next Click to view Web Link then click Structured Design p.15.6

  15. What is a sequence control structure? Shows one or more actions following each other in order Actions inputs processes outputs Step 2 – Design Programs Next p.15.7 Fig. 15-5

  16. What is a selection control structure? Tells the program which action to take, based on a certain condition Two common types of selection control structures Step 2 – Design Programs if-then-else control structure case control structure Next p.15.7

  17. What is an if-then-else control structure? Allows a program to evaluate the condition and yields one of two possibilities: true or false If the result of the condition is true, the program performs one action If the result is false, the program performs a different (or possibly no) action Step 2 – Design Programs Next p.15.7 Fig. 15-6

  18. What is a case control structure? A condition can yield one of three or more possibilities Step 2 – Design Programs Next p.15.7 Fig. 15-7

  19. What is a repetition control structure? Also called the iteration control structure or a loop Used when a program performs one or more actions repeatedly as long as a certain condition is met Two forms Step 2 – Design Programs do-while control structure do-until control structure Next p.15.8

  20. What is a do-while control structure? Repeats one or more times as long as a condition is true Tests a condition at the beginning of the loop If the result is true, the program executes the action(s) inside the loop Program loops back and tests the condition again Looping continues until the condition becomes false Step 2 – Design Programs Next p.15.8 Fig. 15-8

  21. What is a do-until control structure? Tests the condition at the the end of the loop The action(s) will always execute at least once Continues looping until the condition is true, and then stops Step 2 – Design Programs Next p.15.8 Fig. 15-9

  22. The program, each of its modules, and each of its control structures must have No dead code No infinite loops One entry point One exit point What are the guidelines of a proper program? Step 2 – Design Programs dead code Any code, or program instruction, that a program never executes infinite loop A set of instructions that repeats continuously entry point The location where a program, a module, or a control structure begins exit point The location where it ends Next p.15.8

  23. How are entry and exit points shown? Program modules often have control structures nested inside one another Each control structure should have one entry point and one exit point Step 2 – Design Programs Next p.15.9 Fig. 15-10

  24. What is a solution algorithm? Also called program logic A graphical or written description of the step-by-step procedures in a module To help develop a solution algorithm, programmers use design tools Step 2 – Design Programs program flowchart Nassi-Schneiderman charts pseudocode Next p.15.9

  25. What is a program flowchart? Graphically shows the logic in a solution algorithm Follows a set of standards published by the American National Standards Institute (ANSI) in the early 1960s Step 2 – Design Programs Next p.15.9 Fig. 15-11

  26. How is a program flowchart drawn? Most symbols connect with solid lines showing the direction of the program Dotted lines connect comment symbols Step 2 – Design Programs comment symbol or annotation symbol Explains or clarifies logic Next p.15.10 Fig. 15-12

  27. What is flowcharting software? Used to develop flowcharts Makes it easy to modify and update flowcharts Step 2 – Design Programs Next Click to view Web Link then click Flowcharting Software p.15.10 Fig. 15-13

  28. What is a Nassi-Schneiderman (N-S) chart? Graphically shows the logic in a solution algorithm Sometimes called structured flowcharts Step 2 – Design Programs Next p.15.11 Fig. 15-14

  29. What is pseudocode? Uses a condensed form of English to convey program logic Also uses indentation to identify the three basic control structures Step 2 – Design Programs Next p.15.12 Fig. 15-15

  30. What is a quality review? The programmer checks the logic for correctness and attempts to uncover logic errors Two techniques for reviewing a solution algorithm desk check structured walkthrough Step 2 – Design Programs logic error A flaw in the design that causes inaccurate results Next p.1512

  31. The use of test data to step though a program’s logic Test data is sample data that mimics data the program might process once it is in production Involves five steps What is a desk check? Step 2 – Design Programs 1. Developing sets of test data (inputs) 2. Determining the expected result (output) for each set of data, without using the solution algorithm 3. Stepping through the solution algorithm using one set of test data and writing down the actual result obtained (output) using the solution algorithm 4. Comparing the expected result from Step 2 to the actual result from Step 3 5. Repeating Steps 3 and 4 for each set of test data Next p.15.12

  32. What is a structured walkthrough? A more formal technique for checking the solution algorithm The programmer explains the logic of the algorithm while members of the programming team step through the program logic Purpose is to identify errors in the program logic and check for possible improvements in program design Step 2 – Design Programs Detecting errors and making improvements early in the PDLC reduces the overall time and cost of program development Next p.15.12

  33. What is involved in coding programs? Two steps translating the solution algorithm into a programming language entering the programming language code into the computer Each of the many programming languages has a particular syntax Step 3 – Code Programs syntax The set of grammar and rules that specifies how to write instructions for a solution algorithm Next p.15.13

  34. How are programs documented? A programmer should take time to document the program code thoroughly Comments or remarks are included in a program as documentation Global comments explain the program’s purpose and identify the program name, its author, and the date written Internal comments explain the purpose of the code statements within the program Step 3 – Code Programs global comments internal comments Next p.15.13 Fig. 15-16

  35. What is involved in testing programs? Goal is to ensure the program runs correctly and is error free Two typical types of errors syntax errors logic errors Step 4 – Test Programs syntax errors Occur when the code violates the syntax, or grammar, of the programming language Usually discovered the first time a program code is executed on the computer logic errors Flaw in the design that generates inaccurate results Systems analyst develops test data including both valid and invalid input data Next p.15.13

  36. What is a run time error? A program failure occurring while a program is being executed Programmers use test data to deliberately cause a run time error in order to test the program Step 4 – Test Programs Next p.15.13

  37. What is debugging? The process of locating and correcting the syntax and logic errors in a program Errors themselves are the bugs The first bug was said to be a moth lodged in a computer's electronic components Step 4 – Test Programs Next p.15.14 Fig. 15-17

  38. What is a debug utility? Also called a debugger Allows you to identify syntax errors and to find logic errors You can examine program values while the program runs in slow motion Step 4 – Test Programs millennium bug Also called the Y2K bug Took effect when the computer date rolled over to January 1, 2000 Non Y2K compliant computers read the date as 01/01/00 Next p.15.14

  39. What is involved in formalizing a solution? The programmer performs two activities review the program code look for any dead code and remove it run the program one final time to verify it still works review all the documentation ensures all documentation is complete and accurate includes a number of types of documentation Step 5 – Formalize Solution hierarchy chart solution algorithm in the form of a program flowchart, and N-S chart, or pseudocode test data program code listings that contain global and internal comments Next p.15.15

  40. What is involved in maintaining programs? Two activities correcting errors adding enhancements involves modifying existing programs to improve their functionality When a program is implemented, or placed into production, users interact with the programs programs process actual, or live, transactions users identify errors and enhancements Step 6 – Maintain Programs When users identify errors or enhancements, they typically notify the systems analyst The systems analyst contacts and meets with a programmer They begin to analyze the problem or enhancement, which is Step 1 of the PDLC Next p.15.15

  41. What are programming languages and program development tools? Programming Languages and Program Development Tools programming language A set of words, symbols, and codes that enables a programmer to communicate a solution algorithm to the computer program development tool Consists of user-friendly software products designed to assist both programmers and nontechnical users with the creation of information system solutions Next p.15.16

  42. What are the categories of programming languages? Five major categories of programming languages Categories of Programming Languages assembly languages machine languages third-generation languages fourth-generation languages fifth-generation languages Next Click to viewanimation Click to view video p.15.16

  43. What are low- and high-level programming languages? Languages are classified as either low level or high level Categories of Programming Languages low-level language A programming language that is machine dependent high-level language A language that is machine independent machine-dependent language Only runs on one particular computer machine-independent language Can run on many different types of computers and operating systems third-generation, fourth-generation, and fifth-generation languages are high-level machine and assembly languages are low-level Next p.15.16

  44. What is machine language? The first generation of programming languages The only language the computer directly understands Uses a series of binary digits (1s and 0s) or a combination of numbers and letters that represent binary digits Binary digits correspond to the on and off electrical states of a computer Categories of Programming Languages Next Click to viewanimation p.15.16 Fig. 15-18

  45. What is assembly language? The second generation of programming languages A programmer writes instructions using symbolic instruction codes Categories of Programming Languages symbolic instruction codes Also called mnemonics Meaningful abbreviations and codes Next p.15.16 Fig. 15-19

  46. What are features of assembly languages? Categories of Programming Languages symbolic address A meaningful name that identifies a storage location Source program The program that contains the assembly language code macro Generates multiple machine language instructions for a single assembly language instruction Saves the programmer time during program development Assembler Converts the assembly language source program into machine language so that the computer can understand it Next p.15.17

  47. What is a third generation language (3GL)? Uses a series of English-like words to write instructions A procedural language requires the program instructions tell the computer what to accomplish and how to do it Categories of Programming Languages Next Click to viewanimation p.15.18 Fig. 15-20

  48. What is a compiler? Converts the entire source program into machine language before executing it The compiler checks the source program’s syntax Makes sure the program properly defines the data it will use in calculations or comparisons Produces a program listing which contains the source code and a list of any syntax errors Translates an entire program before executing it Categories of Programming Languages source program The 3GL code object code Also called an object program The machine language version that results from compiling the 3GL Next p.15.18 Fig. 15-20

  49. What is an interpreter? Reads a code statement Converts it to one or more machine language instructions Executes those machine language instructions Translates and executes one program code statement at a time Does not produce an object program Categories of Programming Languages Next p.15.18 Fig. 15-21

  50. What is a fourth-generation language (4GL)? Uses English-like statements The syntax is closer to human language than that of a 3GL A nonprocedural language programmer only specifies what the program should accomplish without explaining how many 4GLs work with a database and its project dictionary Categories of Programming Languages Next p.15.19 Fig. 15-22