CIS 2110 - Structured Problem Solving (SPS) - Chapter 3 Process Modeling PDF
Document Details
null
Joseph S. Morrell, Charles H. Mawhinney, Annette M. Lege
Tags
Summary
This document provides an overview of process modeling in the context of structured problem solving (SPS). It details the key components of process modeling such as hierarchy and modularity, and explores concepts such as the essential model and implementation model. The document also touches on basic programming constructs like sequence, selection, and iteration.
Full Transcript
CIS 2110 - Structured Problem Solving (SPS) Chapter 3 – Process Modeling Overview Most figures used from our text “Introductory Problem Solving for Information Systems”, J...
CIS 2110 - Structured Problem Solving (SPS) Chapter 3 – Process Modeling Overview Most figures used from our text “Introductory Problem Solving for Information Systems”, Joseph S. Morrell, Charles H. Mawhinney, Annette M. Lege Copyright © CIS 2110 Joseph S. Morrell, Charles H. Mawhinney, Annette M. Lege 1-1 Topic Overview for CIS-2110 Problem Description X Python Code Morrell Chapter 5 Python For Everyone Chapters 1-6 Problem Statement How to do it (computer): Input / Output Implementation Model Design Pseudocode What to do (Structure): How to do it (logic): Human Level Program Level Essential Model Implementation Model Walkthrough Walkthrough Hierarchy Chart Flow Chart Morrell Chapter 2 Structured Problem Morrell Chapter 3 Solving Process Modeling Structured Problem Solving Methodology (p. 2-14) 1. Write a well-formed problem statement 2. I/O design Identify and describe the inputs and outputs 3. Process design: design the processing Separation of concerns - what & how The essential model (what needs to be done?) Hierarchy Chart The implementation model (how will it be done?) Flowchart / Pseudocode 4. Implementation Develop programmatic solution 1-3 Process Modeling Overview What is Process Modeling? Hierarchy and Modularity Constructs Essential Model Implementation Model 1-4 Process Modeling in Structured Problem Solving What is process modeling? Structured Problem Solving (SPS) strategy: Implements decomposition via hierarchy and modularity There will be a process used to solve the problem Just like we decompose the problem, the process of solving the problem is itself decomposed via “separation of concerns” The “what” and the “how” Similar to the “events” and “instructions” in the program level walk throughs Check for sentinel if(studentID = Quit, stop and report, continue) We will have process models for the “what” and the “how” 1-5 Structure of Models Used in Problem Solving Hierarchy and modularity (p. 2-4) Hierarchical structures decompose tasks or processes to model “belonging to” relationships A “child” activity “belongs” to only one “parent” activity This readily enables the decomposition of tasks into modules These can represent “chunks” of work which are done together Calculate Global Profits Collect Data Calculate Profit Report Profit From Regions per Region for all Regions Calculate Calculate Calculate Region Costs Region Revenues Region Profit 1-6 Process Modeling in Structured Problem Solving What are the “constructs” of programming? A program is a sequence of instructions A programming language supports structured programming if it supports sequence, selection, and iteration. Sequence: Ability to execute modules in the sequence necessary to solve a problem. Selection: Ability to select between executing one module or another depending on a circumstance or condition. Iteration: The ability to repeat the execution of a module if necessary. 1-7 The Use of Models in Problem Solving How – the Implementation Model for logic (p. 2-6 to 7) Flow charts model the logic for Start actions or steps in solving a Input data for problem next Region Regional Profit = Regional revenues – Regional Costs Flow of procedures is dependent on inputs, decisions, and results of prior procedures No All regions Yes completed? Output Global Profit Report Sequence, selection, and iteration are all displayed in a flow chart. Stop 1-8