25-Comp-A6 Software Engineering · December 2013
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
National Exams — December 2013 — 98-Comp-A6 Software Engineering. Three-hour, closed-book exam, no calculator permitted. Format: nine questions, candidates answer any five of the nine (all questions equal weight — each of the five counted questions is worth 20%; only the first five questions as they appear in the answer book are marked). All nine questions are solved below for completeness.
Reference texts: Sommerville, Software Engineering (10th ed., Pearson) — software process models, object-oriented and function-oriented design, requirements engineering, software testing, software reuse, rapid development and prototyping, client-server architectures, software validation; Pressman, Software Engineering: A Practitioner's Approach (9th ed.) — supplementary process, testing and architecture coverage; Gamma, Helm, Johnson & Vlissides, Design Patterns — object-oriented design/reuse vocabulary.
Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.
The date-book decomposes into an interaction function, a data-integrity function, a scheduling function, persistent storage, and a background notification function — a straightforward pipeline from "user enters an appointment" through to "system reminds the user of it."
The User Interface function accepts new/edited appointment entries and answers queries (e.g. "show today's appointments," "show next week"). Every candidate entry first passes through the Appointment Validator, which checks it for basic integrity — a valid date, a valid time, a non-negative duration, and a non-empty description — before it is allowed further into the system. A validated entry then passes to the Scheduler / Conflict Check function, which compares the candidate's date/time/duration window against every appointment already held in the Appointment Store for that day and flags an overlap back to the user (who may still choose to accept a double-booking). Accepted entries are written to the Appointment Store, which is the single persistent record of all appointments and answers the UI's query requests directly. Independently of user interaction, the Reminder / Alarm Notifier runs continuously (or on a periodic timer) scanning the store for appointments whose reminder time has arrived and raises an alert to the user.