Problem Solving and Program Design in C (5th Edition) by Jeri R. Hanly and Elliot B. Koffman Chapter 1 (Software Development Method) © CPCS
CHAPTER 1 1. The Software Development Method 2. Exercise 3. Terms to Remember 2 # column shows the topics index. column shows the programs index.
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 Outline
The Software Development Method C. Example 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
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 = kilometers 5 1 ImplementationProblem Analysis Design / Algorithm TestingMaintenance
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 = kilometer) 3. Display the distance in kilometers on the screen. 6 1 ImplementationProblemAnalysis Design / Algorithm Design / Algorithm TestingMaintenance
The Software Development Method C. Example 4. Implementation: (تنفيذ) “write the code” 7 1 Implementation ProblemAnalysis Design / Algorithm TestingMaintenance
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
The Software Development Method C. Example 6. Maintenance (صيانة) / Debugging: “remove undetected errors” 9 1 ImplementationProblemAnalysis Design / Algorithm Testing Maintenance
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 Win 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); }
Terms to Remember Programming Language Software Development Method Editor Compile Linking Run a program (Compiling then Linking) \ Build Debug Test Case 11 3