20 Further programming - Cambridge AS & A Level Class 12 Computer Science Notes, Diagrams and Solved Questions
Programming paradigms: low-level code with immediate, direct, indirect, indexed and relative addressing; object-oriented programming with classes, encapsulation, inheritance, polymorphism and containment; declarative facts, rules and goals; text, serial, sequential and random file processing; and exception handling.
In this chapter
What a programming paradigm is: low-level, imperative, object-oriented and declarative
Writing and tracing low-level code with immediate, direct, indirect, indexed and relative addressing
Classes, objects, attributes, methods, constructors, encapsulation, getters and setters
Inheritance, polymorphism and containment, and designing classes for a problem
Writing facts and rules and satisfying goals in a declarative language
Opening, reading, writing, appending and closing text files
Serial, sequential and random files, including reading and writing records
Exceptions, why handling them matters, and writing exception-handling code