written 7.9 years ago by | modified 2.8 years ago by |
Mumbai University > Computer Engineering > Sem 5 > Structured and Object Oriented Analysis & Design
Marks: 10M
Year: Dec 2014
written 7.9 years ago by | modified 2.8 years ago by |
Mumbai University > Computer Engineering > Sem 5 > Structured and Object Oriented Analysis & Design
Marks: 10M
Year: Dec 2014
written 7.9 years ago by |
Payroll system: A payroll system is software which organizes all the tasks of employee payment and the filing of employee taxes. These tasks can include keeping tracking of hours, calculating wages, withholding taxes and deductions, printing and delivering checks and paying employment taxes to the government.
Payroll software often requires very little input from the employer. The employer needs to input employee wage information and hours—then the software calculates the information including withholdings automatically. Most payroll software is automatically updated every time a tax law changes and will remind employers when to file various tax forms.
Map DFD to a structured chart:
Steps: - Break the system into suitably tractable units by means of transaction analysis - Convert each unit into into a good structure chart by means of transform analysis - Link back the separate units into overall system implementation.
Transaction Analysis
The transaction is identified by studying the discrete event types that drive the system. For example, with respect to railway reservation, a customer may give the following transaction stimulus:
The three transaction types here are: Check Availability (an enquiry), Reserve Ticket (booking) and Cancel Ticket (cancellation). In a typical situation, any one stimulus may be entered through a particular terminal. The human user would inform the system her preference by selecting a transaction type from a menu. The first step in our strategy is to identify such transaction types and draw the first level breakup of modules in the structure chart, by creating separate module to co-ordinate various transaction types. This is shown as follows:
The Main ( ) which is a over-all coordinating module, gets the information about what transaction the user prefers to do through TransChoice. The TransChoice is returned as a parameter to Main(). The actual details of how GetTransactionType ( ) is not relevant for Main ( ). It may for example, refresh and print a text menu and prompt the user to select a choice and return this choice to Main ( ). It will not affect any other components in our breakup, even when this module is changed later to return the same input through graphical interface instead of textual menu. The modules Transaction1 ( ), Transaction2 ( ) and Transaction3 ( ) are the coordinators of transactions one, two and three respectively. The details of these transactions are to be exploded in the next levels of abstraction.
We will continue to identify more transaction centers by drawing a navigation chart of all input screens that are needed to get various transaction stimuli from the user. These are to be factored out in the next levels of the structure chart (in exactly the same way as seen before), for all identified transaction centers.
Transform Analysis
Transform analysis is strategy of converting each piece of DFD (may be from level 2 or level 3, etc.) for all the identified transaction centers. In case, the given system has only one transaction (like a payroll system), then we can start transformation from level 1 DFD itself. Transform analysis is composed of the following five steps:
Let us understand these steps through a payroll system example:
Identifying the central transform
The central transform is the portion of DFD that contains the essential functions of the system and is independent of the particular implementation of the input and output. One way of identifying central transform is to identify the centre of the DFD by pruning off its afferent and efferent branches. Afferent stream is traced from outside of the DFD to a flow point inside, just before the input is being transformed into some form of output (For example, a format or validation process only refines the input – does not transform it). Similarly an efferent stream is a flow point from where output is formatted for better presentation. The processes between afferent and efferent stream represent the central transform (marked within dotted lines above). In the above example, P1 is an input process, and P6 & P7 are output processes. Central transform processes are P2, P3, P4 & P5 - which transform the given input into some form of output.
First-cut Structure Chart
To produce first-cut (first draft) structure chart, first we have to establish a boss module. A boss module can be one of the central transform processes. Ideally, such process has to be more of a coordinating process (encompassing the essence of transformation). In case we fail to find a boss module within, a dummy coordinating module is created
In the above illustration, we have a dummy boss module “Produce Payroll” – which is named in a way that it indicate what the program is about. Having established the boss module, the afferent stream processes are moved to left most side of the next level of structure chart; the efferent stream process on the right most side and the central transform processes in the middle. Here, we moved a module to get valid timesheet (afferent process) to the left side (indicated in yellow). The two central transform processes are move in the middle (indicated in orange). By grouping the other two central transform processes with the respective efferent processes, we have created two modules (in blue) – essentially to print results, on the right side.
The main advantage of hierarchical (functional) arrangement of module is that it leads to flexibility in the software. For instance, if “Calculate Deduction” module is to select deduction rates from multiple rates, the module can be split into two in the next level – one to get the selection and another to calculate. Even after this change, the “Calculate Deduction” module would return the same value.
Refine the Structure Chart
Expand the structure chart further by using the different levels of DFD. Factor down till you reach to modules that correspond to processes that access source / sink or data stores. Once this is ready, other features of the software like error handling, security, etc. has to be added. A module name should not be used for two different modules. If the same module is to be used in more than one place, it will be demoted down such that “fan in” can be done from the higher levels. Ideally, the name should sum up the activities done by the module and its sub-ordinates.
Verify Structure Chart vis-à-vis with DFD
Because of the orientation towards the end-product, the software, the finer details of how data gets originated and stored (as appeared in DFD) is not explicit in Structure Chart. Hence DFD may still be needed along with Structure Chart to understand the data flow while creating low-level design.