Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Structured Programming

Similar presentations


Presentation on theme: "Introduction to Structured Programming"— Presentation transcript:

1 Introduction to Structured Programming
King Abdulaziz University Faculty of Engineering Electrical Engineering Dept. EE 201 C Fall 2013

2 Class Learning Objectives
Achieve Knowledge about Engineering problems and the use of Computer solutions . Achieve Knowledge about what is required for an active classroom

3 Engineering problems and Computer solutions Overview
Engineers APPLY math and science for the betterment of society through: - Design Manufacturing - Research & Development - Management - Continual Improvement Above all, engineers are problem solvers who make things work better, more efficiently, quicker and cheaper.

4 Engineers have been involved in almost everything you see, touch, or rely upon

5 Engineering problems and Computer solutions Overview
Engineers must analyze and solve a wide range of technical problems. Ranging from simple single-solution problems, to open-ended ones OEP will likely require a team of engineers from several disciplines. Some problems may have no clear solution.

6 Engineering problems and Computer solutions Overview
SOME SAY ENGINEERING PROBLEM SOLVING REQUIRES A COMBINATION OF SCIENCE AND ART: SCIENCE Math Physics Chemistry Mechanics Etc. ART Judgment Experience Common-Sense Know-How Etc.

7 THE ENGINEERING METHOD
RECOGNIZE AND UNDERSTAND THE PROBLEM GATHER DATA (AND VERIFY ITS ACCURACY) SELECT GUIDING THEORIES AND PRINCIPLES MAKE ASSUMPTIONS WHEN NECESSARY SOLVE THE PROBLEM VERIFY THE RESULTS PRESENT THE SOLUTION

8 Your problem Share opinions ???!!!
Suppose you wanted to explain to someone who can only understand simple instructions: How to compute the gas mileage for a car each time they filled up their tank ?. Share opinions ???!!!

9 Instructions as simple as possible:
1. Read the current odometer value. 2. Retrieve the previous value from the glove compartment. 3. Subtract the value obtained in step 2 from the value obtained in step 1. 4. Fill up the tank. 5. Read the number of gallons pumped. 6. Divide the number obtained in step 3 by the number obtained in step 5. 7. Display the number obtained in step 5 as the mileage. 8. Write the odometer value obtained in step 1 on a piece of paper. 9. Store the paper from step 8 in the glove compartment. 10. Stop.

10 A better way might be: 1. Read the current odometer value. 2. Write the odometer value obtained in step 1 on a piece of paper. 3. Is there a previous odometer reading in the glove compartment? (a) If the answer is no, (i) Store the paper from step 2 in the glove compartment. (ii) Stop. (b) If the answer is yes, retrieve the previous value from the glove compartment. 4. Store the paper from step 2 in the glove compartment. 5. Subtract the value obtained in step 3(b) from the value obtained in step Fill up the tank. 7. Read the number of gallons pumped. 8. Divide the number obtained in step 5 by the number obtained in step Display the number obtained in step 8 as the mileage. 10. Stop.

11 What we did ? first figure out the information that is available.
know the inputs available, and the outputs required. develop the procedure you would use to calculate the gas mileage, (i.e. algorithm development). Finally, break down the procedure into simple steps, or refine the algorithm so that someone who understands only very simple instructions will be able to carry out the procedure.

12 Conclusion The reason for selecting a very simple individual as the recipient of our instructions is that in some ways the computer is very simple indeed. The computer is a very fast machine which is highly accurate and has an extremely large memory but no “understanding.” It has a very limited set of instructions it “understands,” and it follows these instructions exactly and literally. Hence, the need for instructions to be very precise.


Download ppt "Introduction to Structured Programming"

Similar presentations


Ads by Google