Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.

Slides:



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

Overview of Programming and Problem Solving ROBERT REAVES.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Overview. What is Computer Programming? It is the process of planning a sequence of steps (called instructions) for a computer to follow. 2 STEP 1 STEP.
This set of slides is provided by the author of the textbook1 Introductory Topics (Continued) l Computer Components l Basic Control Structures l Problem.
© Janice Regan Problem-Solving Process 1. State the Problem (Problem Specification) 2. Analyze the problem: outline solution requirements and design.
1 Chapter 1 Introduction to Object-Oriented Programming.
1 Chapter 1 Overview of Programming and Problem Solving Dale/Weems Slides based on work by Sylvia Sorkin, Community College of Baltimore County - Essex.
Chapter 1 Introduction to Object- Oriented Programming and Problem Solving.
Program Design and Development
Program Flow Charting How to tackle the beginning stage a program design.
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
Chapter 1 Program Design
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
PRE-PROGRAMMING PHASE
CS 115 Chapter 1 Overview of Programming and Problem Solving.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
1 Chapter 1 Overview of Programming and Problem Solving Dale/Weems Slides based on work by Sylvia Sorkin, Community College of Baltimore County - Essex.
Simple Program Design Third Edition A Step-by-Step Approach
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
Programming Concepts Chapter 3.
Chapter 3 Developing an algorithm. Objectives To introduce methods of analysing a problem and developing a solution To develop simple algorithms using.
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
CS 1308 Computer Literacy and The Internet Software.
© 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Stewart Venit ~ Elizabeth Drake Developing a Program.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
Chapter 1 Program design Objectives To describe the steps in the program development process To introduce the current program design methodology To introduce.
Cs413_design04.ppt Design and Software Development Design : to create a functional interface that has high usability Development : an organized approach.
CS221 Algorithm Basics. What is an algorithm? An algorithm is a list of instructions that transform input information into a desired output. Each instruction.
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
Computer Programming CONTENTS Introduction to Operating Systems Introduction to programming languages Introduction to perl programming language Programming.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
1 Overview of Programming Principles of Computers.
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Evolution of C and C++ n C was developed by Dennis Ritchie at Bell Labs (early 1970s) as a systems programming language n C later evolved into a general-purpose.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Software Engineering Algorithms, Compilers, & Lifecycle.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
ICS 3UI - Introduction to Computer Science
Topic: Programming Languages and their Evolution + Intro to Scratch
DDC 1023 – Programming Technique
Chapter 2- Visual Basic Schneider
Algorithm and Ambiguity
Algorithm and Ambiguity
An Introduction to Visual Basic .NET and Program Design
Problem Solving Techniques
Chapter 2- Visual Basic Schneider
Chapter 2- Visual Basic Schneider
Algorithm and Ambiguity
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Click to add Text Computers & Instructions. Computers are given instructions in the form of computer programs that are created through the development.
ICT Gaming Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Programming Logic and Design Eighth Edition
Presentation transcript:

Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way

Problem Decomposition Breaking a problem down into smaller and smaller steps until each step can be accomplished Putting the solutions of each small step back together to solve the original problem MSE 2400 Evolution & Learning2

What is Programming Program – a very specific set of instructions (or command lines) that make a computer do what you want it to do Programming – the process of creating a program –the development of a solution to an identified problem, and setting up of a related series of instructions which, when directed through computer hardware, will produce the desired results MSE 2400 Evolution & Learning3

Steps in program development 1.Define the problem 2.Outline the solution 3.Develop the outline into an algorithm 4.Test the algorithm for correctness 5.Code the algorithm into a specific programming language 6.Run the program on the computer 7.Document and maintain the program MSE 2400 Evolution & Learning4

Define the Problem Divide the problem into three components (called IPO): –Inputs – what do you have? –Outputs – what do you want to have? –Processing how do you go from inputs to outputs? A defining diagram is recommended MSE 2400 Evolution & Learning5

Outline the Solution The major processing steps involved The major subtasks (if any) The major control structures (e.g. repetition loops) The major variables and record structures The mainline logic MSE 2400 Evolution & Learning6

Develop the Outline into an Algorithm Algorithm is a set of precise steps that describe exactly the tasks to be performed, and the order in which they are to be carried out Pseudocode (a form of structured English) is used to represent the solution algorithm MSE 2400 Evolution & Learning7

Test the Algorithm for Correctness The main purpose of desk checking the algorithm is to identify major logic errors early, so that they may be easily corrected Test data needs to be walked through each step in the algorithm, to check that the instructions described in the algorithm will actually do what they are supposed to MSE 2400 Evolution & Learning8

Code the Algorithm into a Specific Programming Language Only after all design considerations have been met should you actually start to code the program into your chosen programming language (e.g. Python, Visual Basic, Java, C++) MSE 2400 Evolution & Learning9

Run the Program on the Computer This step uses a program compiler and programmer-designed test data to machine test the code for syntax errors Program complier translate high-level languages (e.g. VB) to low-level machine language before execution MSE 2400 Evolution & Learning10

Document and Maintain the Program Not the last step in the program development process An ongoing task from the initial definition of the problem to the final test result Involves both external documentation (such as hierarchy charts) and internal documentation that may have been coded in the program MSE 2400 Evolution & Learning11

12 An Algorithm is... instructions for solving a problem in a finite amount of time using a finite amount of data MSE 2400 Evolution & Learning

13 A Program is... an algorithm written for a computer that defines classes of objects and orchestrates their interactions to solve a problem objects work together to create an application (or program) that solves a problem MSE 2400 Evolution & Learning

14 Code is... the product of translating an algorithm into a programming language instructions for a computer that are written in a programming language MSE 2400 Evolution & Learning

15 Programming Shortcut? THINKING CODE TEST PROBLEM-SOLVING PHASE IMPLEMENTATION PHASE Shortcut? Algorithm Code Problem MSE 2400 Evolution & Learning

16 Problem Solving Techniques ASK QUESTIONS -- about the data, the process, the output, error conditions LOOK FOR FAMILIAR THINGS -- certain situations arise again and again SOLVE BY ANALOGY -- it may give you a place to start USE MEANS-ENDS ANALYSIS -- Determine the I/O and then work out the details MSE 2400 Evolution & Learning

17 More Problem Solving Techniques DIVIDE AND CONQUER -- break up large problems into manageable units BUILDING-BLOCK APPPROACH -- can you solve small pieces of the problem? MERGE SOLUTIONS -- instead of joining them end to end to avoid duplicate steps OVERCOME MENTAL BLOCK -- by rewriting the problem in your own words MSE 2400 Evolution & Learning

18 Sample Problem A programmer wants to count the number of words in a text file MSE 2400 Evolution & Learning

Count Words in File Steps? MSE 2400 Evolution & Learning19