保有する文献と貸出についての条件は,次のとおりである。
〔保有する文献と貸出についての条件〕
(1) 同一文献は複数保有せず,文献ごとに固有な文献番号が採番されている。
(2) 貸出期間は,貸出日を含んで最長2週間である。ここで,返却された文献をその日に違う社員に貸し出すことは可能であるが,同じ社員に対して返却した同一文献をその日のうちに貸し出すことはない。
貸出から返却までの手続は,次のとおりである。
〔貸出から返却までの手続〕
(1) 社員は借りたい文献を書庫から取り出して,資料室の担当者(以下,担当者という)に手渡し,社員番号を提示する。
(2) 担当者は文献システムを使って貸出処理を行い,社員に文献を手渡す。
(3) 文献返却時,社員は担当者に文献を返却し,担当者は文献システムを使って返却処理を行う。
文献システムにおける貸出処理と返却処理の仕様は,次のとおりである。
〔貸出処理〕
(1) 文献番号で文献表を検索し,文献名を取得する。
(2) 社員番号で社員表を検索し,社員名とメールアドレスを取得する。
(3) 貸出表のレコード(以下,貸出レコードという)を用意して,(1),(2)で取得した文献番号,文献名,社員番号,社員名,メールアドレスを設定し,貸出日に当日の日付を,返却日に空白値を設定する。
(4) (3)で設定した貸出レコードを貸出表に追加する。
〔返却処理〕
(1) 文献番号で貸出表を検索し,返却日が空白値である貸出レコードを抽出する。
(2) 抽出した貸出レコードの返却日に当日の日付を設定し,貸出表を更新する。
担当者には,社員からの文献の問合せが多い。担当者は,社員から電話で文献名を聞き,貸出可能かどうかを調べている。そこで,文献検索機能を文献システムに追加し,社員に利用させることにした。文献検索機能の概要は次のとおりである。
追加する文献検索機能について,その処理の流れを次の図のとおりにまとめた。図の d~f に入る適切な字句の組合せはどれか。
〔文献検索機能の概要〕
(1) 問い合わせる文献名で,文献表をあいまい検索して結果を表示する。
(2) 該当する文献があるかを確認し,該当するものがある場合は,貸出可能かどうかを調べる。
(3) 貸出中であるか,貸出可能であるかを表示する。
(処理の流れ:開始 → 「文献名で文献表をあいまい検索して結果を表示する」 → 「該当する文献はあるか」 No → 「“文献なし”と表示する」 → 終了 / Yes → d → 「該当する貸出レコードはあるか」 No → e → 終了 / Yes → f → 終了)
① “貸出可能”と表示する
② “貸出中”と表示する
③ 文献番号で貸出表を検索し,返却日が空白値の貸出レコードを抽出する
④ 文献番号で貸出表を検索し,最も古い貸出日の貸出レコードを抽出する
出典 平成22年度 春期 ITパスポート試験 問95
解説
問 95
//
○ア
正解The correct answer is ア (d: ③ e: ① f: ②). In the flow diagram, d is the process that prepares what the decision right after it, “Is there a matching loan record?”, will examine, so either ③ or ④ — the ones that search the loan table and extract records — belongs there. The key point is that a return date is recorded in the records of the loan table, and a book that has not yet come back keeps a blank value as its return date. Therefore, if ③ “Search the loan table by document number and extract loan records whose return date is a blank value” is placed in d, the extracted records are only “records of items that are on loan right now”. After that, the branches of the decision give the answer directly: on the No side, where there is no record, e is the state in which nobody has borrowed it, so it is ① Display 'Available for loan'; on the Yes side, where a record exists, f is the state in which it has been borrowed, so it is ② Display 'On loan'. This also matches (3) of [Overview of the document search function], “Display whether it is on loan or available for loan”.
×Incorrectイ
d = ③ is correct, but e and f are swapped. e is on the No side of the decision “Is there a matching loan record?” — that is, the side where there is not even one record with a blank return date — so the document is not on loan but is in a state where it can be borrowed. Placing ② Display 'On loan' here, and ① Display 'Available for loan' on the Yes side (f) where a record was found, makes what is displayed the exact opposite of the actual state.
×Incorrectウ
The correspondence e = ①, f = ② is correct, but placing ④ “extract the loan record with the oldest loan date” in d is wrong. The loan table also retains past loan history for items that have already been returned, so the record with the oldest loan date is extracted even when the document has already been returned. As a result, the Yes side of the decision (f) could always display 'On loan', and the current loan status cannot be judged correctly.
×Incorrectエ
In addition to the error of placing ④ in d (the same as ウ: even old history for items already returned gets extracted, so whether it is currently on loan cannot be judged), 'Available for loan' and 'On loan' at e and f are also swapped, making this a doubly wrong option.
ここがポイント
For fill-in-the-blank questions on a flow diagram (flowchart), the basic approach is to read what state each Yes/No of the decision symbol represents together with what the process just before it extracted. The process box immediately before a decision holds the process that produces what that decision evaluates.
In loan management, holding data as “a record whose return date is a blank value = not yet returned = on loan” is a standard pattern. When you want to know the current state, make the extraction condition target the unfinished (blank-value) records rather than the whole history — keep this way of thinking in mind.