ASSIGNMENT 7 · CHAPTER 16
Validate a component contract
Use the familiar decision-and-evidence sequence. This chapter focuses on interface → semantics → adapter and tests. Make the initial decision before seeing the new evidence.
- Warm-up
- FIT → CONTRACT → BOUND → ACT + EVIDENCE
- Commit Part A
- STRESS → REFIT
- AI declaration + human review
- Export and submit in LMS
1 · WARM-UP · 5 MINUTES · NOT GRADED
A method signature accepts a number named duration. Does the signature establish whether the value means minutes or seconds?
Show / hide warm-up answer
No. Units are part of interface semantics. The caller and component must share a documented contract, including limits and error behavior.
No written warm-up response is required.
Lecture guide
X03, B01, R09, D16 and D16B; original slides 14–22 and 40–59.
FIT identifies the relevant problem. CONTRACT builds this chapter’s artifact. BOUND states the limits. ACT + EVIDENCE records the action, owner and verification. STRESS then tests your reasoning before REFIT.
READ BEFORE ANSWERING
How your work is assessed · 5 points
| Criterion | Scoring |
|---|---|
| FIT · 1 point | 1: Defines the chapter-specific problem accurately, distinguishes facts from assumptions and connects it to the proposed action. 0.75: Sound reasoning with one minor omission. 0.5: Partly correct, with a consequential gap. 0: Missing, materially incorrect or based on invented evidence. |
| CONTRACT · 1 point | 1: A coherent pre/post contract, justified unit conversion, valid range and a discriminating boundary or invalid-input test. 0.75: Sound reasoning with one minor omission. 0.5: Partly correct, with a consequential gap. 0: Missing, materially incorrect or based on invented evidence. |
| BOUND · 1 point | 1: States relevant operating assumptions, scope and an observable trigger to reconsider the claim. 0.75: Sound reasoning with one minor omission. 0.5: Partly correct, with a consequential gap. 0: Missing, materially incorrect or based on invented evidence. |
| ACT + EVIDENCE · 1 point | 1: Gives a feasible bounded action, named responsibility and inspectable evidence, while distinguishing completed from proposed verification. 0.75: Sound reasoning with one minor omission. 0.5: Partly correct, with a consequential gap. 0: Missing, materially incorrect or based on invented evidence. |
| REFIT · 1 point | 1: Explains how the new evidence affects the initial claim and justifies RETAIN, REVISE or REPLACE with a coherent final record. 0.75: Sound reasoning with one minor omission. 0.5: Partly correct, with a consequential gap. 0: Missing, materially incorrect or based on invented evidence. |
Five points use the same familiar structure. The chapter artifact changes; the LMS determines how assignment points contribute to the course grade.
Learning-outcome alignment
This task supports supplied syllabus CLO 8. It practises disciplinary knowledge, engineering skills and accountable decisions. It is course-written practice, not an official national readiness assessment or an approved item-weight mapping.
Before you start
Use Save draft while working and Download draft / backup before leaving a shared device. Part A becomes read-only only after you confirm commitment. You can continue editing Part B afterward.
The new evidence opens automatically after you commit Part A. No unlock code is required. Your initial reasoning stays saved and read-only. The sequence is designed to preserve your first judgment; it is not a secure examination system.
Identity
Loaded from the entry page. Drafts are separated by Student ID in this browser.
Submission details
Check the current deadline and submission instructions in the LMS.
2 · PART A · 20 MINUTES
Assessed scenario · fictional teaching case
A fictional lab-booking application reuses a component with reserve(roomId, duration). The caller supplies duration in minutes. The component documentation defines duration in seconds, requires 1 ≤ duration ≤ 7200, and says an accepted call returns a reservation identifier. A thin adapter currently forwards both arguments unchanged. A sample call using duration = 30 returns an identifier. No test has checked the stored end time or invalid-input behavior. Recommend whether to use, adapt or replace the component for a limited pilot.
Aim for 300–450 focused words overall. Use a small table or clear notation for the chapter artifact. No code or external experiment is required. Cite at least one relevant Chapter 16 unit/title or source page supporting your artifact and mechanism.
A1 · FIT · 1 POINT
Separate the syntactic match from the semantic mismatch. Name the provides service and one caller obligation.
A2 · CONTRACT · 1 POINT
Write a precondition and postcondition in clear notation or OCL-style form. Specify the adapter conversion and give one boundary/invalid-input test with an expected observable result.
A3 · BOUND · 1 POINT
State the input range and documented behavior your recommendation relies on. Name the unanswered error-handling question.
A4 · ACT + EVIDENCE · 1 POINT
Choose use, adapt, replace or hold. Name the integration owner and evidence required to check the contract after composition.
Name the relevant test/log/audit, the conditions it must cover, who checks it, and what evidence is still missing. Do not describe requested evidence as if it already exists.
Commit is not LMS submission. Confirmation freezes FIT, CONTRACT, BOUND, ACT and EVIDENCE before the new information appears.