Nivaar Exam Prep

25-Comp-B11 Advanced Software Design · May 2016

Question 19 of 28: Separating Boundary from Entity/Control Classes

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer) · Last updated

Notes on this paper

Reference texts: Sommerville, Software Engineering (10th ed., Pearson) — software processes, requirements engineering, agile methods, design principles, dependability; Pressman, Software Engineering: A Practitioner's Approach (9th ed.) — supplementary process and quality coverage; Gamma, Helm, Johnson & Vlissides (GoF), Design Patterns: Elements of Reusable Object-Oriented Software — creational/structural/behavioural pattern catalogue (Singleton, Proxy, Template Method, Observer, etc.); Sebesta, Concepts of Programming Languages (12th ed.) — polymorphism, dynamic binding, inheritance and language-level object semantics; Bertrand Meyer, Object-Oriented Software Construction — design by contract, preconditions/postconditions/invariants, the open–closed principle; Barbara Liskov's 1987 substitutability paper for Question 11; Rogers, Sharp & Preece, Interaction Design, and Nielsen, Usability Engineering, for Question 21's HMI-specific non-functional requirements; Myers, The Art of Software Testing, for Question 28's boundary value analysis.

PART I — General Principles

Question 19: Separating Boundary from Entity/Control Classes (Part IV)

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.

Boundary classes model the interface between the system and its actors (a screen, an API endpoint, a device driver) and are, by their nature, VOLATILE — they change whenever the presentation technology changes (a new UI toolkit, a new device, a redesigned screen layout, localizing for a new market) even when the underlying business logic and data are completely unchanged.

Keeping Boundary separate from Entity (persistent domain data) and Control (use-case orchestration logic) confines presentation-layer churn to the Boundary classes alone, and it never forces changes to Entity/Control classes; conversely, business-rule changes never force a UI rewrite.

Impact of NOT separating (business logic embedded directly inside GUI event handlers):

This is exactly the requirements-analysis-level rationale underlying both Question 4 (actor vs. class independence) and Question 18 (MVC's View/Model split) — the Boundary/Control/Entity pattern is the general responsibility-assignment principle both of those questions are specific instances of.