Independent assessment B: equipment inspections
סדנת ביקורים עצמאית
אלו הן שאלות מקוריות ומתוקנות בסגנון בוחני AS 9618. הזמן המומלץ הוא 35 דקות. קרא כל חלק לפני מענה. שלח את כל התשובות יחד; הפותר והתמיכה יהיו לא זמינים עד אז.
בדיקות מבניות מעניק 2 נקודות לעקיבה, 2 לבדיקות גבול, ו6 לכל אלגוריתם מלא. חלק תכנותי זוכה בנקודות רק כאשר כל המקרים עוברים בהצלחה. מדד אימון זה אינו כרוך בתוך סכמת ציון של קמברידג'
תיבת ההסבר: הסבר את בחירת לולאתך, את המצב החייב להישמר במקרה של דחייה, ואת מטרת כל פרמטר. לאחר השליחה, השווה לתשובות המופת. מורה אמור לבדוק הסברים ולהעניק נקודות חלקיות לבוחן; בדיקות אוטומטיות אינן יכולות לעשות זאת.
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 דקות. ענו על כל חלק לפני השליחה. הרצה, בדיקה וחשפים יעוכבו עד השליחה. לאחר מכן התשובות ינעלו לבדיקה.