๐Ÿ›๏ธ
๐Ÿ“ Software Design & Architecture ยท ARCH-101 ยท Assignments

Software Design & Architecture โ€” Assignments

Work each problem yourself first, then open the worked solution to check your thinking. This is where the course sticks.

๐Ÿ“ 5 problemsโœ๏ธ Worked solutions
Problem 1

Describe a time code was hard to change, and what design issue caused it.

Show worked solution

A strong answer connects a real difficulty (fear of changing, ripple effects, no clear place) to a design cause (poor separation, tight coupling, duplication) - showing design is about changeability, not whether code runs.

Problem 2

Take a function that does several things and split it by concern.

Show worked solution

Good answers separate mixed responsibilities (e.g. validation, logic, storage, presentation) into focused pieces each with one reason to change, explaining the single-responsibility benefit.

Problem 3

Model something with states (an order, a game) as a state machine.

Show worked solution

Strong answers identify the states, the events, and the legal transitions, and explain why this beats boolean flags (exactly one state, illegal moves impossible, clear logic).

Problem 4

Show how events would decouple a piece of code that directly calls several others.

Show worked solution

Good answers replace direct calls with announcing an event that independent listeners subscribe to, explaining the reduced coupling (the source no longer depends on the reactions) and when to use it.

Problem 5

Explain YAGNI and give an example of over-engineering to avoid.

Show worked solution

Strong answers explain not building flexibility for needs that don't exist yet, give a concrete speculative-complexity example, and state the balance: start simple, add structure when a real need demonstrates it.

More in this course

Course home → · Browse all courses →