This question's explanation and your answers so far.
問89
頻出度★★★
企業向け研修サービス会社のA社では、次の研修サービスの概要を要件とした研修申込受付システム(以下、研修システムという)の開発をソフトウェア開発業者に委託した。A社の事務担当Bさんは、研修システムの受入れテストを担当することになった。受入れテストには研修サービスの概要のとおり、表1に示す研修コースをテストデータとして使用する。
〔研修サービスの概要〕
(1) 研修の申込みは、顧客企業の申込責任者が取りまとめて行う。顧客企業には、会員企業(以下、会員という)と、非会員である一般企業(以下、一般という)がある。
(2) 研修代金は研修コースによって異なり、受講料とは別に、テキスト代を請求するコースとテキスト代を請求しないコースがある。
(3) 開講日の翌月第1営業日に申込責任者ごとに前月の受講料とテキスト代を記載した請求明細書を作成し、研修代金として顧客企業に請求する。
(4) 開講日の3営業日前(開講日を含まない)までに申込みの取消しをせずに、開講日当日に欠席をした申込者は欠席扱いとし、テキスト代は請求せず受講料を請求する。開講日の3営業日前までに取り消した申込者は取消扱いとし、受講料及びテキスト代は請求しない。
(5) 受講料には割引制度がある。その適用条件として、次の①〜③が設定されている。テキスト代については割引の適用はない。受講料の割引処理は、請求明細書の作成時に行われる。
① 会員の申込者は、受講料を10%割り引く。
② 同じ申込者に対して、同一月に開講された複数のコースの請求がある場合、それぞれのコースの受講料を10%割り引く。
③ ①と②の両方に該当するときは、それぞれのコースの受講料を20%割り引く。
表1 研修コース表
研修コース名
開講日
受講料(円)
テキスト代(円)
コースP
9月4日
10,000
2,000
コースQ
9月17日
8,000
2,000
コースR
9月25日
20,000
請求なし
コースS
10月2日
15,000
1,500
Bさんは、割引適用の機能に関するテストデータを準備するために、表2に示す割引適用表を作成して整理することにした。割引適用表の a に入れる適切な記述はどれか。ここで、割引適用表の上の2行は割引適用の条件であり、真のとき“Y”、偽のとき“N”と記述する。同じ列にある二つの条件の真偽の組合せとなった場合の受講料の割引率を同じ列の3行目に記述する。
表2 割引適用表
会員である
Y
Y
N
N
同じ月で複数コースの請求がある
Y
N
Y
N
受講料の割引率(%)
a
出典 平成24年度 春期 ITパスポート試験 問89
解説
問 89
//
※ Our check while writing this explanation could not fully confirm the published answer; scoring follows IPA's official key.
×Incorrectア
«0, 10, 10, 0». The values in columns 2, 3 and 4 are correct, but making column 1 zero is wrong. In column 1 both «Is a member» and «Has charges for multiple courses in the same month» are Y, that is, it is the combination that satisfies both applicable conditions, so by ③ of item (5) of the preamble the discount rate must be 20. Since satisfying only one of the conditions already gives a 10% discount under ① or ②, it is impossible for the discount to become 0 when both are satisfied.
×Incorrectイ
«0, 10, 10, 20». Column 1 is given as 0 and column 4 as 20, so the correspondence between the truth values of the conditions and the discount rates is swapped end to end. Column 4 has «Is a member» = N and «Has charges for multiple courses in the same month» = N, a combination that matches none of the applicable conditions ①②③, so its discount rate must be 0. Conversely, column 1, where both are Y, falls under ③ and is 20. As a sequence of values it does contain the four correct numbers, but they are matched to the wrong columns.
×Incorrectウ
«10, 10, 10, 0». The 0 in column 4 is correct, but making column 1 equal to 10 is wrong. Rule ③ of item (5) of the preamble states that when both ① and ② apply, each course gets 20% off its tuition fee; that is, it fixes the discount rate for the overlapping case separately from the single-condition cases. Column 1, where both are Y, must therefore be set to 20, distinguished from column 2 (only ① applies) and column 3 (only ② applies), which are both 10. If every matching column were set uniformly to 10, there would be no point in having rule ③ at all, and as test data it would be impossible to verify the ③ branch.
○エ
正解The correct answer is エ, «20, 10, 10, 0». Table 2 is a decision table: the top two rows are the conditions that the test must distinguish, and the third row gives the result for that column (the discount rate of the tuition fee). Since 'a' is a single cell merged across all four columns, what you have to answer is the four discount rates listed in order starting from the left-hand column. The discount scheme in item (5) of the preamble to question set B has three rules: ① an applicant who is a member gets 10% off the tuition fee; ② when the same applicant is charged for several courses that start in the same month, each course gets 10% off its tuition fee; ③ when both ① and ② apply, each course gets 20% off its tuition fee. Applying these to each column of Table 2: column 1 has «Is a member» = Y and «Has charges for multiple courses in the same month» = Y, so ③ applies and the rate is 20. Column 2 is Y and N, so only ① applies and the rate is 10. Column 3 is N and Y, so only ② applies and the rate is 10. Column 4 is N and N, so none of ①②③ applies, there is no discount, and the rate is 0. Read from the left, the values are therefore 20, 10, 10, 0, so エ is appropriate. Note also that the discount applies only to the tuition fee; the textbook fee is out of scope, as item (5) of the preamble states explicitly that no discount applies to the textbook fee. In Q90 of the same question set, when Oyo Jiro, a non-member (general) applicant, takes both Course Q and Course R starting in September, the tuition fee of Course R becomes 18,000 yen instead of 20,000 yen (the 10% discount of ②), which also confirms that column 3 is 10.
ここがポイント
How to read a decision table: the combination of Y/N values lined up in the condition rows at the top represents one test case per column, and the rows underneath record the result for that combination. When there are two conditions, listing all 2×2 = 4 combinations as columns prevents both missing and duplicated test cases.
Organizing business rules that have several applicable conditions: separate the cases into single matches (member only, 10%; charges for multiple courses in the same month only, 10%), an overlapping match (both, 20%) and no match (0%). Also, do not overlook the premise that the discount applies only to the tuition fee and that the textbook fee is out of scope.