Presentation is loading. Please wait.

Presentation is loading. Please wait.

Software Engineering CS103 February 13, 2004. How Do You Solve Big Problems? Thousands of programmers Thousands of programmers Months or years of coding.

Similar presentations


Presentation on theme: "Software Engineering CS103 February 13, 2004. How Do You Solve Big Problems? Thousands of programmers Thousands of programmers Months or years of coding."— Presentation transcript:

1 Software Engineering CS103 February 13, 2004

2 How Do You Solve Big Problems? Thousands of programmers Thousands of programmers Months or years of coding Months or years of coding 10,000 or more lines of code 10,000 or more lines of code The same organizational skills can be used for small problems too!

3 What is Software Engineering? An entire discipline dedicated to studying ways of organizing and managing the solution of complex problems An entire discipline dedicated to studying ways of organizing and managing the solution of complex problems One of the first lessons of software engineering is that you should never start writing code until after you’ve completed a design phase (on paper or CASE). One of the first lessons of software engineering is that you should never start writing code until after you’ve completed a design phase (on paper or CASE).

4 Top-Down Design One of the most popular strategies from Software Engineering One of the most popular strategies from Software Engineering Problem Decomposition – describing a problem as a set of smaller, simpler sub- problems Problem Decomposition – describing a problem as a set of smaller, simpler sub- problems This is an iterative process, meaning you apply it over and over again. The repeated application of decomposition is called stepwise refinement This is an iterative process, meaning you apply it over and over again. The repeated application of decomposition is called stepwise refinement

5 A 5 Step Process For Top-Down Design 1. State the problem

6 A 5 Step Process For Top-Down Design 1. State the problem 2. Define the inputs and outputs “Black Box” Inputs Outputs

7 A 5 Step Process For Top-Down Design 1. State the problem 2. Define the inputs and outputs 3. Design the algorithm a. Decompose into subproblems b. Perform stepwise refinement

8 Use Pseudocode! When describing the algorithm, start thinking about how you might program it When describing the algorithm, start thinking about how you might program it Pseudocode is a mixture of English, Matlab syntax and your own personal symbology Pseudocode is a mixture of English, Matlab syntax and your own personal symbology With each refinement, you’ll add a little more code, until you’re ready to sit down at the computer and do some serious programming With each refinement, you’ll add a little more code, until you’re ready to sit down at the computer and do some serious programming

9 A 5 Step Process For Top-Down Design 1. State the problem 2. Define the inputs and outputs 3. Design the algorithm a. Decompose into subproblems b. Perform stepwise refinement 4. Convert the algorithm to a program

10 A 5 Step Process For Top-Down Design 1. State the problem 2. Define the inputs and outputs 3. Design the algorithm a. Decompose into subproblems b. Perform stepwise refinement 4. Convert the algorithm to a program 5. Test the program

11 Carbon 14 Dating Let’s try an example of top-down design. We want to figure out how old these bones are

12 Carbon 14 Dating Radioactive isotopes are not stable. They decay into other elements over time. Radioactive decay is an exponential process: Q(t) = Q 0 e -λt so….. t decay = -(1/λ) ln(Q/Q 0 ) Radioactive isotopes are not stable. They decay into other elements over time. Radioactive decay is an exponential process: Q(t) = Q 0 e -λt so….. t decay = -(1/λ) ln(Q/Q 0 )


Download ppt "Software Engineering CS103 February 13, 2004. How Do You Solve Big Problems? Thousands of programmers Thousands of programmers Months or years of coding."

Similar presentations


Ads by Google