Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.

Slides:



Advertisements
Similar presentations
Program Design and Development
Advertisements

Algorithm Design CS105. Problem Solving Algorithm: set of unambiguous instructions to solve a problem – Breaking down a problem into a set of sub- problems.
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
Programming Fundamentals (750113) Ch1. Problem Solving
Chapter 1 Program Design
CHAPTER 4: ALGORITHM 4.1 Introduction stages identified in the program development process: 1. Problem analysis and specification 2. Data organization.
1 Chapter 2 Problem Solving Techniques INTRODUCTION 2.2 PROBLEM SOLVING 2.3 USING COMPUTERS IN PROBLEM SOLVING : THE SOFTWARE DEVELOPMENT METHOD.
Chapter 3 Planning Your Solution
BPC.1 Basic Programming Concepts
PRE-PROGRAMMING PHASE
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
COMP An Introduction to Computer Programming : University of the West Indies COMP6015 An Introduction to Computer Programming Lecture 02.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
6 Steps of the Programming Process
Chapter 2: Developing a Program Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved. 1 Chapter 2 Developing.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
1 Shawlands Academy Higher Computing Software Development Unit.
CHAPTER:14 Programming Methodology Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Developing a Program.
Simple Program Design Third Edition A Step-by-Step Approach
Planning for the Solution
INTRODUCTION TO ALGORITHMS PROGRAMMING. Objectives Give a definition of the term algorithm Describe the various parts of the pseudocode algorithm or algorithm.
Programming Lifecycle
School of Computer Science & Information Technology G6DICP - Lecture 9 Software Development Techniques.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
© 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Stewart Venit ~ Elizabeth Drake Developing a Program.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
C++ Basics C++ is a high-level, general purpose, object-oriented programming language.
Introduction to Problem Solving. Steps in Programming A Very Simplified Picture –Problem Definition & Analysis – High Level Strategy for a solution –Arriving.
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
The Software Development Process
1 Program Planning and Design Important stages before actual program is written.
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
Program Development C# Programming January 30, 2007 Professor J. Sciame.
Loops and Simple Functions CS303E: Elements of Computers and Programming.
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.
The Hashemite University Computer Engineering Department
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
Flowcharts C++ Lab. Algorithm An informal definition of an algorithm is: a step-by-step method for solving a problem or doing a task. Input data A step-by-step.
CSCI 161 Lecture 3 Martin van Bommel. Operating System Program that acts as interface to other software and the underlying hardware Operating System Utilities.
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.
Introduction to Algorithmic Processes CMPSC 201C Fall 2000.
Progression in KS3/4 Algorithms MONDAY 30 TH NOVEMBER SUE SENTANCE.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Lecture 3 Computer Programming -1-. The main steps of program development to solve the problem: 1- problem definition : The problem must be defined into.
EGR 115 Introduction to Computing for Engineers
Data Types Variables are used in programs to store items of data e.g a name, a high score, an exam mark. The data stored in a variable is entered from.
Lecture 1 Introduction Richard Gesick.
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Algorithm and Ambiguity
Understand the Programming Process
Problem Solving Techniques
PROGRAMMING METHODOLOGY
Programming Fundamentals (750113) Ch1. Problem Solving
Programming Fundamentals (750113) Ch1. Problem Solving
Documentation for Developers
Chapter 2- Visual Basic Schneider
Introduction to Algorithms and Programming
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Chapter 2- Visual Basic Schneider
Understand the Programming Process
Algorithm and Ambiguity
Programming Fundamentals (750113) Ch1. Problem Solving
Click to add Text Computers & Instructions. Computers are given instructions in the form of computer programs that are created through the development.
Programming Fundamentals (750113) Ch1. Problem Solving
Presentation transcript:

Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g. Beauty) Many similarities to solving 'word problems' Translate prob. Description into a formal solution Symbol manipulation Mix of high level creativity & low level details Modularize (for reuse) & Automate (loops)

Steps in Problem Solving (Programming) } Program Analysis & Specification Data Organization & Algorithm Design Program Coding Execution & Testing Program Maintenance Logic of Program } Coding (Typing)

Prog. Analysis & Specification Specs must include Input – specs. Of problem input Output – description of problem's output May be complex, imprecise, vague – but must be clarified at this stage

Data Org. & Algorithm Design Problem's Data – Appropriately Structure & Organize (to store data) Design Algorithm – how to process data Algorithm – Precise sequence of simple steps to arrive at solution May be written in a mix of pseudocode & flowchart Pseudocode – mixture of natural language, symbols, programming language of choice

Structured Algorithm / Programs Use 3 basic methods of control Sequential : steps done in sequential manner, each step executed once Selection : One of a number of alternatives is selected and executed (if / condition) Repetition : One or more steps are performed repeatedly (loops) For more complex problems – divide & conquer Break into smaller, manageable subprograms (modules)

Program Coding Coding – Implementing data objects & algorithms in a chosen programming language Syntax – must follow grammatical rules of that language Variables Types : real, integer, etc. Operations : +, -, x, /, ** Assignment : = Input/output : read, print, write Comments

Programming Style (Coding) Correct, Readable, Understandable. To achieve these; Programs must be well-structured Top-down approach (divide & conquer) Simplicity & clarity Each program unit must be documented (comments) Opening comments (purpose, data, author, date, ref.) Key program segments Meaningful identifier (variable names)

Programming Style (ctd.) Formatted to increase readibility Spaces Blank lines between sections of program Alignment & indentations

Execution & Testing Program must be correct (produce correct results) Validation – program meets project specs. (answering the question) Verification – results are correct & complete (answering it correctly)

Errors (Bugs) Program Testing Syntax error Compile time error (missing comma, brackets etc) Runtime error (divide by zero, infinite loop etc) Logic error From flaw in algorithm Program Testing Test with simple cases which results are known in advance (reality check)

Program Maintenance Maintain Flowchart Maintain Source Code Make code readable