Chapter 9 - Multimedia IDCS - Computer Technology.

Slides:



Advertisements
Similar presentations
1 ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
Advertisements

1 Software Design Introduction  The chapter will address the following questions:  How do you factor a program into manageable program modules that can.
Programming Logic and Design Fourth Edition, Introductory
1 Chapter 6 Object-Oriented Software Design and Implementation.
January Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Elaboration Iteration 1: a simple cash-only success scenario of.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Slide 1 Chapter 7 Structural Modeling. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Jump to first page 1 System Design (Finalizing Design Specifications) Chapter 3d.
Chapter 9 Using Data Flow Diagrams
Chapter 1 Program Design
BPC.1 Basic Programming Concepts
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
COMP An Introduction to Computer Programming : University of the West Indies COMP6015 An Introduction to Computer Programming Lecture 02.
Simple Program Design Third Edition A Step-by-Step Approach
1 Ref: Prof Sarda Process Modeling…… Lecture Outline Data flow diagram (DFD)
Slide 1 Structural Modeling Chapter 7. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Developing an Algorithm
Chapter 12: Design Phase n 12.1 Design and Abstraction n 12.2 Action-Oriented Design n 12.3 Data Flow Analysis n Data Flow Analysis Example n
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Chapter 1 Program design Objectives To describe the steps in the program development process To introduce the current program design methodology To introduce.
UHD::3320::CH121 DESIGN PHASE Chapter 12. UHD::3320::CH122 Design Phase Two Aspects –Actions which operate on data –Data on which actions operate Two.
Design Concepts By Deepika Chaudhary.
1 DATA FLOW DIAGRAM. 2 Outline Process decomposition diagrams Data flow diagram (DFD)
First Steps in Modularization. Simple Program Design, Fourth Edition Chapter 8 2 Objectives In this chapter you will be able to: Introduce modularization.
Developing an Algorithm. Simple Program Design, Fourth Edition Chapter 3 2 Objectives In this chapter you will be able to: Introduce methods of analyzing.
First Steps in Modularization. Simple Program Design, Fourth Edition Chapter 8 2 Objectives In this chapter you will be able to: Introduce modularization.
1 International Diploma In Computer Studies (IDCS) 11th August 30th November 2008 P rogramming M ethods (PM)
Introduction to C Programming CE Lecture 5 Program Design in C.
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.
Engineering Quality Software Week02 J.N.Kotuba1 SYST Engineering Quality Software.
Document that explains the chosen concept to the animator
Introduction to Algorithms
ALGORITHMS AND FLOWCHARTS
Algorithms and Problem Solving
3.1 Fundamentals of algorithms
Business System Development
Chapter 5: Structural Modeling
Software Design Mr. Manoj Kumar Kar.
Systems Analysis and Design
Lecture 2 Introduction to Programming
FORMAL SYSTEM DEVELOPMENT METHODOLOGIES
ALGORITHMS AND FLOWCHARTS
Object-Oriented Design
Designing and Debugging Batch and Interactive COBOL Programs
VISUAL BASIC.
Unit# 9: Computer Program Development
Problem Solving Techniques
Introduction to Computer Programming
Program Design Introduction to Computer Programming By:
JSP (Jackson Structured Programming)
PROBLEM SOLVING SKILLS
Lecture 09:Software Testing
Algorithm An algorithm is a finite set of steps required to solve a problem. An algorithm must have following properties: Input: An algorithm must have.
University of Houston-Clear Lake
Structured COBOL Programming
ALGORITHMS AND FLOWCHARTS
Object oriented analysis and design
Requirements Management
CIS601: Object-Oriented Programming in C++
Introduction to Systems Analysis and Design Stefano Moshi Memorial University College System Analysis & Design BIT
CS 8532: Advanced Software Engineering
Algorithms and Problem Solving
Introduction to Algorithms
Chapter 11 Describing Process Specifications and Structured Decisions
Chapter 2 Control Structures.
Engineering Quality Software
Chapter 5 Architectural Design.
Presentation transcript:

Chapter 9 - Multimedia IDCS - Computer Technology

Programming Methods (CT) Chapter 9 - Multimedia Programming Methods (CT) Chapter 3 SECTION B DATA ANALYSIS AND PROBLEMS IDCS - Computer Technology 3

Chapter CONTENTS: Analyzing problems Designing a top-down modular program Determining the structure of a programm from a given specification Structured Programming diagrams CRC cards

Chapter 3 SECTION B Data Analysis and Problems Chapter 9 - Multimedia Chapter 3 SECTION B Data Analysis and Problems PART 1 Analyzing the Problem IDCS - Computer Technology 3

