Full Marks

A-level Computer Science Year 12 · Topic 14

Software development and programming paradigms

Software development and programming paradigms is about how programs are designed, built and maintained.

We will compare programming paradigms and levels of language, and development methodologies from waterfall to agile.

Then we look at testing strategies, evaluation, maintenance, and the tools in an integrated development environment.

In this topic

  1. 14.1Programming paradigms and levels of language: procedural, modular, object-oriented, low-level and high-levelFree below · 38 questions
  2. 14.2Development methodologies: waterfall, spiral and the analysis, design, implementation, testing cycleOpen in Full Marks · 31 questions
  3. 14.3Agile methods, extreme programming and rapid application developmentOpen in Full Marks · 30 questions
  4. 14.4Testing strategies, evaluation and software maintenanceOpen in Full Marks · 43 questions
  5. 14.5IDEs and program development toolsOpen in Full Marks · 31 questions

14.1 · Free notes

Programming paradigms and levels of language: procedural, modular, object-oriented, low-level and high-level

Diagram: Programming paradigms and levels of language: procedural, modular, object-oriented, low-level and high-level

Key points

In more detail

Practice

Programming paradigms and levels of language: procedural, modular, object-oriented, low-level and high-level: 10 questions

Pick an answer to check it, or open the answer for the explanation.

1. Which paradigm models a program as a set of objects, each combining data and the methods that act on that data?

  1. Assembly
  2. Procedural
  3. Object-oriented
  4. Modular
Show answer

C: Object-oriented. Object-oriented programming bundles attributes (data) and methods (behaviour) into objects created from classes. Procedural and modular approaches organise code into subroutines instead.

2. A programmer splits a 5000-line program into separate subroutines, each doing one task and tested on its own. Which approach is this?

  1. Machine-code programming
  2. Encapsulation
  3. Modular programming
  4. Polymorphism
Show answer

C: Modular programming. Modular programming divides a program into independent modules/subroutines with single tasks, which can be tested separately and reused.

3. In object-oriented programming, what is a class?

  1. A list of private variables only
  2. A blueprint defining the attributes and methods of objects
  3. A subroutine that always returns a value
  4. A single running instance holding its own data
Show answer

B: A blueprint defining the attributes and methods of objects. A class is a template; objects are instances created from it. Each object holds its own attribute values, using methods defined in the class.

4. A Dog class is built on an Animal class and reuses its attributes and methods. Which OOP concept is this?

  1. Inheritance
  2. Instantiation
  3. Polymorphism
  4. Encapsulation
Show answer

A: Inheritance. Inheritance lets a subclass acquire attributes and methods from a superclass, giving code reuse. Instantiation is creating an object from a class.

5. Making attributes private and letting other code reach them only through public methods is called what, and why is it useful?

  1. Polymorphism; it speeds up execution
  2. Inheritance; it allows code reuse
  3. Instantiation; it creates new objects
  4. Encapsulation; it protects data from accidental change
Show answer

D: Encapsulation; it protects data from accidental change. Encapsulation hides an object's internal data and exposes controlled methods, so values cannot be changed accidentally or set to invalid values.

6. Which statement about assembly language is correct?

  1. Each mnemonic generally translates to one machine instruction
  2. It needs no translation before running
  3. It is translated by an interpreter only
  4. It runs unchanged on any processor
Show answer

A: Each mnemonic generally translates to one machine instruction. An assembler translates mnemonics into machine code, usually one-to-one. Assembly is processor-specific, so it is not portable.

7. Which program is most likely to be written in a low-level language?

  1. A spreadsheet macro
  2. A school timetable application
  3. A driver for a microcontroller with only 2 KiB of RAM
  4. A website booking form
Show answer

C: A driver for a microcontroller with only 2 KiB of RAM. Tiny memory and direct hardware control suit assembly/low-level code. The other tasks are better served by high-level languages for faster development.

8. Which is an advantage of high-level languages over assembly language?

  1. One statement maps to exactly one instruction
  2. They give direct control of registers
  3. They always produce smaller, faster code
  4. They are portable across different processor types
Show answer

D: They are portable across different processor types. High-level code is portable (it is translated for each processor) and easier to write and maintain. It gives less hardware control, and one statement becomes many instructions.

9. A 16-bit machine-code instruction has a 4-bit opcode and a 12-bit operand. What is the maximum number of different operations?

  1. 16
  2. 256
  3. 12
  4. 4
Show answer

A: 16. A 4-bit opcode gives 2^4 = 16 different bit patterns, so at most 16 operations. The 12-bit operand gives 4096 possible addresses or values.

10. A team of 20 builds a large GUI application with many related entities such as customers, accounts and orders. Which paradigm is most suitable?

  1. A single huge procedure
  2. Assembly language
  3. Object-oriented
  4. Machine code
Show answer

C: Object-oriented. OO models real-world entities as classes, supports team working through encapsulation, and allows reuse through inheritance. This suits large, complex systems.

Keep going in Full Marks

Full Marks has 38 questions on Programming paradigms and levels of language: procedural, modular, object-oriented, low-level and high-level (28 more than here), set out in practice levels. You also get notes and 3D models for all 5 subtopics of Software development and programming paradigms, plus games, timed exams and past papers.

On your exam board

All A-level Computer Science Year 12 topics