J. Michael Moore Software Design CSCE 110 Influenced by material developed by James Tam & Jennifer Welch.

Slides:



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

The LC-3 – Chapter 6 COMP 2620 Dr. James Money COMP
COMPSCI 105 S Principles of Computer Science 12 Abstract Data Type.
10 Software Engineering Foundations of Computer Science ã Cengage Learning.
Chapter 3: Modularization
Communication between modules, cohesion and coupling
1 Software Design Introduction  The chapter will address the following questions:  How do you factor a program into manageable program modules that can.
James Tam Problem Solving How to visualize/picture/quantify non-trivial problems and derive solution.
What is Software Design?  Introduction  Software design consists of two components, modular design and packaging.  Modular design is the decomposition.
Copyright Irwin/McGraw-Hill Software Design Prepared by Kevin C. Dittman for Systems Analysis & Design Methods 4ed by J. L. Whitten & L. D. Bentley.
Software Design Deriving a solution which satisfies software requirements.
James Tam Breaking Problems Down This section of notes shows you how to break down a large problem into smaller modules that are easier to implement and.
James Tam Breaking Problems Down This section of notes shows you how to break down a large programming problem into smaller modules that are easier to.
James Tam Breaking Problems Down This section of notes shows you how to break down a large problem into smaller parts that are easier to implement and.
CSCE 121, Sec 200, 507, 508 Software Engineering Fall 2010 Prof. Jennifer L. Welch.
James Tam A High-Level Model For Software Development What is involved in the process of designing, writing and maintaining computer programs?
J. Michael Moore Scope & Testing Modules CSCE 110 Influenced by material developed by James Tam & Jennifer Welch.
James Tam Functions: Decomposition And Code Reuse (Part I) This section of notes shows you how to write functions that can be used to: decompose large.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 5 - Functions Outline 5.1Introduction 5.2Program.
James Tam Breaking Problems Down This section of notes shows you how to break down a large programming problem into smaller modules that are easier to.
James Tam Introduction To Problem Solving This section will focus on problem solving strategies.
J. Michael Moore Software Design CSCE 110 Influenced by material developed by James Tam & Jennifer Welch.
Jump to first page 1 System Design (Finalizing Design Specifications) Chapter 3d.
Introduction to Databases
James Tam Breaking Problems Down This section of notes shows you how to break down a large problem into smaller modules that are easier to implement and.
James Tam Breaking Problems Down This section of notes shows you how to break down a large programming problem into smaller modules that are easier to.
CS 201 Functions Debzani Deb.
James Tam Breaking Problems Down This section of notes shows you how to break down a large problem into smaller modules that are easier to implement and.
J. Michael Moore Scope & Testing Modules CSCE 110 Influenced by material developed by James Tam & Jennifer Welch.
James Tam Breaking Problems Down This section of notes shows you how to break down a large problem into smaller modules that are easier to implement and.
Functions: Decomposition And Code Reuse This section of notes shows you how to write functions that can be used to: decompose large problems, and to reduce.
James Tam Problem Decomposition This section of notes shows you how to break down a large problem into smaller parts that are easier to implement and manage.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
James Tam Breaking Problems Down This section of notes shows you how to break down a large programming problem into smaller modules that are easier to.
1 Shawlands Academy Higher Computing Software Development Unit.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. C How To Program - 4th edition Deitels Class 05 University.
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
First Steps in Modularization Simple Program Design Third Edition A Step-by-Step Approach 8.
Chapter 06 (Part I) Functions and an Introduction to Recursion.
CSE 219 Computer Science III Program Design Principles.
1 Systems Analysis and Design in a Changing World, Thursday, January 18, 2007.
I Power Higher Computing Software Development The Software Development Process.
Chapter 10 Software Engineering. Understand the software life cycle. Describe the development process models. Understand the concept of modularity in.
First Steps in Modularization. Simple Program Design, Fourth Edition Chapter 8 2 Objectives In this chapter you will be able to: Introduce modularization.
CCSB223/SAD/CHAPTER131 Chapter 13 Designing the System Internals.
The Software Development Process
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
First Steps in Modularization. Simple Program Design, Fourth Edition Chapter 8 2 Objectives In this chapter you will be able to: Introduce modularization.
KIC/Computer Programming & Problem Solving 1.  Introduction  Program Modules in C  Math Library Functions  Functions  Function Definitions  Function.
Chapter 3 Top-Down Design with Functions Part II J. H. Wang ( 王正豪 ), Ph. D. Assistant Professor Dept. Computer Science and Information Engineering National.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
SEM510 Autumn 1996 Software Engineering u What is “Software Engineering” ? u It involves: Software, People, Applications, Methods, Tools and Practices.
1 09/27/04CS150 Introduction to Computer Science 1 Let ’ s all Repeat Together.
Systems Design.  Application Design  User Interface Design  Database Design.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To design and implement programs with more than one function ❏ To be able to.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
Functions: Decomposition And Code Reuse This section of notes shows you how to write functions that can be used to: decompose large problems, and to reduce.
Software Design and Development Development Methodoligies Computing Science.
ICS 3UI - Introduction to Computer Science
Algorithms and Problem Solving
Starting Out with Programming Logic & Design
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.
Algorithms and Problem Solving
Starting Out with Programming Logic & Design
Basic Concepts of Algorithm
Presentation transcript:

