You are on page 1of 18

Analysis and Design Systems

Lecture 5
Analysis stage
Detailed study
Dr.Abdualmajed Alkhulaidi
Associate professor at Sana’a University
Doctor of Philosophy in Software
Engineering
Operations specification
Of course, we can all tell which carrier a friend of ours is using just by •
knowing his or her mobile phone number. However, we do not recognize
the logic on which this knowledge operates.
There are several techniques used to analyze and document the logic of •
decisions that occur in operations, including:
• English language,
• structural decisions
• decision tables
• decision trees.
The analyst must be able to recognize the logic and structural decisions •
that occur in the business, and must also know how to differentiate
between these structural and semi-structural decisions.
Structured decisions: are those that deal with recurring routine problems •
and have a known routine procedure that can be applied at any time
whenever the same problem recurs.
- Unstructured decisions: they deal with new and non-recurring problems, •
and therefore there is no clear path or decisive way for them to take
decisions regarding them.
Objectives of production process
specifications
• Reduce process ambiguity: This objective will force
the analyst to identify the details of the process
implementation.
• Obtaining an accurate description of what has been
done and done: This description will usually be later
placed in a file of specifications and given to the
programmer.
• Validate the design of the system and ensure that the
process actually receives all the input data streams
needed to produce the output streams and also
ensures that all the input and output streams are
represented on the data flow diagram.
Cases that do not require
description
There are many cases in which a specification of operations is not created,
because sometimes the process is too simple or relies on pre-existing
computer code. Such cases should then be noted in the process description,
and no further design is required.
-Operations representing physical input or output: reading and writing.
- These operations usually need simple logic. Regular data entry validations.
For complex editing data entry validations, a process specification must be
created.
- Operations that use pre-written code. These processes are then usually
included in the system as subprograms or dependencies. Subprograms are
computer programs that are written, tested, and stored on a computer
system. These subprograms usually perform a general system function, such
as validating a date or check number. These general-purpose subprograms are
written and documented only once but form a series of building blocks that
can be used in many data flow diagrams. As for the functions, they are similar
to the subprograms, but the difference between them is in the way the code
is written for each of them.
data specification format
- Process number: which must match the process ID shown on
the data flow diagram.
Process name: which must also match the name written on the
process code in the data flow diagram.
- A brief description of what the process does.
- A list of the data flows entering the process.
-Data flows out of the process.
- Determine the type of operation: is it batch, on-line, or -
manual.
-If the process uses prewritten code, give the name of the -
child or child program that contains the code.
-A description of the logic of the process that explains policies
and business rules in the language of everyday life rather than in
the pseudo-code language of computer languages. Business
rules are procedures or perhaps a set of conditions and formulas
that a company follows in order to carry out its work.
-If there is not enough space on the form to write a full
description of the process in Structured English, or if there is a
decision table or tree illustrating the logic of the process, give
the name of the table or tree in the form.
- List all the unresolved issues, all the missing parts of the
process logic and any other issues related to that, as these issues
form the basis for the questions that will be asked in the appeals
interviews.
Structured English
-When process logic includes formulas or repetitions or when
structural decisions are uncomplicated, it is appropriate to use
Structured English for decision-process analysis.
- As its name indicates, Structured English is based on
• Structural logic: we mean instructions that are organized into
overlapping and modest procedures into groups.
• Simple English like: add , multiply , move.
- The verbal problem can be expressed in Structured English by
placing decision rules in the required sequence and using the IF-
THEN-ELSE instructions within it. Structured English can be more
complex if blocks of operations overlap with other blocks of
instructions.
Structured English
• Structured English:
-Strings of Imperative Sentences.
- Decisions.
-Cycles or Repeat.
‫‪Decision Table‬‬ ‫جداول القرارات‬

‫• عندما تكون العملية معقدة وتتضمن شروط كثيرة‪ ،‬فإن توصيفها‬


