Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Give the complete decision table Design test cases for the requirements Write a java code for the given requirement Write a Junit test and use

  • Give the complete decision table
  • Design test cases for the requirements
  • Write a java code for the given requirement
  • Write a Junit test and use the test cases.
  • Report the output of the test. Report if there are any defects and fixes.image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
Using the following scenario as an example, give the complete decision table for the requirement given under Question 1. Suppose we have a system that checks if a candidate for a driving license fulfills all requirements to receive the license. The requirement specification describes the above mentioned business rules as follows: The operator enters the following information to the system: The result of the theory exam (an integer value in the range 0100 points) The result of the practice exam (an integer value greater or equal to zero, representing the number of errors done by the candidate during the practice exam) A candidate receives the driving license, if she/he gained at least 85 marks (out of 100) from the theory exam and if she/he made at most 2 errors during the practice exam. In case of failing on one of these criteria, the candidate is eligible to retake the exam. In case of failing in both parts, the candidate is required to retake the driving lessons. Let us go through the process described above to derive test cases for this problem. 1 1. Identify all possible conditions. The possible conditions on which the system's decisions depend are obviously: The result of the theory exam (number of points) The result of the practice exam (number of errors) The decisions will depend on the results of these exams. From the specification we know that the theory exam is passed when a candidate receives at least 85 points. The practice exam is passed, when the number of mistakes is 2 or less. 2. Identify all the corresponding actions that may occur in the system. The system may take the following decisions: Should a candidate receive the driving license? (possible values: YES or NO) Should a candidate retake the theory exam? (possible values: YES or NO) Should a candidate retake the practice exam? (possible values: YES or NO) Should a candidate retake the driving lessons? (possible values: YES or NO) 3. Generate all possible combinations of conditions; each single combination forms a separate column in the decision table. Each condition has two possible values, so we have 2 x2 = 4 possible combinations of conditions (and, hence, four columns in the decision table): - Points >= 85 and errors >=2. - Points >=85 and errors >2. - Points 2. 4. For each combination of conditions identify which actions should hold and which should not; fill the corresponding fields in the given column below the corresponding combination of conditions. Now we go through the columns one by one and for each of them, we identify the expected behavior of the system: Column 1: points >=85, errors >=2. This means that the candidate passed both exams, so she/he should get her driving license. There is no need to retake exams or the driving lessons. Hence, the four corresponding actions in the column 1 should be respectively YES, NO, NO, NO. Column 2: points >=85, errors >2. This means that the candidate failed the practice exam. She/he cannot receive the driving license and she should retake the practice exam. Hence, the corresponding actions in the column 2 are respectively NO, NO, YES, NO. Column 3: points 2. The candidate failed both exam. She/he cannot receive the license and should retake the driving lessons. The complete decision table is given as follows. 1 YES YES 2 YES NO 3 NO YES 4 NO NO CONDITIONS RULES Points > 852 Errors

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions