Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular...

27
Software Development Designing Software

Transcript of Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular...

Page 1: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

Software Development

Designing Software

Page 2: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

Modules• Modular programming is a software

design technique that emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired functionality.

• With modular programming, concerns (functions) are separated such that modules perform logically discrete functions.

Page 3: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

• The basic idea underlying modular design is to organize a complex system (such as a large program) as a set of distinct components that can be developed independently and then plugged together.

• Although this may appear a simple idea, experience shows that the effectiveness of the technique depends critically on the manner in which systems are divided into components and the mechanisms used to plug components together.

Page 4: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

Modules in VB• There are times that Visual Basic does not

have a function you can use. So one must be coded.

• Making your own functions allows your code to be better organized and easier to read.

• Processes that must be used often, need to be coded only once and called when needed.

• In VB we use the FUNCTION object. This is a subprogram that is called within your code.

Page 5: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

Writing A Function in VB

Page 6: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

Structure chart• A Structure Chart (SC) in software

engineering and organizational theory, is a chart which shows the breakdown of a system to its lowest manageable levels.

• They are used in structured programming to arrange program modules into a tree.

• Each module is represented by a box, which contains the module's name.

• The tree structure visualizes the relationships between modules

Page 7: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

• A structure chart is a top-down modular design tool, constructed of squares representing the different modules in the system, and lines that connect them. The lines represent the connection and or ownership between activities and subactivities as they are used in organization charts.

Page 8: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality
Page 9: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

Flowchart• A flowchart is a type of diagram that

represents an algorithm or process, showing the steps as boxes of various kinds, and their order by connecting them with arrows.

• This diagrammatic representation illustrates a solution to a given problem.

• Process operations are represented in these boxes, and arrows; rather, they are implied by the sequencing of operations.

Page 10: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

• Flowcharts are used in analyzing, designing, documenting or managing a process or program in various fields.

• Symbols1. Start and end symbols

Represented as circles, ovals or rounded rectangles, usually containing the word "Start" or "End", or another phrase signalling the start or end of a process, such as "submit inquiry" or "receive product".

Page 11: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

2. ArrowsShowing "flow of control". An arrow coming from one symbol and ending at another symbol represents that control passes to the symbol the arrow points to. The line for the arrow can be solid or dashed. The meaning of the arrow with dashed line may differ from one flowchart to another and can be defined in the legend.

Page 12: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

3. Generic processing stepsRepresented as rectangles. Examples: "Add 1 to X"; "replace identified part"; "save changes" or similar.

4. SubroutinesRepresented as rectangles with double-struck vertical edges; these are used to show complex processing steps which may be detailed in a separate flowchart.

Page 13: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

5. Input/OutputRepresented as a parallelogram. Examples: Get X from the user; display X.

6. Prepare conditionalRepresented as a hexagon. Shows operations which have no effect other than preparing a value for a subsequent conditional or decision step.

Page 14: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

7. Conditional or decisionRepresented as a diamond (rhombus) showing where a decision is necessary, commonly a Yes/No question or True/False test. The conditional symbol is peculiar in that it has two arrows coming out of it, usually from the bottom point and right point, one corresponding to Yes or True, and one corresponding to No or False. (The arrows should always be labelled.)

Page 15: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

8. Junction symbolGenerally represented with a black blob, showing where multiple control flows converge in a single exit flow. A junction symbol will have more than one arrow coming into it, but only one going out. In simple cases, one may simply have an arrow point to another arrow instead.

Page 16: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

9. Labelled connectorsRepresented by an identifying label inside a circle. Labelled connectors are used in complex or multi-sheet diagrams to substitute for arrows. For each label, the "outflow" connector must always be unique, but there may be any number of "inflow" connectors. In this case, a junction in control flow is implied.

Page 17: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

10. Concurrency symbolRepresented by a double transverse line with any number of entry and exit arrows. These symbols are used whenever two or more control flows must operate simultaneously. The exit flows are activated at the same time when all of the entry flows have reached the concurrency symbol. A concurrency symbol with a single entry flow is a fork; one with a single exit flow is a join.

• All processes should flow from top to bottom and left to right.

Page 18: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality
Page 19: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

Data Flow Diagram• A data flow diagram (DFD) is a graphical

representation of the "flow" of data through an information system, modeling its process aspects.

• Often they are a preliminary step used to create an overview of the system which can later be elaborated.

• DFDs can also be used for the visualization of data processing (structured design).

Page 20: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

• A DFD shows what kinds of informationwill be input to and output from the system, where the data will come from and go to, and where the data will be stored.

• It does not show information about the timing of processes, or information about whether processes will operate in sequence or in parallel (which is shown on a flowchart).

Page 21: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality
Page 22: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

Unified Modeling Language• Unified Modeling Language (UML) is a

standardized (ISO/IEC 19501:2005), general-purpose modeling language in the field of software engineering.

• The Unified Modeling Language includes a set of graphic notation techniques to create visual models of object-oriented software-intensive systems.

Page 23: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

• UML 2.2 has 14 types of diagrams divided into two categories.

• Seven diagram types represent structural information, and the other seven represent general types of behaviour, including four that represent different aspects of interactions.

• These diagrams can be categorized hierarchically as shown in the following class diagram:

Page 24: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality
Page 25: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

Pseudocode• Pseudocode is an informal high-level

description of the operating principle of a computer program or other algorithm.

• It uses the structural conventions of a programming language, but is intended for human reading rather than machine reading.

• Pseudocode typically omits details that are not essential for human understanding of the algorithm, such as variable declarations, system-specific code and some subroutines.

Page 26: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

• The purpose of using pseudocode is that it is easier for people to understand than conventional programming language code, and that it is an efficient and environment-independent description of the key principles of an algorithm.

• It is commonly used in textbooks and scientific publications that are documenting various algorithms, and also in planning of computer program development, for sketching out the structure of the program before the actual coding takes place.

Page 27: Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/4_2_modules.pdf · Modular programming is a software design technique that emphasizes separating the functionality

• In today’s activity, you will write out the requirements for you culminating activity based on the previous lesson and also make a flowchart to help you modulizeyour program.

• Copy your document to the DropOff folder on the X:drive. This is activity 4_2_Flow.