‫باستخدام اللغة الهيكلية يكون معقدا ً وصعب الفهم‪.‬‬
‫• لذلك يستخدم لمثل هذه الحاالت المعقدة أسلوب جداول القرارات‬
‫لسهولة فهمه وألنه يمكن من خالله توضيح وشرح العمليات‬
‫المعقدة والتي تتطلب شروطا ً عددية ومركبة‪.‬‬
‫‪Decision Table‬‬ ‫جداول القرارات‬
‫يتألف جدول القرارات من أربعة قطاعات‪.‬‬ ‫•‬
‫يحتوي القسم العلوي األيسر على الشروط‪ ،‬ويحتوي القسم العلوي األيمن على خيارات هذه‬ ‫•‬
‫الشروط‪.‬‬
‫أما النصف السفلي من الجدول فيحتوي في القسم األيسر منه على القرار المطلوب اتخاذه في‬ ‫•‬
‫ضوء تشكيلة الشروط‪ ،‬وفي القسم األيمن منه على قواعد تنفيذ تلك األفعال ‪.‬‬
‫عندما يتم استخدام جدول القرار لتحديد الفعل الذي يجب تنفيذه‪ ،‬يكون المنطق باتجاه عقارب‬ ‫•‬
‫الساعة بدءا ً من القسم اليساري العلوي ‪.‬‬

‫القطاع الثاني‬ ‫القطاع األول‬


‫قواعد الرتاكيب املختلفة حلدوث الشرط‬ ‫الشروط املتعلقة بالقرار‬

‫القطاع الرابع‬ ‫القطاع الثالث‬


‫القرار املطلوب اختاذه يف ضوء تشكيلة الشروط‬ ‫قواعد التنفيذ‬
‫جداول القرارات ‪Decision Table‬‬
‫• بفرض أن لدينا مخزنا ً يريد توضيح السياسة التي يتبناها بشأن مشتريات‬
‫الزبائن غير النقدية‪ .‬تستطيع الشركة أن تقوم بذلك باستخدام جدول قرار‬
‫بسيط‪.‬‬
‫• أن كالً من الشروط‪ :‬البيع بأقل من ‪ 500‬لاير‪ ،‬الدفع بواسطة شيك‪ ،‬الدفع‬
‫باستخدام بطاقة اإلئتمان‪ .‬يملك احتمالين فقط‪ ،‬هما (‪.)Y, N‬‬
‫• وهناك أربعة أفعال ممكنة‪ ،‬هي‪ :‬إصدار فاتورة‪ ،‬البحث عن رقم البطاقة في‬
‫الدليل‪ ،‬الحصول على تعميد المسئول‪ ،‬الحصول على تعميد البنك‪.‬‬
‫‪4‬‬ ‫‪3‬‬ ‫‪2‬‬ ‫‪1‬‬

‫‪N‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫البيع بأقل من ‪ 500‬لاير‬

‫‪N‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫الدفع بواسطة شيك‬

‫‪Y‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫الدفع باستخدام بطاقة االئتمان‬

‫‪X‬‬ ‫إصدار فاتورة‬

‫‪X‬‬ ‫البحث عن رقم البطاقة في الدليل‬

‫‪X‬‬ ‫أحصل على تعميد المسئول‬

‫‪X‬‬ ‫أحصل على تعميد البنك‬


