9618/31/O/N/21 question 2: worked solution (October/November 2021, paper 31)
Show as plain textHide plain text
Cambridge A2 Level Computer Science 9618 · 20.1 Programming Paradigms Worked solution from the Further Programming Paper 3 Advanced Theory booklet, Part 1 of 2. Q2 9618/31/O/N/21 original Q2 Structured · 4 marks Worked solution Match each paradigm to the description that fits it best: Programming paradigm Description Declarative Programs that specify the desired result rather than how to get to it Imperative Programs with an explicit sequence of commands that update the program state, with or without procedure calls Low-level Programs using the instruction set of a processor Object-oriented Programs using the concepts of class, inheritance, encapsulation and polymorphism Declarative → the desired result, not how to get to it [1] Imperative → an explicit sequence of commands that update the program state [1] Low-level → the instruction set of a processor [1] Object-oriented → class, inheritance, encapsulation and polymorphism [1] The description about events and user actions is not used. KEY IDEA Each paradigm has one defining feature: declarative states the result, imperative gives commands, low-level uses processor instructions, OOP uses classes. TOTAL 4 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by qiphyedu. Tap the picture to open it on YouTube.