Structured Programming (4 Credits)

Slides:



Advertisements
Similar presentations
CS 240 Computer Programming 1
Advertisements

How Are Algorithms Developed?
COMPUTER PROGRAMMING I Understand Problem Solving Tools to Design Programming Solutions.
Chapter 2: Problem Solving
Chapter 1 - An Introduction to Computers and Problem Solving
Chapter 2 - Problem Solving
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Chapter 2 - Problem Solving
Algorithms and flow charts
ITEC113 Algorithms and Programming Techniques
Chapter 2- Visual Basic Schneider
McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 14 Programming and Languages.
Program Flow Charting How to tackle the beginning stage a program design.
Program Flow Charting How to tackle the beginning stage a 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.
Programming and Languages Chapter Competencies (Page 1 of 2) Describe the six steps of programming Discuss design tools including top-down design,
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
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
The Program Design Phases
PRE-PROGRAMMING PHASE
ALGORITHMS AND FLOW CHARTS 1 Adapted from the slides Prepared by Department of Preparatory year Prepared by: lec. Ghader Kurdi.
Fundamentals of C programming
Introduction to Programming End Show. Resource Team R.P Ranjan-Lecturer, SPICTEC, Galle. W.M.A.S. Wijesekara-Centre manager,CRC Hali-Ela H.P.U.S Indra.
CSC141 Introduction to Computer Programming
Technology in Action Alan Evans Kendall Martin Mary Anne Poatsy Twelfth Edition.
Introduction to Programming Lecture 1 – Overview
Design the program Create a detailed description of program –Use charts or ordinary language (pseudocode) Identify algorithms needed –Algorithm: a step-by-step.
PROGRAMMING LANGUAGES Prof. Lani Cantonjos. PROGRAM - set of step-by-step instructions that tells or directs the computer what to do. PROGRAMMING LANGUAGE.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
Programming Concepts Chapter 3.
End Show Writing a computer program involves performing the following tasks. 1. Understanding the problem 2. Developing an Algorithm for the problem 3.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Flowcharts.
© 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.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
Chapter 2: General Problem Solving Concepts
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
1 Program Planning and Design Important stages before actual program is written.
Chapter 14 Programming and Languages McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
Chapter 2 - VB 2005 by Schneider- modified by S. Jane '081 Chapter 2 - Problem Solving 2.1 Program Development Cycle 2.2 Programming Tools.
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
Algorithms and Pseudocode
ALGORITHMS AND FLOWCHARTS. Why Algorithm is needed? 2 Computer Program ? Set of instructions to perform some specific task Is Program itself a Software.
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.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
Progression in KS3/4 Algorithms MONDAY 30 TH NOVEMBER SUE SENTANCE.
Lecture 3 Computer Programming -1-. The main steps of program development to solve the problem: 1- problem definition : The problem must be defined into.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
 Problem Analysis  Coding  Debugging  Testing.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Algorithms and Flowcharts
Program design Program Design Process has 2 phases:
Learning outcomes 5 Developing Code – Using Flowcharts
Computer Programming.
Lecture 2 Introduction to Programming
Introduction to Algorithm – part 1
Programming Logic n Techniques
Unit# 9: Computer Program Development
VISUAL BASIC – CHAPTER ONE NOTES An Introduction to Visual Basic
Chapter 2- Visual Basic Schneider
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Chapter 2- Visual Basic Schneider
ME 142 Engineering Computation I
ICT Gaming Lesson 2.
Basic Concepts of Algorithm
Hour of Code Code.org/lightbot
WJEC GCSE Computer Science
Programming Logic and Design Eighth Edition
Presentation transcript:

Structured Programming (4 Credits) HNDIT11034 Structured Programming (4 Credits)

Module Aims & objectives Enhance skills for the development of application programmes through systematic problem solving skills

Learning Outcomes Apply systematic approach to problem solving Use appropriate data types for representation of data within a programme Use appropriate control structures for defining logical instruction flow Demonstrate basic programme testing skills inclusive of debugging and tracing.

Assessment and Weighting Continuous Assessment Tutorials and lab assignments related to classroom teaching - 25% Mini programming project 25% End of semester examination Structured written paper 50%

Week 1 – Learning Outcomes Define a computer program Explain what is programming Describe the importance of programs and programming Describe the evolution of programming Design an algorithmic solution for simple problem such as computation of a factorial, total of a series etc. using flow charts

Introduction A computer program is a set of instructions or commands, which tell the computer what to do. A computer language is a set of symbols and rules used in constructing programs. Computer languages are used to develop application programs

Program Development Life Cycle Six main phases Define the problem Design the solution Code the program Test the program Document the program Implement the program 7

Translator Source Code Object Code

1st Generation 2nd Generation Computer Language 3rd Generation Low Level Language High Level Language 1st Generation 2nd Generation 3rd Generation 4th Generation 5th Generation Computer Language

They are machine dependant languages Low Level Languages First and second generation languages are considered low level languages. They are machine dependant languages These languages are close to the hardware The programmer should have hardware knowledge to write a program Productivity is low

3GL,4GL and 5GL are considered high level languages They are machine independent languages It is easy to write and modify The programmer does not need knowledge of hardware to write programs Productivity is high Consume less time to write programs Translators need to be used to convert to machine language

Design the Solution Design an algorithm. An algorithm is a finite series of logical steps required to solve a particular problem. Finite means that the beginning and end are clearly defined. 12 12

Flowcharting A flowchart is a pictorial representation of an algorithm or logical steps. Each step is represented by a symbol and the arrows indicate the flow and order of the steps. The shape of the symbol indicates the type of operation that is to occur. 13

Basic Flowchart Symbols Begin or End Input or Output Processing Decision Branch or Direction of Flow 14

Flow Control Structures Flow control is the order in which statements are executed. There are four control structures. Sequence Control Selection Control Also referred to as branching (if and if-else) Repetition Control (loops) 15

Sequence Control 16

Selection Control (branching) 17

Repetition Control (loops) 18 18

Flowchart for Processing Credit Orders Enter sales order Approved for credit? Reject Inventory available? Back- Fill order Stop Start No Yes

Draw a flow chart to cross the road. Start Go to pavement Look at left & right Yes No Are clear both ways? Cross the road Wait Stop

Draw a flow chart to find the correct key from a bunch keys to open the door. Start Tryout a key Can the door be opened Yes No Try the next key Stop

Discussion How to apply flowchart to design solution for a computational problems. (Discuss few from the lab sheet)

Q & A