J. Michael Moore Software Design CSCE 110 Influenced by material developed by James Tam & Jennifer Welch

J. Michael Moore Activities in the lifetime of a piece of software Requirements Gathering/Analysis Design Implementation (Coding) Testing Deployment / Maintenance The phases are not sequential. There is not a clear demarcation between the different activities. Often you have to go back and modify the results of a previous phase Different models and approaches Waterfall Iterative Agile Extreme programming Software Development

J. Michael Moore Requirements Gathering/Analysis Identify the needs of the user and what the system should (and should not) do. Explicit and Implicit requirements The resulting set of requirements describe the application (e.g., data must not be available to unauthorized people). Convert into more detailed descriptions (e.g., 10 character passwords).

J. Michael Moore Software Design Break system into manageable units, or modules. Modular design is key to the ability to create large systems.

J. Michael Moore Implementation Write the code. (most of what we do in this course)

J. Michael Moore Testing Test each module in isolation. Test the modules all together (integration testing). Make sure every line of code is tested.

J. Michael Moore Deployment / Maintenance Deploy the software Maintain Fix bugs Modify to satisfy changing requirements

J. Michael Moore Software Development What you should do in this class. What many of you will probably end up doing that will be reflected in your grades. Activities in the lifetime of a piece of software Requirements Gathering/Analysis Design Implementation (Coding) Testing Deployment / Maintenance

J. Michael Moore Why Use Modular Decomposition Benefits of procedural abstraction (i.e. breaking things into modules): Separation of concerns - concentrate on one task at a time Saves effort and space if the same (or similar) code needs to be repeated. Helps programmer see common / similar aspects of the code so the solution is easier to visualize Easier to test the program Easier to maintain (if modules are independent, then changes in one module should not impact other modules) Drawback Complexity – understanding and setting up inter-module communication may appear daunting at first Tracing the program may appear harder as execution appears to “jump” around between modules.

J. Michael Moore Bottom-up design Start by identifying individual tasks at the bottom level and then combine them to solve the main problem. Disadvantages: —how do you know the required individual tasks initially? —Trying to address all the details of a large problem all at once may prove to be overwhelming. Advantage: —favors reusing existing code.

J. Michael Moore Top-down design Start with high level idea of solution, and successively refine it. Favors hierarchical organization, with modules inside modules. Advantage: —divide and conquer the problem Disadvantage: —design decisions made at high levels are set in stone for lower levels

J. Michael Moore Top Down Design 1.Outline the major parts (structure) 2.Implement the solution for each part My autobiography Chapter 1: The humble beginnings Chapter 2: My rise to greatness … Chapter 1: The humble beginnings It all started seven and one score years ago with a log-shaped work station…

J. Michael Moore Top-Down Approach: Breaking Down A Large Problem Figure extracted from Computer Science Illuminated by Dale N. and Lewis J. General approach Approach to part of problem Specific steps of the solution Abstract/ General Particular Top Bottom Approach to part of problem Specific steps of the solution

J. Michael Moore Modules Information that is passed between calling module A and called module B with parameters and return values. Some modules we have already seen writeln readln trunc sqrt Types of modules that can be implemented in Pascal Procedures Functions Places you’ll see procedures and functions referenced Definition: This is where the statements for the module are placed Call: This is where the module is instructed to run, i.e. where execution of the module begins

J. Michael Moore Modules Modules can call other modules: Modules A includes a statement to call module B When execution of A reaches the call, control is transferred to the beginning of B The statements of B are executed until the end of B Control is transferred back to A, just after the call to B

J. Michael Moore Modules What should be made into a module? A relatively small piece of code that accomplishes a well-defined task.

J. Michael Moore Design: Finding Candidate Modules The process of going from a problem description (words that describe what a program is supposed to do) to writing a program that fulfills those requirements cannot be summarized in just a series of steps that fit all scenarios. The first step is to look at verbs either directly in the problem description (indicates what actions the program should entail) or those which can be inferred from the problem description. Each action may be implemented as a module but complex actions may have to be decomposed further into several additional modules (i.e. sub-modules).

J. Michael Moore Example Problem Design a program that will perform a simple interest calculation. The program should prompt the user for the appropriate values, perform the calculation and display the values onscreen.

J. Michael Moore Top Down Approach: Breaking A Programming Problem Down Into Parts (Modules) Calculate Interest Get informationDo calculationsDisplay results

J. Michael Moore Making Change (Paraphrased from the book “Pascal: An introduction to the Art and Science of Programming” by Walter J. Savitch. Problem statement: Design a program to make change. Given an amount of money, the program will indicate how many quarters, dimes and pennies are needed. The cashier is able to determine the change needed for values of a dollar and above. Actions that may be needed: Action 1: Prompting for the amount of money Action 2: Computing the combination of coins needed to equal this amount Sub-action 2A: Compute the number of quarters to be given out. Sub-action 2B: Compute the number of dimes to be given out Sub-action 2C: Compute the number of pennies to be given out. Action 3: Output: Display the number of coins needed

J. Michael Moore Structure Diagram Of The Modules inputAmount Change program (main) computeChange outputCoins amount quarters dimes pennies quarters dimes pennies amount

J. Michael Moore Outline Of The Modules inputAmount Change program (main) computeChange outputCoins amount quarters dimes pennies quarters dimes pennies computeQuarters computeDimes computePennies amountLeft dimes amountamountLeft quarters amountLeft pennies amount