Independent assessment B: equipment inspections
独立試験ワークショップ
これらは新しいオリジナルの AS 9618 試験形式問題である。推奨時間は 35 分である。回答する前にすべての部分を読む。すべての回答を一緒に提出せよ。それまでランナーとサポートは利用できないままとする。
構造化されたチェックは、トレースに対して 2 ポイント、境界テストに対して 2 ポイント、各完全アルゴリズムに対して 6 ポイントを授与する。プログラミング部分はすべてのケースが通過した場合のみポイントを授与する。この実践ベンチマークはCambridge採点基準とは別物である。
推論ボックス内で、ループを選択した理由、拒否時に保持すべき状態、各パラメータの目的を説明せよ。提出後、worked answers と比較せよ。教員は説明を確認し、部分的な試験満点を割り当てるべきである。出力チェックのみではそれが不可能である。
A 2 by 3 array contains rows [8, 4, 6] and [3, 9, 5]. Total is reset to 0 for each row, then values are added left to right. Give Row, Col, Total after EVERY inner iteration, one triple per line.
Valid quantities for an unchanged stock of 7 are 1 to 7 inclusive. Give FOUR boundary values in ascending order, including the immediately invalid values.
Read NumberOfItems (1 to 4), then THREE non-negative integer inspection scores per item, item by item. Store a 2-D array. Output each item total, then the 1-based index of the LOWEST-total item. Choose the first on a tie.
フィードバックは提出後に表示されます。
Write only PROCEDURE Borrow(BYREF Stock : INTEGER, BYVAL Wanted : INTEGER, BYREF Success : BOOLEAN). Accept only positive requests no greater than Stock. Set Success on EVERY call. Decrease Stock only on success. Do not OUTPUT.
フィードバックは提出後に表示されます。
Explain your choice of data structure and loop. Identify one boundary case and predict its result. For a subroutine, explain what is returned or changed in the caller.
このブラウザでの今回のセッションに保存されました。ご自身または教師で確認してください。これらの説明は自動採点されません。
これらの基準に基づいて説明内容を確認する
- My types and data structure match the data and the question.
- I justified the loop and checked its first and last iterations.
- Initial values and rejected operations preserve the intended state.
- My test includes input, purpose and expected result.
- I distinguished returning a value from printing and changing caller state.
推奨時間:35分。提出前にすべての部分に答えてください。提出後まで、解答確認やヒントは表示されません。提出後はレビュー用に回答がロックされます。