Independent assessment A: parcel dispatch
ورشة امتحان مستقلة
هذه أسئلة أصلية ومبتكرة على نمط امتحان AS 9618. الوقت المقترح هو 35 دقيقة. اقرأ كل جزء قبل الإجابة. قدم جميع الإجابات معاً؛ لن يتوفر المشرف والدعم حتى ذلك الحين.
تُمنح فحوصات البنية 2 نقطة للتتبع، و2 للاختبارات الحدية، و6 لكل خوارزمية مكتملة. يُكتسب الجزء البرمجي نقاطه فقط عند اجتياز كل حالة. هذا المعيار العملي منفصل عن مخطط علامات كامبريدج.
في صندوق التعليل، اشرح اختيار حلقة التكرار، والحالة التي يجب الحفاظ عليها عند الرفض، والهدف من كل معامل. بعد التقديم، قارن بالإجابات المحلولة. يجب على المعلم مراجعة التعليلات وتعيين درجات الامتحان الجزئية: لا يمكن للفحوصات المخرجة القيام بذلك.
Available begins at 24. Process requests [12, 0, 12, 25]: accept positive requests no larger than Available and subtract accepted amounts. Give Available after EACH request.
Valid quantities for an unchanged stock of 6 are 1 to 6 inclusive. Give FOUR boundary values in ascending order, including the immediately invalid values.
For parcel dispatch, read non-negative Available, then NumberOfRequests (1 to 8), then NumberOfRequests integer requests. Accept a request only if positive and no greater than current Available. Output ok/no for every request, then final Available. Refused requests must not change it.
يظهر التغذية الراجعة بعد الإرسال.
Write only FUNCTION CountLong(FileName : STRING, Limit : INTEGER) RETURNS INTEGER. Read the supplied text file, return how many lines have length at least Limit, and close it. The file may be empty.
يظهر التغذية الراجعة بعد الإرسال.
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 دقائق. أجب على كل جزء قبل الإرسال. سيتم إخفاء التشغيل والتحقق والتلميحات حتى وقت الإرسال، ثم تُقفل الإجابات للمراجعة.