Chapter3 - Engineering Problem Solving with C+,...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Engineering Problem Solving with C++, Second Edition, J. Ingber 1 Engineering Problem Solving with C++, Etter/Ingber Chapter 3 Control Structures Prof. Xin Wang (xwang@ece.sunysb.edu) Office: 235 Light Engineering building Class time: TuTh 3 :50 pm – 5:10 pm Office Hour: Tu : 10:00 am- 11:00 am, 3:50 pm -4:50 pm TAs: Ying Li (yili @ic.sunysb.edu ) Raghupathy Sekar ( raghupathy@live.com ) DaoMin Lin ( dmlsagi.08@hotmail.com ) Xiao Chen ( lixiaochen@live.com ) Amit Shah ( ashah491@gmail.com ) Xiu Zhang (jash006@hotmail.com ) Office hours: Mon: 10:00 am -2:00 pm; Tu: 3::0 pm – 5:00 pm Wed; 3:00 pm-5:00 pm; Thur: 1:00 pm – 3:00 pm Fri:9:30 :am – 11:30 am Office Place: Light Engineering Building Room 208 Control structures ± Algorithm Development ± Conditional Expressions ± Selection Statements ± Repetition Statements ± Structuring Input Loops Engineering Problem Solving with C++, Second Edition, J. Ingber 2 ALGORITHM DEVELOPMENT Structured Programming Evaluation of Alternative Solutions Engineering Problem Solving with C++, Second Edition, J. Ingber 3 Algorithm Development ± An algorithm is a sequence of steps for solving a problem. ± Engineering problem solutions to real world problems require complex algorithms. ± Development of a good algorithm increases the quality and maintainability of a solution, and reduces the overall time required to implement a correct solution. Engineering Problem Solving with C++, Second Edition, J. Ingber 4
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Top-Down Design ± Top-down design begins with a "big picture" description of a problem solution in sequential steps. ± The sequential steps are refined until the steps are detailed enough to translate to language statements. ± The refined steps, or algorithm, can be described using pseudo code or flowcharts. Engineering Problem Solving with C++, Second Edition, J. Ingber 5 Evaluation of Alternative Solutions ± Most problems have more than one solution. ± There may not be a single best solution, but some solutions are better than others. ± Elements that contribute to a good solution: correctness reliability readability maintainability execution speed memory considerations user interface Engineering Problem Solving with C++, Second Edition, J. Ingber 6 Structured Programming ± A structured program is written using simple control structures, including: Sequence – steps are performed one after another. Selection – one set of statements is executed if a given condition is true, a different set of statements, or no statements at all, is executed if the condition is false. Repetition – A set of statements is executed repeatedly as long as a given condition is true. Engineering Problem Solving with C++, Second Edition, J. Ingber 7 Engineering Problem Solving with C++, Second Edition, J. Ingber 8 Structured Programming ± Sequence ± Selection ± Repetition ?
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 13

Chapter3 - Engineering Problem Solving with C+,...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online