tailieunhanh - Lecture Computing for management - Chapter 31

Lecture 31 - Flowcharts and debugging. After studying this chapter you will be able to understand: Standard (predefined) functions and discover how to use them in a program; learn about user-defined functions; examine value-returning functions, including actual and formal parameters; explore how to construct and use a value-returning, user-defined function in a program. | Flowcharts and Debugging Lecture 31 Summary of Previous Lecture In the previous lecture we have understood, Arrays Declaration Initialization Input/Output Passing arrays to functions Summary of Previous Lecture Character Strings Representation Declaration Index of a char in a string String operations Common mistakes Today’s Lecture The Software Development Cycle Flowcharts Selection Sequence Iteration How to diagnose errors in your program? Methods for debugging Methods for testing Components of the Software Development Process Define the problem clearly Analyze the problem Design an algorithm top-down design Document the system Code (Implement) the algorithm Test the code Our Today’s topic! Development Cycle Analysis Design Implement Test debugging and testing Debugging and Testing Debugging: the process of finding and correcting errors ( “bugs”) Testing: executing the program on a test data set Types of Errors syntactic: how instructions are written semantic: what they represent while (i=0; i Flowcharts Represent flow of control of algorithms: sequences selection iteration Useful for: Finding semantic errors Determining test data set Sequence (revision) Series of instructions to be carried out in a fixed sequential order Example 1: Step A: input number Step B: add 1 to number Step C: output number Flowchart: Sequence Step A: input number Step B: add 1 to number Step C: output number Instruction in rectangular box Order of execution indicated by arrows Represented by concatenating instructions (usually vertically) Step A: input number Step B: if number is negative, then add -1 to number else add 1 to number Step C: output number Example 2: an algorithm involving “selection” Step A: input number Step C: output number Sequence (cont) Flowchart: Selection Step A if ( condition C1 ) { . | Flowcharts and Debugging Lecture 31 Summary of Previous Lecture In the previous lecture we have understood, Arrays Declaration Initialization Input/Output Passing arrays to functions Summary of Previous Lecture Character Strings Representation Declaration Index of a char in a string String operations Common mistakes Today’s Lecture The Software Development Cycle Flowcharts Selection Sequence Iteration How to diagnose errors in your program? Methods for debugging Methods for testing Components of the Software Development Process Define the problem clearly Analyze the problem Design an algorithm top-down design Document the system Code (Implement) the algorithm Test the code Our Today’s topic! Development Cycle Analysis Design Implement Test debugging and testing Debugging and Testing Debugging: the process of finding and correcting errors ( “bugs”) Testing: executing the program on a test data set Types of Errors syntactic: how instructions are written semantic: what .

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.