Skip to content

平成25年度 秋期 ITパスポート試験 問95

This question's explanation and your answers so far.

問95
頻出度★☆☆

S 社の総務部では,所属員が 1 週間分の業務実績をまとめた業務報告書を毎週作成して,部門のファイルサーバ(以下,部門サーバという)に保管している。 総務部が定めた業務報告書の作成ルールは,次のとおりである。 〔業務報告書の作成ルール〕 (1) 業務報告書は,報告する項目が記載されているひな形ファイルを用いて作成する。ひな形ファイルの名称は“業務報告書(ひな形)”で,部門サーバの,読取りだけが可能な“ひな形”フォルダに保管されている。 (2) 業務報告書のファイル名の形式とその表記ルールは,次の表 1 のとおりである。 表 1 業務報告書のファイル名の形式とその表記ルール

項目内容
ファイル名の形式“報告_” + yymm + w + 作成者氏名
表記ルール①“ ”で囲まれた文字はそのままファイル名に使用する。<br>② yymm は報告する年月(年は西暦下 2 桁),w は報告する月ごとの週の連番であり,y,m,w の個数はそれぞれの桁数を表す。<br>③“+”は前後の文字をつなげる記号であり,実際のファイル名には含めない。

(3) 業務報告書の作成には,PC の個人用フォルダを一時的に利用し,完成後に部門サーバの“報告書”フォルダに保管する。 (4) 部門サーバには完成した業務報告書だけを保管することにし,修正する場合は,PC の個人用フォルダに移動してから修正する。 (5) 業務報告書に関連した資料(以下,関連資料という)がある場合には,部門サーバの“報告書”フォルダに保管する。関連資料として保管できるファイル数の上限は一つの業務報告書につき 12 とする。 (6) 機密度が高い関連資料を保管するときには,ファイルにパスワードを設定する。パスワードに使用する文字は,半角英数字 6 桁以上とし,英字大文字,英字小文字及び数字を,それぞれ少なくとも一つ含める。 “報告書”フォルダのファイルをファイル名で整列したときに,関連資料が業務報告書と並んで表示されるようにファイル名を付けることにした。この要件と表1の要件を満たす関連資料に付けるファイル名の形式として,適切なものはどれか。ここで,nは関連資料の連番を表す数字で,nの個数は桁数を表す。

出典 平成25年度 秋期 ITパスポート試験 問95
解説

問 95

※ Our check while writing this explanation could not fully confirm the published answer; scoring follows IPA's official key.

  • Incorrectア

    Because the file name begins with “related_”, sorting by file name makes the related materials clump together with the other files that begin with “related_”, displayed at a position far from the business reports that begin with “report_”. This fails the very requirement that "related materials are displayed next to the business report." In addition, the sequential number is a single-digit n, so it cannot number up to 12 related materials either.

  • Incorrectイ

    The sequential number is a two-digit nn, so 12 items can be numbered, but just as with ア the file name begins with “related_”. After sorting, the related materials alone gather in a separate place and do not line up next to the corresponding business report, so the ordering requirement is not satisfied.

  • Incorrectウ

    Its beginning is the same “report_”+ yymm + w + author name as the business report, so it satisfies the ordering requirement. However, the sequential number is fixed at a single digit n, so only 9 numbers, from 1 to 9, can be assigned. Since up to 12 related materials can be kept per business report (creation rule (5)), there is no number left to assign from the 10th item on, and the count requirement cannot be met. A two-digit nn that can express up to 12 is required.

  • エ

    正解 The business report file name defined in Table 1 is “report_”+ yymm + w + author name. To make a related material appear next to its corresponding business report when files are sorted by file name, the file name of the related material has no choice but to begin with exactly the same string as the business report, with the distinguishing information attached after it. エ begins with “report_”+ yymm + w + author name and attaches “_related_”+ nn at the end, so after sorting, only the related materials of that report line up together immediately after the business report. Furthermore, creation rule (5) allows up to 12 related materials to be kept per business report, so the sequential number must be able to express up to 12. Since nn has two digits, all 12 items from 01 to 12 can be numbered, and because the digit count is fixed (zero-padded), sorting them as strings still gives 01, 02, …, 12 — the same order as the sequential numbers. エ is the only option that satisfies both the ordering requirement and the count requirement.

ここがポイント
  • When you want related files to sit next to each other under file-name ordering, make the "beginning part" of the names common across the group of files you want to keep together, and put the information that distinguishes them (a sequential number and so on) at the end. Sorting compares characters in order starting from the first one, so if the beginning differs the file jumps off to a different place.
  • For a sequential number, secure "enough digits to express the required number of items," and also fix the digit count and pad with zeros. Here the upper limit is 12 items, so two digits (01–12) are needed, and by aligning the digit count you can make the ordering as strings agree with the ordering by numeric size.
用語

Your answers