Programming and Software Development
What the domain tests
Programming and Software Development tests whether you can read and trace code, apply constructs correctly, choose data structures, and explain development process, testing and maintainability. Expect pseudocode/Python-style tracing, OOP concepts, SDLC models, version control and debugging.
Core rules
- Sequence, selection and iteration are the basic control structures; recursion needs a base case and progress toward it.
- Parameters can be passed by value (copy) or by reference/object reference (alias); mutable objects can change through an alias.
- Scope determines name visibility; local variables are created on call and destroyed on return.
- OOP: encapsulation hides state, inheritance reuses behaviour, polymorphism lets one interface serve different implementations.
- Testing: unit, integration, system and acceptance; black-box vs white-box; regression tests protect against reintroduced faults.
- Version control records snapshots; commits should be small and messages meaningful.
Worked example
Trace: a = [1, 2] b = a b.append(3) c = a[:] c.append(4) print(a, b, c) Reasoning: b = a copies the reference, so append(3) changes the single list; a and b both show [1,2,3]. c = a[:] makes a shallow copy, so append(4) affects only c. Output: [1, 2, 3] [1, 2, 3] [1, 2, 3, 4]. The key is distinguishing assignment from copying.
Traps
= assigns, == compares; off-by-one errors in loops; integer division truncates in many languages; short-circuit evaluation may skip side effects; changing a list while iterating causes skipped elements; shallow copy does not copy nested objects; forgetting the base case causes stack overflow. In OOP, do not confuse overloading (same name, different parameters) with overriding (subclass replaces inherited method).