Program Design and Development

Slides:



Advertisements
Similar presentations
Chapter 3: Modularization
Advertisements

Repetition Control Structures
Repetition control structures
PSEUDOCODE & FLOW CHART
Understanding the Three Basic Structures
Program Design Tool. 6 Basic Computer Operations Receive information Put out information Perform arithmetic Assign a value to variable (memory location)
ITEC113 Algorithms and Programming Techniques
Steps in Program Development
Chapter 2: Algorithm Discovery and Design
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
16/27/ :53 PM6/27/ :53 PM6/27/ :53 PMLogic Control Structures Arithmetic Expressions Used to do arithmetic. Operations consist of +,
Pseudocode.
Chapter 1 Program Design
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
Problem Solving Chapter 2. What is an algorithm? n A solution to a problem that is: –Precise –Effective –Terminating.
Chapter 2: Algorithm Discovery and Design
Chapter 2: Algorithm Discovery and Design
Pseudocode.
Chapter 3 Planning Your Solution
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
DCT 1123 Problem Solving & Algorithms
Sw development1 Software Development 1.Define the problem (Analysis) 2.Plan the solution 3.Code 4.Test and debug 5.Maintain and Document.
The University of Texas – Pan American
Simple Program Design Third Edition A Step-by-Step Approach
CIS Computer Programming Logic
Chapter 2: Algorithm Discovery and Design Invitation to Computer Science, C++ Version, Third Edition.
Invitation to Computer Science, Java Version, Second Edition.
Selection Control Structures Simple Program Design Third Edition A Step-by-Step Approach 4.
S2008Final_part1.ppt CS11 Introduction to Programming Final Exam Part 1 S A computer is a mechanical or electrical device which stores, retrieves,
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Flowcharts.
Selection Control Structures. Simple Program Design, Fourth Edition Chapter 4 2 Objectives In this chapter you will be able to: Elaborate on the uses.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
Developing an Algorithm
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
CPS120: Introduction to Computer Science Decision Making in Programs.
Chapter 1 Program design Objectives To describe the steps in the program development process To introduce the current program design methodology To introduce.
Chapter 2 Pseudocode. Objectives To introduce common words, keywords and meaningful names when writing pseudocode To define the three basic control structures.
Pseudocode. Simple Program Design, Fourth Edition Chapter 2 2 Objectives In this chapter you will be able to: Introduce common words, keywords, and meaningful.
Pseudocode Simple Program Design Third Edition A Step-by-Step Approach 2.
Visual Basic Programming
ITEC113 Algorithms and Programming Techniques
Cs413_design04.ppt Design and Software Development Design : to create a functional interface that has high usability Development : an organized approach.
Control Structures CPS120: Introduction to Computer Science Lecture 5.
Repetition Control Structures Simple Program Design Third Edition A Step-by-Step Approach 5.
Cosc175 - Define Problem/Design Solution/Pseudocode/Trace 1 DEFINE THE PROBLEM.
Program Development C# Programming January 30, 2007 Professor J. Sciame.
Programming Logic and Design, Introductory, Fourth Edition1 Understanding the Three Basic Structures Structure: a basic unit of programming logic Any program.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
STEP 3- DEVELOP AN ALGORITHM At this stage we break down the problem into simple manageable steps so that they can be handled easily.
Lecture Notes 1/20/05 Pseudocode.  Pseudocode standard which we will follow in this class: - Statements are written in simple English; - Each instruction.
Chapter 2: Algorithm Discovery and Design Invitation to Computer Science.
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.
Chapter 7 JavaScript: Control Statements, Part 1
Engineering Problem Solving with C++, Etter/Ingber
Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.
Chapter 4 – Control Structures Part 1
Computer Science Faculty
CHAPTER 2 & 3: Pseudocode and Developing and Algorithm
Program Design Introduction to Computer Programming By:
Pseudocode.
MSIS 655 Advanced Business Applications Programming
Understanding the Three Basic Structures
Lecture Notes 8/24/04 (part 2)
Introduction to Algorithms and Programming
` Structured Programming & Flowchart
Computer Science Core Concepts
Click to add Text Computers & Instructions. Computers are given instructions in the form of computer programs that are created through the development.
Boolean Expressions to Make Comparisons
Introduction to Pseudocode
Presentation transcript:

Program Design and Development Facilitation skills offer immediate, practical benefits to any group process. As facilitator, your role is to set the agenda, encourage participation, and guide the pace of the meeting. Use these Dale Carnegie Training® strategies to help make your meeting a success. You can provide handouts to focus the discussion and give attendees a place to record their ideas. If you print handouts with three slides per page, PowerPoint will automatically include blank lines for your meeting participants to take notes.

Steps In Program Development Define the Problem Inputs, outputs, processes Outline the solution Major steps Major subtasks Major control structures (repetition loops) Major variables Mainline Logic

Steps in PD Continued Develop Algorithm Test Algorithm Using pseudocode and flowcharts Test Algorithm Code into programming language Run complier Document and maintain the program

Types of Programming Structured/Top Down Programming Modular Design Starting with solution and working into more complex details Modular Design Grouping tasks together by function Structure Theorem Elimination of GOTO, replacement with IF-THEN-ELSE

Algorithm Definition Lists the steps involved in accomplishing a task Written in simple english and not a formal document An algorithm must be Lucid, precise, and unambiguous Give the correct solution in all cases Eventually end

Pseudocode Essentially it is structured english and formalized to look like high-level computer languages Statements are written in simple english Each instruction is written on a single line Keywords and indentations are used to signify control structures Each set of instructions is written from top to bottom with only one entry and one exit Groups of statements may be formed into modules and that group given a name

Program Data Variables, constants, and literals Integer - 16 Real Byte length - 8 Short integer - 32 Long integer - 64 Real Float – single precision Double – double precision Character Boolean

Data Structures Record File Array String

Basic Computer Operations A computer can receive information “READ” and “GET” A computer can put out information “PRINT”, “WRITE”, “PUT”, “OUTPUT”, and “DISPLAY” A computer can perform arithmetic actions + for ADD - for SUBTRACT * for MULTIPLY / for DIVIDE () for PARENTHESES

Basic Computer Options Cont. A computer can assign a value to a variable or memory To give an initial value use “INITALISE” or “SET” To assign a value use ‘=‘ To keep a piece of information for later use ‘SAVE’ or ‘STORE’ A computer can compare variables and select one of two alternative actions Use of IT THEN and ELSE Actually it can select multiple actions A computer can repeat a group of actions DOWHILE

The Structure Theorem Sequence Selection Repetition The straightforward listing of each step Selection The presentation of a condition and the choice between two actions Repetition The presentation of a set of instructions to be performed repeatedly as long as a condition is true

Developing An Algorithm Defining the Problem Input Output Processing Use Meaningful Name

Designing an Algorithm Begin with a rough sketch of steps required to solve the problem Use these requirements and structure theorem to establish how the processing will take place It is important to not start coding until the necessary steps of defining the problem and designing the solution algorithm have been solved.

Checking an Algorithm Choose simple input test case Establish what the expected result should be Make a table of relevant variable names Walk through the test case Continue the process until the algorithm is correct

Selection Control Structures Used to illustrate a choice between two or more actions Simple IF statement Simple selection with null false branch (null ELSE statement) Combined selection (IF/AND) Nested IF Statement Linear nested IF statement

The CASE Structure Another way of expressing a linear nested IF statement Can often appear cumbersome

Repetition Control Structures Developed because many programs require the same logic to be repeated for several sets of data. Example DOWHILE condition p is true Statement block ENDO

DOWHILE Loop Processing The logical condition p is tested If condition p is found to be true, the statements listed in the statement block will be executed once. Control is returned to the retesting of condition p. If condition p is found to be false, control passes to the next statement after ENDDO and no further processing takes place within the loop.

Two important DOWHILE considerations Testing of the condition is done at the beginning of the loop. The only way to terminate the loop is to render the DOWHILE consideration false.

REPEAT_UNTIL Structure Is the exact opposite of the DOWHILE Condition is checked at the end as opposed to the beginning Counted repetition Question—is any method better than another?

Time for Practice