EGR 115 Introduction to Computing for Engineers

Slides:



Advertisements
Similar presentations
1 ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
Advertisements

Programming System development life cycle Life cycle of a program
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Algorithm Design CS105. Problem Solving Algorithm: set of unambiguous instructions to solve a problem – Breaking down a problem into a set of sub- problems.
Chapter 1 Program Design
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 3P. 1Winter Quarter Structured Engineering.
PRE-PROGRAMMING PHASE
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 3P. 1Winter Quarter Structured Engineering.
BY RAJESWARI S SOFTWARE TESTING. INTRODUCTION Software testing is the process of testing the software product. Effective software testing will contribute.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Introduction to High-Level Language Programming
Introduction to Programming Prof. Rommel Anthony Palomino Department of Computer Science and Information Technology Spring 2011.
Writing a Program Chapter 1. Introduction We all “start” by learning how to code in some programming language. –With a small, hypothetical, and fairly.
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
Planning for the Solution
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
Introduction to Software Design Chapter 1. Chapter Objectives  To become familiar with the software challenge and the software life cycle  To understand.
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
1 Introduction to Software Engineering Lecture 1.
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
Introduction to Software Development. Systems Life Cycle Analysis  Collect and examine data  Analyze current system and data flow Design  Plan your.
ECE 264 Object-Oriented Software Development Instructor: Dr. Honggang Wang Fall 2012 Lecture 2: Software Design Cycle.
The Programming Process Define the problem* Make or buy software? Design the program * Code (write) the program Test (debug) the program Document the.
Software Development Life Cycle by A.Surasit Samaisut Copyrights : All Rights Reserved.
Cs413_design04.ppt Design and Software Development Design : to create a functional interface that has high usability Development : an organized approach.
1 Ch. 1: Software Development (Read) 5 Phases of Software Life Cycle: Problem Analysis and Specification Design Implementation (Coding) Testing, Execution.
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
Programming and Languages
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 3P. 1Winter Quarter Structured Engineering Problem Solving and Logic.
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
EGR 115 Introduction to Computing for Engineers Branching & Program Design – Part 1 Monday 29 Sept 2014 EGR 115 Introduction to Computing for Engineers.
The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific.
November 29, 2011 Final Presentation. Team Members Troy Huguet Computer Engineer Post-Route Testing Parker Jacobs Computer Engineer Post-Route Testing.
CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles.
The Hashemite University Computer Engineering Department
EGR 115 Introduction to Computing for Engineers Branching & Program Design – Part 3 Friday 03 Oct 2014 EGR 115 Introduction to Computing for Engineers.
The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development Lecture 2 Debugging,
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
CMSC 2021 Software Development. CMSC 2022 Software Development Life Cycle Five phases: –Analysis –Design –Implementation –Testing –Maintenance.
CSCI 161 Lecture 3 Martin van Bommel. Operating System Program that acts as interface to other software and the underlying hardware Operating System Utilities.
The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development Lecture 2 Debugging,
SKMM1013 Programming for Engineers
Software Testing.
ALGORITHMS AND FLOWCHARTS
Introduction to Programming and Visual Basic
1-1 Logic and Syntax A computer program is a solution to a problem.
DDC 1023 – Programming Technique
Verification and Testing
Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.
Chapter 13 & 14 Software Testing Strategies and Techniques
Chapter 8: Introduction to High-Level Language Programming
Introduction to Problem Solving
Problem Solving Techniques
Lecture 09:Software Testing
Chapter 2- Visual Basic Schneider
The Programming Process
Software Verification, Validation, and Acceptance Testing
Introduction to Algorithms - 1
Version Control CS169 Lecture 7 Prof. Aiken CS 169 Lecture 7 1.
Introduction – “Writing A Program”
Basic Concepts of Algorithm
Software Development Chapter 1.
Review of Previous Lesson
CHAPTER 6 Testing and Debugging.
Chapter 1: Creating a Program.
Software Testing Strategies
Presentation transcript:

EGR 115 Introduction to Computing for Engineers Branching & Program Design – Part 1 Lecture 14 EGR 115 Introduction to Computing for Engineers

EGR 115 Introduction to Computing for Engineers Lecture Outline Branching & Program Design Top-down design Pseudocode Lecture 14 EGR 115 Introduction to Computing for Engineers

Branching & Program Design Top-Down Design – Five Design Steps Clearly state the problem to be solved Carefully articulate the objectives Define required inputs and outputs Constraints/requirements Design the algorithm to be implemented Define a simple step-by-step procedure (pseudocode?) Will use a top-down approach Convert the algorithm into code (e.g., MATLAB, C, …) Replace pseudocode with actual code Test the resulting program Verify and Validate the design (debugging?) Cant solve the problem If it is NOT understood!!! Goes-intos & Goes-outs! Lecture 14 EGR 115 Introduction to Computing for Engineers