1.1 Analysing the Problem Insist on a proper program specification Analyse the problem Break down the problem down E.g. how to fix/change a flat tire

Example : Hospital Information System Module and Sub-modules Chapter 9 - Multimedia Example : Hospital Information System Module and Sub-modules Hospital information System Personnel DB (Nurses, Doctors, etc) Patients DB (Emergency, OPD, etc) Transaction DB (Doctors + Patient, Payments) Inventory DB (Drugs, Medical Equipments) IDCS - Computer Technology 3

1.3 Definitions of Key Terms  Top-down Development An approach to program development in which is made by: defining required elements in terms of basic elements beginning with the required program and ending when implementation language is reached At every stage during the top-down development, each of the undefined elements from the previous stage is defined. Stepwise refinement (enhancement) An approach to software development in which an initial, highly abstract representation of a required program is gradually refined through a sequence of intermediate representations.

1.3 Definitions of Key Terms (cont)  Program Decomposition The breaking down of a complete program into a set of component parts called modules. E.g. Visual Basic Procedures Modular Programming A style of programming in which complete program is decomposed into a set of components (called modules) E.g. VB Module (illustrate) manageable size has well defined purpose has a well defined interface for use by other modules

1.4 Designing a Top-down Modular Program One module contains the instructions that supply the top-down logic for the whole program This module contains the three basic functions: Initilialising Processing Closing down the program

1.5 Examples of Initialization Routines Requesting library routines E.g. include <stdio.h> (C Language) Opening file Defining headings, creating opening screen Initialising variables E.g. Dim x as Integer, name as String (VB Language)

1.6 Examples of Processing Tasks Input reading records from a file requesting data from the user Computation and logic comparing values computations assignments Output updating files writing records to a file printing a report displaying information on screen

1.7 Examples of Closing Tasks Producing printed output Writing a file Printing final totals in a report Displaying final user messages Closing all open files

1.8 Jackson Structured Programming (JSP) - Iteration Hierarchical diagrams can be used to illustrate a method of problem solving. But there must be way (for these diagram to be useful) of showing sequence, selection and iteration NOTE: JSP addresses the these different requirements: Reading records from a file Processing the element of an array Repeating procedures from a lower level in the diagram

1.9 Jackson Structured Programming - Iteration

1.10 Jackson Structured Programming (JSP)- Example 1 NOTE: Reading records until the End of File (EOF) Illustrate VB program example

1.11 Jackson Structured Programming (JSP)- Example 2 NOTE: Continue processing until user types stop.

1.12 Jackson Structured Programming (JSP) You must also make a selection of such tasks such as: Choosing an alternative procedure at a lower level Taking actions according to the results of the entries Making comparisons and acting on the result NOTE: In this technique is to write the conditions above or below each box to be chosen results of the selection and insert an ‘0’ in the top right corner of the box.

1.12 Jackson Structured Programming (JSP)- Example 3 NOTE: Jackson Structure Diagram showing convention for selection Illustrate VB program example

1.13 Determining the Structure of a Program Program is designed from the program specification SCENARIO: Assessment Results Program is to read a file of records of a students name Six examination marks (integer value) Calculate average mark Assessed grade FAIL, which is >39 and <=39 PASS, which is >39 and <=59 MERIT, which is >59 and ,<79 DISTINCTION, which is >79 Result to be written on new file Each record should contain name, average, percentage mark and grade On termination print students whom examination marks have been processed

1.13 Determining the Structure of a Program (cont.) The program can be separated into components initialization tasks, processing tasks and closing tasks.

1.14 Stepwise Refinement – Step 1 Outline requirements for each component STEP 1: Initialising : Open files Processing : Process each record to find grades Closing : Close files

1.15 Stepwise Refinement – Step 2 They can be further divided to give each of the following refinements STEP 2: Initialising refinement : open file for reading and writing Processing refinement : set up lop to read in and process each record Closing refinement: close files, output closing message

1.16 Stepwise Refinement – Step 3 No further refinement needed for initialisation or termination Further analysis of the processing tasks is needed STEP 3: Processing of the records calculate the mean establish the grade write the results to a file count the number of records

1.16 Stepwise Refinement – Step 3 (cont.)

1.16 Stepwise Refinement – Step 4 Actions required to complete the diagram are easily determined Calculate average Accumulate marks Divide the total number of marks (6) Assign result average variable Assess grade Compare average with grade boundaries Write result to grade variable Write to file Write name variable + average mark + grade variable record Accumulate number of records Make sure this running total is at zero ate the beginning of the program

