HSC Software Engineering study materials
HSC Software Engineering study resources

HSC Software Engineering: Structured and Object-Oriented Programming Concepts

HSC Software Engineering · Work through your exam, one topic at a time.

All guide sections

Structured and Object-Oriented Programming Concepts

Structured programming uses sequence, selection, and iteration to control flow, emphasising modularity through functions and procedures. Object-oriented programming (OOP) organises code around objects that encapsulate state (attributes) and behaviour (methods). Candidates must understand the four pillars: encapsulation (hiding internal state, exposing interfaces), inheritance (deriving new classes from existing ones), polymorphism (same interface, different implementations), and abstraction (focusing on essential features). Know the difference between a class (blueprint) and an object (instance). Traps include confusing overloading (same method name, different parameters, compile-time) with overriding (same signature, subclass redefines, run-time). Also, know that inheritance creates an 'is-a' relationship, while composition creates a 'has-a' relationship. Access modifiers (private, protected, public) control visibility; private members are not inherited directly. A worked example: consider a class Shape with a method area(); subclasses Circle and Rectangle override area(). Calling area() on a Shape reference that points to a Circle executes Circle's version-this is polymorphism. Rule of thumb: if a subclass cannot substitute for its superclass without breaking behaviour, inheritance is misused; prefer composition. Also, structured programming avoids goto statements to improve readability.