440 likes | 1.97k Views
Software Design Notations. “ Documenting the software blueprint”. Lecture Objectives. To describe the tasks in producing and document the software design To understand the systematic approach in producing the different levels of the software design
E N D
Software Design Notations “Documenting the software blueprint” TCS2411 Software Engineering
Lecture Objectives • To describe the tasks in producing and document the software design • To understand the systematic approach in producing the different levels of the software design • To illustrate the different notations that can be used to draw the design TCS2411 Software Engineering
Software Design • Next milestone, due on Week 9 • Data design • Database/File design • Data structure design • Architecture design • Interface design • Screen design • Report design • Procedural design TCS2411 Software Engineering
Design Model Procedural design Interface design Architectural design Data design TCS2411 Software Engineering
Data Design • Select logical representations of data objects (data structures) identified during requirements definition and specification • Well-designed data can lead to better program structure and modularity, and reduced procedural complexity TCS2411 Software Engineering
Data Design Tasks • Database/File design • Extension of Entity-Relationship Diagram • Entities Tables • Attributes Columns • Relationships Columns, Tables • Describe database tables / files as follows: TCS2411 Software Engineering
Data Design Tasks TCS2411 Software Engineering
Data Design Tasks TCS2411 Software Engineering
Data Design Tasks (Continued) • Data structure design • Arrays, structures/records, stacks, etc. • Describe structure and its use • Describe contents in similar way to database tables/files TCS2411 Software Engineering
Architecture design • Develop a modular program structure and represent the control relationship between modules • Can be represented by • Hierarchy of modules • Structure chart • Structure diagram TCS2411 Software Engineering
Hierarchy of Modules Process File Program Read File Process Record Generate Report Print Record Print Error TCS2411 Software Engineering
Structure Chart Process File Program no. of records record record no. of errors eof Read File Process Record Generate Report error record Print Record Print Error TCS2411 Software Engineering
Structure Diagram Process File Program while c1 Read File Process Record * Generate Report Check Record Read File c2 c3 c1: not eof c2: record ok c3: error o o Print Record Print Error TCS2411 Software Engineering
Interface design • Screen design • For text-based screens, can use design forms • Format: 25 rows x 80 characters • For GUI, can use ‘Print Screen’ • Report design • For text-based reports, e.g. dot-matrix printers, use design forms (80 or 132 columns) • For graphical reports, use ‘Print Screen’ TCS2411 Software Engineering
Procedural design • Details of how modules work • Define algorithmic details • Possible to use natural language • Structured form: pseudocode, or PDL (Program Design Language), also called structured English • Clearer with graphical methods such as • Flowchart • Nassi-Schneiderman chart (N-S chart), box diagram TCS2411 Software Engineering
Structured Programming • Set of logical constructs from which any program can be formed: Sequence, Condition, Repetition • Limit procedural design to small number of predictable operations • Enter at top, exit at bottom • Reduce complexity, easier to understand and maintain • Program separated into logical ‘chunks’ TCS2411 Software Engineering
Flowchart Constructs TCS2411 Software Engineering
Program Design Language(PDL) TCS2411 Software Engineering
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 Engineering
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 Why Program Design Language? TCS2411 Software Engineering
First task Loop condition Loop condition Repeat- until- part Do-while- part Next task Next + 1 task Sequence Repetition Condition Case Condition F T Else- part Then- part Value Value ….. Case- part ….. Case- part Example of N-S Chart/ Box Diagram Constructs If-then-else Selection TCS2411 Software Engineering
Nassi-Shneiderman (N-S) charts/ Box Diagram Characteristics • Functional domain (i.e. the scope of repetition or if-then-else) is well defined and clearly visible as a pictorial representation • Arbitrary transfer of control is impossible • The scope of local and/or global data can be easily determined • Recursion 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 Engineering
References • “Software Engineering: A Practitioner’s Approach” 5th Ed. by Roger S. Pressman, Mc-Graw-Hill, 2001 • “Software Engineering” by Ian Sommerville, Addison-Wesley, 2001 TCS2411 Software Engineering