1.17 Jackson Structured Programming This technique Uses a top-down stepwise refinement Uses only three control structures Bases the program design on the structure of the data to be processed The steps are: From the program specification, produce data structure diagrams of the data to be input for the processing and output Produce a program structure which reflects the requirements of the data structures Analyse this in a top-down manner to produce a more increasingly more specific program structure.

1.18 JSP Example 1 – Physical Data Structure NOTE: A stock record is organized into sections by content (children's clothes, men's clothes, and women’s clothes). The data on children's clothes is to be extracted

1.19 JSP Example 1 – Logical Data Structure NOTE: The logical data structure reflects that no processing.

1.20 JSP Example 2 – Physical Data Structure NOTE: Physical data structure diagram of transaction file A transaction file has been created by inputting the information on sales and purchases in batches. Each batch has a header record followed by records with the details of sales and purchases. The batches of records are input as they are received and therefore can occur in any order.

1.21 JSP Example 2 – Logical Data Structure NOTE: Logical data structure diagram of transaction file If sales report is required (no reference to purchases) which shows totals for both cash and credit sales as shown above. Every record will no longer be processes and the purchases will be ignored.

1.22 Establishing the Program Structure Criteria: Determine the input and output data structures The output requirements are a great help in determining the logical structure of a file. Combining them to produce the program structure The example is process is illustrated is on the next slide

Physical and Logical DSDs 1.23 Example 1 : Using One Input File to Produce One Output File or Report Physical and Logical DSDs

1.24 Example 1 : Continued.. Physical DSD - Report NOTE: The report structure is to have a heading, a on-line summary of the total order value for each garage, and a footer containing the total of all orders.

Comparison of Physical DSDs 1.25 Example 1 : Continued.. Comparison of Physical DSDs

DSDs of Input and Output 1.26 Example 1 : Continued.. Comparison of Logical DSDs of Input and Output

1.27 Comparison of Logical DSDs of Input and Output (cont.) Explanation of Previous Slide The output requirement does not need to include the area of each garage The logical DSD of the input files, do not need to include this component.

1.28 Program Structure NOTE: PSD Properties Each data component is related only to one program component. Each program component is related only to one input and/or one out component.

Chapter 3 Data Analysis and Problems Chapter 9 - Multimedia Chapter 3 Data Analysis and Problems PART 2 CRC Diagrams IDCS - Computer Technology 3

2.1 What are CRC Cards? CRC Cards stands for: Class Responsibility Collaboration Created in the late 1980s as a method to teach object oriented paradigm

2.2 What are CRC Cards? (cont..) CRC cards aimed to find a way to express a system in an abstract way that was analogous to structured programming. CRC cards are brainstorming tool used when first determining which classes are needed and how they will interact.

2.3 Advantages of CRC Based Modelling There are many advantages in using a CRC- based modelling Creates a good understanding of the domain to be modelled It identifies high level of responsibilities It ensures better system design It ensures that knowledge of the domain is shared by anyone A good working can be developed It is a good way to identify areas that maybe missed otherwise It is a fun

2.4 CRC Finding Classes and Considering Scenarios Participants need to know what the requirements of the system will be Brainstorming the major classes for the system are identified Individual classes can then be discussed and refined until a set is agreed The group then considers scenarios likely to occur, to test the classes some will be discarded, others will become subclasses A subclass is a class within a class sharing some of the attributes and behaviors of its parent, but having attributes and behaviors of its own

2.5 CRC Method A CRC card session should involve about five or six people include people who have a detailed understanding of the system to be developed Begin with a brainstorming session usually someone oversees the session, recording suggestions on a flipchart/board these suggestions form the basis of the classes for the system Next, the classes suggested are discussed in detail and some will be filtered out

2.6 CRC Method (cont.) Each class is written on a card, and assigned to a participant a short description can be added on the back of the card, which can be read out to the group for approval Next, the group considers simple scenarios which are likely to occur helps to discover any missing classes, and the relationships that objects have to each other Scenarios involve a discussion of how the classes behave and how they interact with each other

Chapter SUMMARY In this Chapter we have covered: Program development process Structure diagrams Organizing information Fixed and variable length record Analyzing the problem Structured programming diagrams CRC cards introduction including scenarios, role play and method FINAL NOTE: To facilitate better understanding of all of these methods, techniques and methodologies, you are advised to work through the Self Study Section and Exercises at the end each Chapter on your Textbook.