Download presentation
Presentation is loading. Please wait.
1
J. Michael Moore Software Design CSCE 110 Influenced by material developed by James Tam & Jennifer Welch
2
J. Michael Moore Activities in the lifetime of a piece of software _____________________________________ The phases are _____________________________________. There __________________________ between the different activities. Often you have ___________________________ of a previous phase. Different models and approaches ____________________ Software Development
3
J. Michael Moore _______________________________________ Identify the _____________________ and what the system _________ (and ________________) do. ___________ and ___________ requirements The resulting set of _________ describe the ___________ (e.g., data must not be available to unauthorized people). Convert into ____________________________________ (e.g., 10 character passwords).
4
J. Michael Moore Software _________________ Break system into ___________ ________, or _________. ______________________________ is key to the ability to create large systems.
5
J. Michael Moore _______________________ Write the __________. (most of what we do in this course)
6
J. Michael Moore ____________________ Test each _________________. Test the _______________________ (_______________ testing). Make sure _______________________________ is tested.
7
J. Michael Moore ___________________________________ ________________ the software _______________ ________ bugs Modify ____________________________________ requirements
8
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 _____________________________________
9
J. Michael Moore Why Use Modular Decomposition Benefits of __________________________ (i.e. breaking things into modules): _________________________ - concentrate on one task at a time Saves ________________ if the same (or similar) code needs to be _________________. Helps programmer see ____________________ aspects of the code so the solution is easier to __________________. Easier to ________ the program Easier to ________ (if modules are _____________, then ________ in one module should not _______________ other modules) Drawback _______________ – understanding and setting up inter-module communication may appear daunting at first __________________ the program may appear harder as execution appears to “__________” around between modules.
10
J. Michael Moore _______________ design Start by identifying _________ _________ at the __________ level and then _____________ them to solve the main problem. Disadvantages: —how do you know the required __________________ initially? —Trying to address ______________ of a large problem all at once may prove to be _______________. Advantage: —favors ______________ existing _________.
11
J. Michael Moore _____________ design Start with _______ level idea of solution, and ______________ ____________ it. Favors ________________________ organization, with __________ inside _____________. Advantage: —__________ and ____________ the problem Disadvantage: —design ____________ made at ________ levels are ______________ for __________ levels
12
J. Michael Moore Top Down Design 1.Outline the _________ parts (_____________) 2._____________ 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…
13
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
14
J. Michael Moore Modules Information that is _______ between _______ module A and _____ module B with ___________________ and ___________________. Some modules we have already seen writeln readln trunc sqrt Types of modules that can be implemented in Pascal _______________ Places you’ll see _______________ and _______________ referenced _____________: This is where the ________ for the _____________ are _________ ________: This is where the __________ is _________________ to run, i.e. where _____________ of the module ______________
15
J. Michael Moore Modules Modules can ___________ other modules: Modules A includes a __________ to _________ module B When ____________ of A reaches the __________, __________ is _____________ to the ________________ of B The _______________ of B are _____________ until the __________ of B __________________ is _______________________ back to A, just ___________________ the _____________ to B
16
J. Michael Moore Modules What should be made into a module? A relatively _________________ piece of code that accomplishes a ______________________ task.
17
J. Michael Moore Design: Finding _______________ Modules The process of going from a __________ ______________ (________ that ____________ what a program is ___________ to do) to writing a program that ___________ those requirements cannot be _________________ in just a series of steps that fit ______ __________________. The first step is to look at _________ either directly in the __________ ______________ (indicates what __________ the program should entail) or those which can be ________ from the __________ ______________. Each ________ may be _______________ as a module but ________ ________ may have to be ____________ further into several additional modules (i.e. sub-modules).
18
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.
19
J. Michael Moore Top Down Approach: Breaking A Programming Problem Down Into Parts (Modules) ___________________ _______________________________________________
20
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
21
J. Michael Moore Structure Diagram Of The Modules ___________ Change program (main) ______________ ______ ________ _____ _______ ________ _____ _______ ______
22
J. Michael Moore Structure Diagram Of The Modules __________ Change program (main) _____________ ______ ________ _____ _______ ________ _____ _______ ______________ __________ _____ ______ __________ ________ __________ _______ ______
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.