Examples Chapter9
Examples Chapter9
Ans: In realizing the present system, the analyst collects a great deal of relativity
unstructured data through interviews, questionnaires, on – site observations, procedures
manuals and the like. The traditional approach is to organize and convert the data through
system flowcharts, which support future developments of the system and simplify
communication with the user. But the system flowchart represents a physical rather than a
logical system. It makes it difficult to distinguish between what happens and how it happens
in the system.
There are other problems with the traditional approach:
The system life cycle provides very little quality control to ensure accurate
communication from user to analyst. They have no language in common.
The analyst is quickly overwhelmed with the business and technical details of the
system.
Present analytical tools have limitations:
o English narrative descriptions of a system are often too vague and make it
difficult for the user to grasp how the parts fit together.
o System and program flow charts commit to a physical implementation of the
system before one has complete understanding of its logical requirements.
Problems also relate to system specifications:
o System specifications are difficult to maintain or modify.
o They describe user requirements in terms of physical hardware that will
implement the system rather than what the user wants the system to do.
o They are monolithic and redundant.
Q. What is structured analysis? Briefly review the tools used. How it differ from
the traditional approach?
Ans: Structured analysis is a set of techniques and graphical tools that allow the analyst to
develop a new kind of system specifications that are easily understandable to the user.
Several tools in structured analysis including the following:
Analysts work with their wits, pencil and paper. Most of them have no tools. The traditional
approach focuses on cost/ benefit and feasibility analysis, project management, hardware
and software selection and personnel considerations. In contrast, structured analysis
considers new gals and structured tools for analysis. The new goals specify the following:
Use graphics wherever possible to help communicate better with the user.
Differentiate between logical and physical systems.
Build a logical system model to familiarize the user with system characteristics and
interrelationships before implementation.
Q. What steps make up the system development life cycle with structured
analysis? Describe each step briefly.
Ans: The system development life cycle with structured analysis is shown in the following
figure:
The primary steps are:
Study affected user areas, resulting in a physical DFD. The logical equivalent of the
present system results in a logical DFD.
Remove the physical check points and replace them with a logical equivalent,
resulting in the logical DFD.
Model new logical system. So far no consideration is given to modifying methods
called for in the feasibility report. This step incorporates the changes and begins to
describe the candidate system.
Establish man/machine interface. This process modifies the logical DFD for the
candidate system and considers the hardware needed to implement the system.
Quantity costs and benefits and select hardware. The purpose of this step is to cost
justify the system; leading to the selection of hardware for the candidate system. All
that is left after this step is writing the structured specification.
It is graphic. The DFD for example, presents a picture of what is being specified and
is a conceptually easy to understand presentation of the application.
The process is partitioned so that we have clear picture of the progression from
general to specific in the system flow.
It is logical rather than physical. The elements of system do not depend on vendor or
hardware. They specific in a precise, concise ad highly readable manner the workings
of the system and how it hangs together.
It calls for rigorous study of the user area, a commitment that is often taken lightly in
the traditional approach to systems analysis.
Certain tasks that are normally carried out late in the system development life cycle
are moved to the analysis phase.
Processes should be named and numbered for easy reference. Each name should be
representative of the process.
The direction of flow is from top to bottom and from left to right. Data traditionally
flow from the source to the destination.
When a process is exploded into lower – level details, they are numbered.
The names of data stores, sources and destinations are written in capital letters.
Process and data flow names have the first letter of each word capitalized.
Q. What do you mean by decision tree, decision table and structured English?
Ans: Decision tree: A policy statement can be time – consuming to describe and confusing
to implement. The analyst needs to use tools to portray the logic of the policy. The first such
tool is the decision tree. A decision tree has many branches as there are logical alternatives.
It simply sketches the logical structure based on the stated policy. In this respect, it is an
excellent tool: It is easy to construct, easy to read and easy to update.
Example: Book stores get a trade discount of 25% for orders from libraries and individuals for
6 or more copies of books 5% allowed on orders of 6 – 19 copies per book title; 10% on
orders for 20 – 49 copies per book title; 15% on orders for 50 copies or more per book title.
Fig: Decision tree.
Structured English: Structured English borrows heavily from structured programming; it
uses logical construction and imperative sentences designed to carry out instructions for
action. Decisions are made through IF, THEN, ELSE and SO statements. The structured
English for our publishers discount policy is shown in following figure. Note the correlation
between the decision tree and structured English.
In this tool, the logic of processes of the system is expressed by using the capitalized key
words IF, THEN, Else and SO. Structures are intended to reflect the logical hierarchy.
Sentences should be clear, concise and precise in wording and meaning.
COMPUTE DISCOUNT
Add up the number of copies per book title
IF order is from bookstore
and – IF order is for 6 copies or more per book title
THEN: Discount is 25%
ELSE (order is for fewer than 6 copies per book title)
SO: no discount is allowed
ELSE (order is for libraries and individual customers)
SO – IF order is for 50 copies or more per book title
discount is 15%
ELSE– IF order is for 20 to 49 copies or more per book title
discount is 10%
ELSE– IF order is for 6 to 19 copies or more per book title
discount is 5%
ELSE (order is for less than 6 copies per book order)
SO: no discount is allowed
Decision tables: A major drawback of a decision tree is the lack of information in its format
to tell us what other combinations of conditions to test. This is where the decision table is
useful. A decision table is a table of contingencies for defining a problem and the actions to
be taken. It is a single representation of the relationships between conditions and actions.
The following figure shows a decision table that represents our discount policy.
A decision table consists of two points: stub and entry. The stub part is divided into an upper
quadrant called the condition stub and a lower quadrant called the action stub. The entry part
is also divided into upper quadrant, called the condition entry and a lower quadrant called the
action entry.
Q. Write down the pros and cons of each tool in structured analysis.
Ans: The pros and cons of each tool in structured analysis are –
The primary strength of the DFD is its ability to represent data flows. It may be used
at high or low levels of analysis and provides good system documentation. However,
the tool only weakly shows input and output detail. The ser often finds it confusing
initially.
The data dictionary helps the analyst simplify the structure for meeting the data
requirements of the system. It may be used at high or low levels of analysis, but it
does not provide functional details and it is not acceptable to many nontechnical
users.
Structured English is best used when the problem requires sequences of actions with
decisions.
Decision trees are used to verify logic and in problems that involves a few complex
decisions resulting in a limited number of actions.
Decision trees and decision tables are best suited for dealing with complex branching
routines such as calculating discounts or sales commissions on inventory control
procedur
Q. There are three types of accounts in a bank. Assume that the accounts are
current account, saving account and fixed deposit account. In current account
bank do not give any interest, in saving account bank gives 5% of interest, and in
fixed deposit account bank gives interest depend on time at following:
Interest
Duration
8% 6 months
10% 1 year
12% 5 years
Draw the data flow diagram, decision table, decision tree and structured English.
Ans: Decision tree:
Decision table:
Condition entry
5 4 3 2 1 Condition stub
N N N N Y Account is current?
N N N Y Account is savings?
Y Y Y Account is fixed deposit?
IF (condition)
N N Y Duration is 6 months?
N Y Duration is 1 year?
Y Duration is 5 year?
√ No interest. THEN(action
√ Allow 5% interest.
√ Allow 8% interest.
)
√ Allow 10% interest.
√ Allow 12% interest.
Action entry Action stub
Q. In a varsity book club if a member buys a book he/she will get 10% discount.
If the member buys the book more than 1000 tk then he/she will get 15%
discount. If the buyer is not a member then he/she will not get any discount but
he/she will get discount 7% if the amount is more than 1000 tk. Draw the data
flow diagram, decision table, structured English and decision tree.
Ans: Decision tree:
Decision table:
Condition entry
4 3 2 1 Condition stub
N N Y Y Customer is member?
IF (condition)
N N N Y Order is more than 1000 tk?
√ No discount.
√ Allow 7% discount. THEN(action
√ Allow 10% discount. )