‫• لكي يقوم المحلل ببناء جداول القرار يحتاج إلى تحديد الحجم‬
‫األقصى للجدول‪ ،‬مع استبعاد أي حاالت مستحيلة وأي حاالت‬
‫تضارب أو حاالت تكرار‪ ،‬ومن ثم القيام بتبسيط الجدول قدر‬
‫المستطاع ‪.‬‬
‫• سوف يكون االجراء المتبع النشاء جدول القرارات على النحو‬
‫التالي‪:‬‬
‫– رسم جدول ابتدائي‪.‬‬
‫– اترك الخلية األولى من اليمين األعلى للجدول فارغة‬
‫– تحديد الشروط وتحديد القيم المفترضة لكل شرط‪.‬‬
‫– حساب العدد المحتمل للقواعد المستخدمة‪.‬‬
‫– التعرف على األفعال الممكنة‪.‬‬
‫– تعريف كل إجراء مع قاعدته‪.‬‬
‫– التأكد من أن كل فعل يتماشى مع قاعدته‪.‬‬
‫– تسبيط الجدول‪.‬‬
‫تحديد عدد الشروط التي يمكن أن تؤثر على القرار‪ ،‬مع دمج األسطر التي تتداخل‪ ،‬مثل الشروط‬ ‫•‬
‫التي َيمنع وجود أحدها وجود اآلخر (المتمانعة) ‪ .‬بعد االنتهاء من تحديد الشروط سيصبح عدد‬
‫الشروط مساويا ً لعدد األسطر في النصف العلوي من جدول القرار‪.‬‬
‫تحديد عدد األفعال المحتملة‪ ،‬وعند االنتهاء من ذلك سيصبح عدد األفعال مساويا ً لعدد األسطر في‬ ‫•‬
‫النصف السفلي من جدول القرار ‪.‬‬
‫تحديد الخيارات (وهي االحتماالت) المتاحة أمام كل شرط‪ ،‬وفي أبسط أشكال جداول القرار يكون‬ ‫•‬
‫هناك خياران لكل شرط ‪ N‬أو ‪.Y‬‬
‫أما في الجدول ذي المداخل الموسعة فيحتمل وجود الكثير من الخيارات أمام كل شرط ‪.‬‬ ‫•‬
‫حساب العدد األقصى من األعمدة في جدول القرار وذلك بضرب عدد خيارات جميع الشروط ‪.‬‬ ‫•‬
‫فلو كان هناك أربعة شروط وكل شرط أمامه خياران ‪ N‬أو ‪ Y‬مثالً‪ ،‬سيكون هناك ‪= 2×2×2×2‬‬ ‫•‬
‫‪ 16‬احتماالً على النحو التالي‬
‫𝑠𝑒𝑣𝑖𝑡𝑎𝑛𝑟𝑒𝑡𝑙𝑎 ‪• 𝐶𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛 1: ×2‬‬
‫𝑠𝑒𝑣𝑖𝑡𝑎𝑛𝑟𝑒𝑡𝑙𝑎 ‪𝐶𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛 2: ×2‬‬
‫𝑠𝑒𝑣𝑖𝑡𝑎𝑛𝑟𝑒𝑡𝑙𝑎 ‪𝐶𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛 3: ×2‬‬
‫𝑠𝑒𝑣𝑖𝑡𝑎𝑛𝑟𝑒𝑡𝑙𝑎 ‪𝐶𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛 4: ×2‬‬
‫‪• Total is‬‬ ‫𝑠𝑒𝑖𝑡𝑖𝑙𝑖𝑏𝑖𝑠𝑠𝑜𝑃 ‪16‬‬
‫• تحديد خيارات الشروط‪ .‬ابدأ بالشرط األول ثم اقسم عدد األعمدة على‬
‫عدد الخيارات لذلك الشرط ‪.‬‬
‫• في المثال السابق‪ :‬كان هناك ‪ 16‬عمودا ً وخياران ‪ N‬أو ‪ .Y‬لذا فحاصل‬
‫قسمة ‪ 16‬على ‪ 2‬هو ‪. 8‬‬
‫• ثم اختر أحد الخيارات‪ ،‬وليكن ‪ Y‬واكتبه في األعمدة الثمانية األولى‪ ،‬ثم‬
‫قم بكتابة ‪ N‬في األعمدة الثمانية األخيرة على النحو التالي‪:‬‬
‫•‬ ‫‪Condition 1: Y Y Y Y Y Y Y Y N N N N N N N N‬‬
‫• كرر تلك الخطوة من أجل كل شرط‪ ،‬باستخدام مجموعة جزئية من‬
‫الجدول‪:‬‬
‫•‬ ‫‪Condition‬‬ ‫‪1:‬‬ ‫‪Y‬‬ ‫‪YYYYYYYNNNNNNNN‬‬
‫•‬ ‫‪Condition‬‬ ‫‪1:‬‬ ‫‪Y‬‬ ‫‪YYYNNNN‬‬
‫•‬ ‫‪Condition‬‬ ‫‪1:‬‬ ‫‪Y‬‬ ‫‪YNN‬‬
‫•‬ ‫‪Condition‬‬ ‫‪1:‬‬ ‫‪Y‬‬ ‫‪N‬‬
‫• يُسمح للطالب بحذف المادة الدراسية في الحاالت التالية‪:‬‬
‫– أن ال يكون مستوى المادة أقل من مستوى الطالب‪ .‬فمثالً‪ ،‬ال يجوز‬
‫حذف مادة من المستوى الخامس لطالب في المستوى الخامس أو‬
‫السادس أو أكثر من ذلك إال بموافقة رئيس القسم‪.‬‬
‫– يُمكن حذف المادة إذا كان مستوى المادة أكبر من مستوى الطالب‪.‬‬
‫فمثالً‪ ،‬يجوز حذف مادة من المستوى السابع لطالب في المستوى‬
‫السادس أو الخامس أو أقل من ذلك‪.‬‬
‫– يجب إن ال يقل عدد الساعات ال ُمسجلة للطالب عن ‪ 12‬ساعة بعد‬
‫الحذف إال بموافقة رئيس القسم‪.‬‬
‫• األفعال‪:‬‬
‫– أحذف المادة‪.‬‬
‫– أحصل على موافقة رئيس القسم‪.‬‬
‫• الشروط‪:‬‬
‫أن يكون مستوى المادة أكبر من مستوى الطالب‪.‬‬ ‫–‬
‫أن يكون مستوى المادة مسا ٍو أو أصغر من مستوى الطالب‪.‬‬ ‫–‬
‫أن ال يقل عدد الساعات المسجلة للطالب بعد الحذف عن ‪ 12‬ساعة‪.‬‬ ‫–‬
‫أن يكون عدد الساعات المسجلة للطالب بعد الحذف أقل من ‪ 12‬ساعة‪.‬‬ ‫–‬
‫• خيارات الشروط‪ Y :‬أو ‪ N‬لجميع الشروط‪.‬‬
‫• يوجد لدينا ‪ 4‬شروط ولكل شرط خيارين‪ .‬إذاً‪ ،‬سيكون معامل التكرار‬
‫‪.16‬‬
‫‪16‬‬ ‫‪15‬‬ ‫‪14‬‬ ‫‪13‬‬ ‫‪12‬‬ ‫‪11‬‬ ‫‪10‬‬ ‫‪9‬‬ ‫‪8‬‬ ‫‪7‬‬ ‫‪6‬‬ ‫‪5‬‬ ‫‪4‬‬ ‫‪3‬‬ ‫‪2‬‬ ‫‪1‬‬

