Presentation is loading. Please wait.

Presentation is loading. Please wait.

Problem Solving and Program Design in C (5th Edition) by Jeri R. Hanly and Elliot B. Koffman Chapter 1 (Software Development Method) © CPCS 202 12-10-1429.

Similar presentations


Presentation on theme: "Problem Solving and Program Design in C (5th Edition) by Jeri R. Hanly and Elliot B. Koffman Chapter 1 (Software Development Method) © CPCS 202 12-10-1429."— Presentation transcript:

1 Problem Solving and Program Design in C (5th Edition) by Jeri R. Hanly and Elliot B. Koffman Chapter 1 (Software Development Method) © CPCS 202 12-10-1429

2 CHAPTER 1 1. The Software Development Method 2. Exercise 3. Terms to Remember 2 #  column shows the topics index.  column shows the programs index.

3 The Software Development Method A. Introduction  You need to be a problem solver  A good problem solver  a good programmer  Programmers use the Software Development Method (method to develop software)  This is what you will learn in this course. B. Prototype 3 1 ImplementationProblemAnalysis Design / Algorithm TestingMaintenance 1. 2. 3. 4. 5. 6. Outline

4 The Software Development Method C. Example 4 1 1. Problem: “define the problem you are trying to solve” Your summer surveying job requires you to study some maps that give distances in kilometers and some that use miles. You and your coworkers prefer to deal in metric measurements. Write a program that performs the necessary conversion. Implementation Problem Analysis Design / Algorithm TestingMaintenance 1. 2. 3. 4. 5. 6.

5 The Software Development Method C. Example 2. Analysis (تحليل): “define the inputs and the outputs of the program” 1. Problem Input: miles 2. Problem Output: kilometers 3. Relevant Formula: 1 mile = 1.609 kilometers 5 1 ImplementationProblem Analysis Design / Algorithm TestingMaintenance 1. 2. 3. 4. 5. 6.

6 The Software Development Method C. Example 3. Design / Algorithm: “steps to solve the problem and could be written any way, but they have to be understandable” 1. Get the distance in miles from the user. 2. Convert the distance to kilometers. (1 miles = 1.609 kilometer) 3. Display the distance in kilometers on the screen. 6 1 ImplementationProblemAnalysis Design / Algorithm Design / Algorithm TestingMaintenance 1. 2. 3. 4. 5. 6.

7 The Software Development Method C. Example 4. Implementation: (تنفيذ) “write the code” 7 1 Implementation ProblemAnalysis Design / Algorithm TestingMaintenance 1. 2. 3. 4. 5. 6.

8 The Software Development Method C. Example 5. Testing: “verify that the program works properly by trying few test cases” 8 1 ImplementationProblemAnalysis Design / Algorithm Testing Maintenance 1. 2. 3. 4. 5. 6.

9 The Software Development Method C. Example 6. Maintenance (صيانة) / Debugging: “remove undetected errors” 9 1 ImplementationProblemAnalysis Design / Algorithm Testing Maintenance 1. 2. 3. 4. 5. 6.

10 Implementation Problem Analysis Design Outline Testing Maintenance Exercise 2  Type the following code in an editor, and then run it:  Try to understand the output message: ------ Build started: Project: Prog2_1, Configuration: Debug Win32 ------ Compiling... Linking... \Debug\BuildLog.htm" Prog2_1 - 0 error(s), 0 warning(s) Note: you will understand the meaning of the code later 10 #include int main(void) { // 1. Display “Hello World!!” on the screen printf("Hello World!!\n"); return(0); } 1. 2. 3. 4. 5. 6. 7. 8. 9.

11 Terms to Remember  Programming Language  Software Development Method  Editor  Compile  Linking  Run a program (Compiling then Linking) \ Build  Debug  Test Case 11 3


Download ppt "Problem Solving and Program Design in C (5th Edition) by Jeri R. Hanly and Elliot B. Koffman Chapter 1 (Software Development Method) © CPCS 202 12-10-1429."

Similar presentations


Ads by Google