EGR 115 Introduction to Computing for Engineers Branching & Program Design Top-Down Design – Step 1: Define the Problem STEP 1: Clearly state the problem to be solved Carefully articulate the objectives If you can not clearly define the problem then you can NOT construct a coherent solution!! Understand your target audience Just myself? My class / fellow engineering students? Millions of consumers? Frequency of usage Just for this one homework assignment? Throughout the term? Daily for many years? Very different audiences. Maintenance Implications. Lecture 14 EGR 115 Introduction to Computing for Engineers

EGR 115 Introduction to Computing for Engineers Branching & Program Design Top-Down Design - Step 2: Define the Inputs/Outputs Step 2: Define required inputs and outputs Constraints / requirements How many inputs / outputs? What type of inputs / outputs? Data format(s)? Valid range of the input variables? How to respond to invalid inputs? E.g., Select an Input between 1 and 10: 66 Where will the input(s) come from? Keyboard, file, real-time data, … Where will the output(s) go to? Screen-text, file, plot, … Lecture 14 EGR 115 Introduction to Computing for Engineers

EGR 115 Introduction to Computing for Engineers Branching & Program Design Top-Down Design – Step 3: Design the Algorithm Step 3: Design the algorithm to be implemented Define a simple step-by-step procedure (pseudocode?) Use natural language description NOT MATLAB code May require multiple passes Top-Down Algorithmic Decomposition Break the problem down into smaller sub-problems Define modules and sub-modules These may also have individual I/O definitions!! Lecture 14 EGR 115 Introduction to Computing for Engineers

EGR 115 Introduction to Computing for Engineers Branching & Program Design Top-Down Design – Step 4: Convert Algorithm to Code Step 4: Convert the algorithm to code Replace pseudocode with actual code Divide and conquer!! Build and test small pieces Progressive integration!! Final step is to “encode” the algorithm using the chosen programming language (e.g., MATLAB, C, Java, …) This is NOT the 1st Step!!!!!!!!!!! E.g., Sudoku Game – First step was NOT writing MATLAB code!!!!! You may run into limitations of the chosen language. Lecture 14 EGR 115 Introduction to Computing for Engineers

Branching & Program Design Top-Down Design – Step 5: Test the Program Step 5: Test the resulting program Verify and Validate the design Verification: Are we solving the problem correctly? Validation: Are we solving the right problem? Can be approached at a program level More often conducted at a component/module level. Regression testing How do I determine the effects of an update/change? I only made a small change!!! Famous last words!! Step 5 is often the most time consuming of the five steps!! Lecture 14 EGR 115 Introduction to Computing for Engineers

Branching & Program Design Top-Down Design – Design Flow MATLAB coding is the 2nd to last step!! Understanding the problem is the 1st step!! The last step in the design flow is testing. Lecture 14 EGR 115 Introduction to Computing for Engineers

EGR 115 Introduction to Computing for Engineers Branching & Program Design Top-Down Design - Complex System Design Flow Design process for complex systems May include both hardware & software "Introduction to Rapid Software Testing" By Chris Brown, Gary Cobb, Robert Culbertson. Lecture 14 EGR 115 Introduction to Computing for Engineers

EGR 115 Introduction to Computing for Engineers Branching & Program Design Top-Down Design – Life Cycle of a Computer Program Alpha release Objective: Identify and fix major bugs (typically internal audience) First complete version Similar to final testing after complete integration Beta release Objective: Identify and fix minor bugs (typically external audience) Engage outside testers for bugs Similar to qualification or acceptance testing in aerospace industry Lecture 14 EGR 115 Introduction to Computing for Engineers

Branching & Program Design Pseudocode What is pseudocode? The design process by which we "design the algorithm (and data structures)" by decomposing the problem into more manageable sub-problems. Pseudocode is one method to design the algorithm It happens to be the method favored by the text Other methods include: Flowcharting Data flow diagrams Class diagrams Lecture 14 EGR 115 Introduction to Computing for Engineers

Branching & Program Design Pseudocode – A Flowchart example Start Declare variable types READ hours, base pay rate, overtime pay rate Compute pay at base rate Hours > 40? Compute overtime bonus pay Add overtime to base PRINT results STOP Yes No Lecture 14 EGR 115 Introduction to Computing for Engineers

Branching & Program Design Pseudocode – An Example The prior example in pseudocode %READ in data: hours, base pay rate, overtime pay rate %Compute pay at base rate %IF hours > 40 %Compute overtime bonus %Add to base %Print results %END Lecture 14 EGR 115 Introduction to Computing for Engineers

EGR 115 Introduction to Computing for Engineers Next Lecture Logic Operators Lecture 14 EGR 115 Introduction to Computing for Engineers