‫‪N‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫أن يكون مستوى المادة أكبر من مستوى الطالب‬

‫‪N‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫أن يكون مستوى المادة مسا ٍو أو أصغر من مستوى الطالب‬

‫‪N‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫أن ال يقل عدد الساعات المسجلة للطالب بعد الحذف عن ‪ 12‬ساعة‪.‬‬

‫‪N‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫أن يكون عدد الساعات المسجلة للطالب بعد الحذف أقل من ‪12‬‬
‫ساعة‪.‬‬
‫‪x‬‬ ‫‪x‬‬ ‫أحذف المادة‬

‫‪x‬‬ ‫‪x‬‬ ‫‪x‬‬ ‫الحصول على موافقة رئيس القسم‬

‫‪11‬‬ ‫‪10‬‬ ‫‪8‬‬ ‫‪7‬‬ ‫‪6‬‬

‫‪N‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫‪Y‬‬ ‫أن يكون مستوى المادة أكبر من مستوى الطالب‬

‫‪Y‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫أن يكون مستوى المادة مسا ٍو أو أصغر من مستوى الطالب‬

‫‪N‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫أن ال يقل عدد الساعات المسجلة للطالب بعد الحذف عن ‪ 12‬ساعة‪.‬‬

‫‪Y‬‬ ‫‪N‬‬ ‫‪N‬‬ ‫‪Y‬‬ ‫‪N‬‬ ‫أن يكون عدد الساعات المسجلة للطالب بعد الحذف أقل من ‪12‬‬
‫ساعة‪.‬‬
‫‪x‬‬ ‫‪x‬‬ ‫أحذف المادة‬

‫‪x‬‬ ‫‪x‬‬ ‫‪x‬‬ ‫الحصول على موافقة رئيس القسم‬

You might also like