GACE Computer Science - independent content foundations study materials
GACE Computer Science - independent content foundations study resources

GACE Computer Science - independent content foundations: Programming and Software Development

GACE Computer Science - independent content foundations · Work through your exam, one topic at a time.

All guide sections

Programming and Software Development

This shared-core programming guide covers language constructs, object-oriented design, development processes, and testing. Practice reading and debugging code: predict output, identify a scope or logic error, and choose tests that expose faults. These are independent exercises rather than a claim about a particular examination’s question distribution.

Constructs and control flow

Variables have type, scope, and lifetime. Local variables exist inside a block or function; parameters receive arguments; global variables are visible more broadly and increase coupling. Value parameters copy the argument; reference parameters can modify the caller's object. Control flow uses sequence, selection, and iteration. Recursion needs a base case and progress toward it; each call adds a stack frame. Short-circuit evaluation means A AND B skips B when A is false; A OR B skips B when A is true.

OOP and process

Encapsulation hides internal state behind methods; inheritance extends a class; polymorphism lets one interface dispatch to different implementations. Overloading is same-name methods with different signatures; overriding replaces an inherited method. The SDLC includes requirements, design, implementation, testing, deployment, and maintenance. Unit tests isolate small units, integration tests combine them, system tests check the whole product, and acceptance tests check user needs. Regression tests confirm changes did not break existing behavior. Version control tracks changes and enables branching and merging.

Worked example

Trace function f(n): if n <= 1 return 1; otherwise return n * f(n-1). f(4) = 4 * f(3) = 4 * 3 * f(2) = 4 * 3 * 2 * f(1) = 24. The base case stops recursion; without it the calls continue until stack overflow. The function computes factorial, and its running time is O(n) calls with O(n) stack depth.

Traps that cost marks

Confusing assignment = with equality ==; integer division following the explicitly specified language’s rounding rule; assuming a loop runs one more or fewer time because of < versus <=; mutating a list while iterating over it; and thinking pass-by-value can swap caller variables in languages that copy primitives.