TCS2411 Software Engineering1 Software Design Notations “Documenting the software blueprint”
TCS2411 Software Engineering2 Lecture Objectives zTo describe the tasks in producing and document the software design zTo understand the systematic approach in producing the different levels of the software design zTo illustrate the different notations that can be used to draw the design
TCS2411 Software Engineering3 Software Design zNext milestone, due on Week 9 zData design Database/File design Data structure design zArchitecture design zInterface design Screen design Report design zProcedural design
TCS2411 Software Engineering4 Design Model Data design Architectural design Interface design Procedural design
TCS2411 Software Engineering5 Data Design zSelect logical representations of data objects (data structures) identified during requirements definition and specification zWell-designed data can lead to better program structure and modularity, and reduced procedural complexity
TCS2411 Software Engineering6 Data Design Tasks zDatabase/File design yExtension of Entity-Relationship Diagram yEntities Tables yAttributes Columns yRelationships Columns, Tables yDescribe database tables / files as follows:
TCS2411 Software Engineering7 Data Design Tasks
TCS2411 Software Engineering8 Data Design Tasks
TCS2411 Software Engineering9 Data Design Tasks (Continued) zData structure design yArrays, structures/records, stacks, etc. yDescribe structure and its use yDescribe contents in similar way to database tables/files
TCS2411 Software Engineering10 Architecture design zDevelop a modular program structure and represent the control relationship between modules zCan be represented by yHierarchy of modules yStructure chart yStructure diagram
TCS2411 Software Engineering11 Hierarchy of Modules Read File Process Record Generate Report Process File Program Print Error Print Record
TCS2411 Software Engineering12 Structure Chart Read File Process Record Generate Report Process File Program Print Error Print Record record eof error no. of records no. of errors
TCS2411 Software Engineering13 Structure Diagram Read File Process Record Generate Report Process File Program Print Error Print Record Read File Check Record * oo while c1 c2c3 c1: not eof c2: record ok c3: error
TCS2411 Software Engineering14 Interface design zScreen design yFor text-based screens, can use design forms yFormat: 25 rows x 80 characters yFor GUI, can use ‘Print Screen’ zReport design yFor text-based reports, e.g. dot-matrix printers, use design forms (80 or 132 columns) yFor graphical reports, use ‘Print Screen’
TCS2411 Software Engineering15 Procedural design zDetails of how modules work zDefine algorithmic details zPossible to use natural language zStructured form: pseudocode, or PDL (Program Design Language), also called structured English zClearer with graphical methods such as yFlowchart yNassi-Schneiderman chart (N-S chart), box diagram
TCS2411 Software Engineering16 Structured Programming zSet of logical constructs from which any program can be formed: Sequence, Condition, Repetition zLimit procedural design to small number of predictable operations zEnter at top, exit at bottom zReduce complexity, easier to understand and maintain zProgram separated into logical ‘chunks’
TCS2411 Software Engineering17 Flowchart Constructs
TCS2411 Software Engineering18
TCS2411 Software Engineering19 Program Design Language(PDL)
TCS2411 Software Engineering20 Example of Pseudocode or PDL Process File Procedure Read file While not end-of-file If record ok then Print record Else Print error End if Read file End While End
TCS2411 Software Engineering21 Why Program Design Language? can be a derivative for the HOL (High Order Logic) of choice, e.g., Ada PDL machine readable and processable can be embedded with source code, therefore easier to maintain can be represented in great detail, if designer and coder are different easy to review
TCS2411 Software Engineering22 Example of N-S Chart/ Box Diagram Constructs First task Next task Next + 1 task Sequence Loop condition Do-while- part Loop condition Repeat- until- part Repetition Condition Else- part Then- part FT Case Condition Case- part Case- part Value ….. If-then-elseSelection
TCS2411 Software Engineering23 Nassi-Shneiderman (N-S) charts/ Box Diagram Characteristics zFunctional domain (i.e. the scope of repetition or if-then-else) is well defined and clearly visible as a pictorial representation zArbitrary transfer of control is impossible zThe scope of local and/or global data can be easily determined zRecursion is easy to represent, where depicted with a bounding pattern that encloses the process (do-while part or repeat-until part) to be repeated.
TCS2411 Software Engineering24 References z“Software Engineering: A Practitioner’s Approach” 5th Ed. by Roger S. Pressman, Mc- Graw-Hill, 2001 z“Software Engineering” by Ian Sommerville, Addison-Wesley, 2001