This website includes Education Information like a programming language, job interview question, general knowledge.mathematics

Education log

PageNavi Results No.

Ads

Monday, February 8, 2021

decision tree in software engineering

 decision tree in software engineering

A decision tree gives a graphic view of the processing logic involved in decision making and the corresponding actions taken. The edges of a decision tree represent conditions and the leaf nodes represent the actions to be performed depending on the outcome of testing the condition. 


What is decision tree in software engineering?

A Decision Tree offers a graphic read of the processing logic concerned in a higher cognitive process and therefore the corresponding actions are taken.  The perimeters of a choice tree represent conditions and therefore the leaf nodes represent the actions to be performed looking on the result of  testing the condition.


Example: -

Consider Library Membership Automation Software (LMS) where it should support the

following three options:

1 New member

2 Renewal

3 Cancel membership


New member option Decision: 

When the 'new member' option is selected, the software asks details about the member like the member's name, address, phone number etc.

Action:

 If proper information is entered then a membership record for the member is created and a bill is printed for the annual membership charge plus the security deposit payable. Renewal optionDecision: If the 'renewal' option is chosen, the LMS asks for the member's name and his membership number to check whether he is a valid member or not.


Action: 

If the membership is valid then membership expiry date is updated and the annual membership bill is printed, otherwise an error message is displayed. Cancel membership optionDecision: If the 'cancel membership' option is selected, then the software asks for member's name and his membership number.


Action: 

The membership is cancelled, a cheque for the balance amount due to the member is printed and finally the membership record is deleted from the database.



DECISION TABLE:

A decision table is used to represent the complex processing logic in a tabular or a matrix form. The upper rows of the table specify the variables or conditions to be evaluated. The lower rows of the table specify the actions to be taken when the corresponding conditions are satisfied. A column in a table is called a rule. A rule implies that if a condition is true, then the corresponding action is to be executed. 


Example: -

Consider the previously discussed LMS example. The following decision table  how to represent the LMS problem in a tabular form. Here the table is divided into two parts, the upper part shows the conditions and the lower part shows what actions are taken. Each column of the table is a rule.


No comments:

Post a Comment