JSP (Jackson Structured Programming)

Slides:



Advertisements
Similar presentations
ALGORITHMS AND FLOWCHARTS
Advertisements

PROBLEM SOLVING TECHNIQUES
Repetition Control Structures
Fundamentals of Algorithms MCS - 2 Lecture # 4
Program Design Tool. 6 Basic Computer Operations Receive information Put out information Perform arithmetic Assign a value to variable (memory location)
Repetition Control Structure
Steps in Program Development
IMSE Lecture Week 6 - Low Level Design Summary of last week: u Transform Analysis - 4 steps: 1 annotate the DFD (without redrawing it) 2 draw the intermediate.
Algorithms. Introduction Before writing a program: –Have a thorough understanding of the problem –Carefully plan an approach for solving it While writing.
Repetition Control Structures
Pseudocode.
Pseudocode Algorithms Using Sequence, Selection, and Repetition.
Structured Program Development in C
Pseudocode.
ALGORITHMS AND FLOWCHARTS
COMP An Introduction to Computer Programming : University of the West Indies COMP6015 An Introduction to Computer Programming Lecture 02.
PROGRAMMING, ALGORITHMS AND FLOWCHARTS
Pseudocode algorithms using sequence, selection and repetition
Array Processing Simple Program Design Third Edition A Step-by-Step Approach 7.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved. 1 Understandable Statistics Seventh Edition By Brase and Brase Prepared by: Lynn Smith.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 21 Multiplier Example Example: (101 x 011) Base 2 Note that the partial product summation.
Mean and Standard Deviation of Grouped Data Make a frequency table Compute the midpoint (x) for each class. Count the number of entries in each class (f).
Structured Program Development Outline 2.1Introduction 2.2Algorithms 2.3Pseudo code 2.4Control Structures 2.5The If Selection Structure 2.6The If/Else.
Chapter 7 Array processing. Objectives To introduce arrays and the uses of arrays To develop pseudocode algorithms for common operations on arrays To.
Lesson Year 1 CS112/0401/V1 LESSON 6 DESIGN TOOL PSEUDOCODE  Program Design Language (PDL)  Represent logic in English-like manner  Easier to.
C Lecture Notes 1 Structured Program Development.
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.
Repetition Control Structures Simple Program Design Third Edition A Step-by-Step Approach 5.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved. 1 CHEBYSHEV'S THEOREM For any set of data and for any number k, greater than one, the.
First Steps in Modularization. Simple Program Design, Fourth Edition Chapter 8 2 Objectives In this chapter you will be able to: Introduce modularization.
First Steps in Modularization. Simple Program Design, Fourth Edition Chapter 8 2 Objectives In this chapter you will be able to: Introduce modularization.
`. Lecture Overview Structure Programming Basic Control of Structure Programming Selection Logical Operations Iteration Flowchart.
Lecture 5: Stopping with a Sentinel. Using a Sentinel Problem Develop a class-averaging program that will process an arbitrary number of grades each time.
First Steps in Modularization. Simple Program Design, Fourth Edition Chapter 8 2 Objectives In this chapter you will be able to: Introduce modularization.
Fundamentals of Algorithms MCS - 2 Lecture # 5. Representation of Algorithms (continued) Flowcharts.
Introduction to C Programming CE Lecture 5 Program Design in C.
Topic: Control Statements. Recap of Sequence Control Structure Write a program that accepts the basic salary and allowance amount for an employee and.
Think First, Code Second Understand the problem Work out step by step procedure for solving the problem (algorithm) top down design and stepwise refinement.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
ALGORITHMS AND FLOWCHARTS. Why Algorithm is needed? 2 Computer Program ? Set of instructions to perform some specific task Is Program itself a Software.
Java Programming: From Problem Analysis to Program Design, 4e Chapter 5 Control Structures II: Repetition.
Lecture 5: Layers of Control. Nested while Loops Problem Multiplying two numbers and outputting the result only if they are both less than 5. (i.e. Start.
CMSC 104, Section 301, Fall Lecture 18, 11/11/02 Functions, Part 1 of 3 Topics Using Predefined Functions Programmer-Defined Functions Using Input.
| MSC 8102:PROGRAMMING CONCEPTS By Vincent Omwenga, PhD. 1.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Chapter 3 - Structured Program Development Outline.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Flow Control (while) Outline 3.7The While Repetition.
 Problem Analysis  Coding  Debugging  Testing.
1 COMS 261 Computer Science I Title: C++ Fundamentals Date: September 23, 2005 Lecture Number: 11.
ALGORITHMS AND FLOWCHARTS
3.1 Fundamentals of algorithms
Algorithm: procedure in terms of
GC101 Introduction to computers and programs
ALGORITHMS AND FLOWCHARTS
Think What will be the output?
Chapter 5: Control Structures II
ALGORITHMS AND FLOWCHARTS
Print slides for students reference
Chapter 9 - Multimedia IDCS - Computer Technology.
Pseudocode algorithms using sequence, selection and repetition
MSIS 655 Advanced Business Applications Programming
Structured Program
Programming in Pseudocode
Chapter 3 - Structured Program Development
ALGORITHMS AND FLOWCHARTS
Chapter 3 - Structured Program Development
CHAPTER 4 Iterative Structure.
Introduction to Programming
EPSII 59:006 Spring 2004.
Top-Down Design & JSP Skill Area Part D
Presentation transcript:

JSP (Jackson Structured Programming) Lesson 7 – Program Concepts

JSP (Jackson Structured Programming) Methodology developed by Michael Anthony Jackson in 1970 Uses top-down methodology 3 structured constructs Sequence Selection Iteration/Repetition Professor Michael Anthony Jackson (born 1936) works as an independent computing consultant in London, England, and also as a part-time researcher at AT&T Research, Florham Park, NJ, U.S.. He is a visiting research professor at the Open University in the UK.

Sequence A sequence of operations is represented by boxes connected with lines. In the example below, operation A consists of the sequence of operations B, C and D A seq B C D A end

Selection A sequence of operations is represented by boxes connected with lines. In the example below, operation A consists of the sequence of operations B, C and D IF C1 THEN DO B ENDDO ELSE IF C2 THEN DO C IF C3 THEN DO D ENDIF

Iteration WHILE condition 1 DO B ENDDO An iteration is again represented with joined boxes. In addition the iterated operation has a star in the top right corner of its box. In the example below, operation A consists of an iteration of zero or more invocations of operation B. WHILE condition 1 DO B ENDDO

Example: Sequence

Example: Selection

Example: Iteration

JSP Function list Condition list Sequence of actions listed Condition list Associated with selections and iterations Note: function & condition lists are listed separately from the structure diagram and are cross-referenced

JSP Stepwise Refinement A process to sub-divide (refine) the main program function into subsidiary functions Increasing the details at each level until the lowest functions are represented

JSP Case Study A program is needed to help a college to grade its students. A total weighted score is determined for students from two midterm exam scores both weighted at 30%, and a final exam score at 40%. A grade is assigned on the following basis: Total weighted score Grade <60 F >=60 and <70 D >=70 and <80 C >=80 and <90 B >=90 A For each student, the program is to output the student number, the total weighted score and the grade assigned. It is also required to count the number of students receiving each of the five grades. The input will be in the form of a record, each consisting of student number, midterm test 1, midterm test 2 and final test mark. The iteration is to be terminated by a suitable dummy record. The summary will then be printed showing the distribution of the grades. Draw the JSP.

Case Study

Function List 1 : Initialise all variables, counters 2 : Get first record 3 : Input record 4 : Total Weighted score = 30% x Midterm Test 1+ 30% x Midterm Test 2 + 40% x Final Test 5 : Assign grade 6 : Increase Counter A by 1 7 : Increase Counter B by 1 8 : Increase Counter C by 1 9 : Increase Counter D by 1 10 : Increase Counter F by 1 11 : Print Student Number, Weighted Score and Grade. 12 : Get next record 13 : Print Summary Record 14 : End Program

Condition List C1 : Not EOF C2 : Total weighted score >= 90 C3 : Total weighted score >= 80 C4 : Total weighted score >= 70 C5 : Total weighted score >= 60 (Note to Lecturers: This is an easier solution as compared to the study guide, but acceptable for examination purposes.)