How to develop a program

Slides:



Advertisements
Similar presentations
The LC-3 – Chapter 6 COMP 2620 Dr. James Money COMP
Advertisements

A Level Computing#BristolMet Session Objectives#U2 S8 MUST identify the difference between a procedure and a function SHOULD explain the need for parameters.
19-1 Programming… The Pencil and Paper Computer The Pencil & Paper Instruction Set: (table on p148) The Operand specifies a memory location.
© Janice Regan Problem-Solving Process 1. State the Problem (Problem Specification) 2. Analyze the problem: outline solution requirements and design.
Computers: Tools for an Information Age
Copyright © 2001 by Wiley. All rights reserved. Chapter 1: Introduction to Programming and Visual Basic Computer Operations What is Programming? OOED Programming.
The Art of Programming Top-Down Design. The Art of Problem Solving The art of problem solving is the transformation of an English description of a problem.
1 I.Introduction to Algorithm and Programming Algoritma dan Pemrograman – Teknik Informatika UK Petra 2009.
6 Steps of the Programming Process
Learning Objectives Data and Information Six Basic Operations Computer Operations Programs and Programming What is Programming? Types of Languages Levels.
The Software Development Life Cycle. Software Development SDLC The Software Development Life-Cycle Sometimes called the program development lifecycle.
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
Chapter 1 Program design Objectives To describe the steps in the program development process To introduce the current program design methodology To introduce.
The Software Development Process
CSE 190p wrapup Michael Ernst CSE 190p University of Washington.
The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific.
1/32 This Lecture Substitution model An example using the substitution model Designing recursive procedures Designing iterative procedures Proving that.
How to develop a program CSE 160 University of Washington 1.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
MIT App Inventor Lesson 3 Algorithms Variables Procedures.
Chapter 1 The Phases of Software Development. Software Development Phases ● Specification of the task ● Design of a solution ● Implementation of solution.
Problem Solving.  Similar to Solving Math Word Problem  Read the Problem  Decide how to go about Solving the Problem  Solve the Problem  Test the.
Software. Introduction n A computer can’t do anything without a program of instructions. n A program is a set of instructions a computer carries out.
For Loop GCSE Computer Science – Python. For Loop The for loop iterates over the items in a sequence, which can be a string or a list (we will discuss.
How to develop a program CSE 140 University of Washington 1.
CIS 365: Visual Application Development Introduction to Computers and Programming.
CMSC 104, Version 8/061L05Algorithms2.ppt Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode Control Structures Reading Section 3.1.
How to develop a program
CST 1101 Problem Solving Using Computers
Introduction to Programming Part 1
ICS 3UI - Introduction to Computer Science
CS1010 Programming Methodology
Algorithms and Problem Solving
CSCI-235 Micro-Computer Applications
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Algorithm and Ambiguity
An Introduction to Programming and VB.NET
Think What will be the output?
Overview Instruction Codes Computer Registers Computer Instructions
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Algorithm and Ambiguity
*current controlled assessment plans are unknown
Problem Solving Techniques
Introduction to Computer Programming
Introduction to Algorithms
2008/09/22: Lecture 5 CMSC 104, Section 0101 John Y. Park
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
This Lecture Substitution model
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Chapter One: An Introduction to Programming and Visual Basic
The Programming Process
Algorithm and Ambiguity
The Programming Language L
How to develop a program
Algorithms and Problem Solving
Program Design Language (PDL)
PYTHON: BUILDING BLOCKS Sequencing & Selection
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Learning Intention I will learn about the iterative software development process with a focus on the Analysis stage.
This Lecture Substitution model
The Programming Language L
This Lecture Substitution model
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Lecture 13 Teamwork Bryan Burlingame 1 May 2019.
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
ASCII LP1.
How to develop a program
Presentation transcript:

How to develop a program Michael Ernst CSE 140 University of Washington

Program development methodology: English first, then Python Define the problem Decide upon an algorithm Translate it into code Try to do these steps in order

Program development methodology: English first, then Python Define the problem Write an English description of the input and output Do not give details about how you will compute the input and output Create test cases Input and expected output Decide upon an algorithm Translate it into code Try to do these steps in order

Program development methodology: English first, then Python Define the problem Decide upon an algorithm Implement it in English Write the recipe or step-by-step instructions Test it using paper and pencil Use small but not trivial test cases Play computer, animating the algorithm Be introspective Notice what you really do May be more or less than what you wrote down Make the algorithm more precise Translate it into code Try to do these steps in order

Program development methodology: English first, then Python Define the problem Decide upon an algorithm Translate it into code Implement it in Python Decompose it into logical units (functions) For each function: Name it (important and difficult!) Write its documentation string (its specification) Write tests Write its code Test it Run the system test Try to do these steps in order

Program development methodology: English first, then Python Define the problem Decide upon an algorithm Translate it into code Try to do these steps in order It’s OK (even common) to back up to a previous step when you notice a problem You are incrementally learning about the problem, the algorithm, and the code “Iterative development”

The Wishful Thinking approach to implementing a function If you are not sure how to implement one part of your function, define a helper function that does that task “I wish I knew how to do task X” Give it a name and assume that it works Complete the implementation of your function Later, implement the helper function The helper function should have a simpler/smaller task Can you test the original function? Yes, by using a stub for the helper function Often a lookup table: works for only 5 inputs, crashes otherwise