Skip to content
Information Technology Question 5.4.1

Information Technology Grade 12 · NSC September 2025 P2 (Eastern Cape)

Differentiate between an accessor method and a mutator method.

Eastern Cape DoE September 2025 2 marks (2) Object-Oriented Programming (OOP) Term 1

About this question

Question 5.4.1 of Information Technology Grade 12 Paper 2, NSC Preparatory Examination (Eastern Cape DoE, September 2025). It tests the Term 1 ATP topic Object-Oriented Programming (OOP).

  • TermTerm 1
  • ATP topicObject-Oriented Programming (OOP)
  • PaperPaper 2
  • Marks2 marks
UML class diagram: TInspection
UML class diagram of class TInspection
Answer
2 marks

An accessor method retrieves the value of an instance variable.

A mutator method changes the value of an instance variable.

Study this in your textbook: CAPS Annual Teaching Plan, Grade 12, Term 1: Databases, OOP & PAT Phase 1.

More Questions On Object-Oriented Programming (OOP)

NSC September 2025 P2 (Eastern Cape) Object-Oriented Programming (OOP) (1)
  • A Encapsulation allows direct access to object attributes.
  • B Encapsulation is about restricting access to the methods of an object.
  • C Encapsulation requires all data to be public.
  • D Encapsulation is about restricting direct access to the fields of an object.
Answer

D: Encapsulation is about restricting direct access to the fields of an object.

Fields are kept private and reached only through methods.

Full answer and marking tips
NSC September 2025 P2 (Eastern Cape) Object-Oriented Programming (OOP) (1)
Answer

StringGrid (a Memo or RichEdit also works).

Full answer and marking tips
NSC September 2025 P2 (Eastern Cape) Object-Oriented Programming (OOP) (1)
Answer

An algorithm is a sequence of steps that can be followed to solve a problem.

Full answer and marking tips
NSC September 2025 P2 (Eastern Cape) Object-Oriented Programming (OOP) (1)
  • A 11
  • B 14
  • C 13
  • D 10
Answer

C: 13

Floor(10.4) = 10 and 19 DIV 4 = 4, so 10 + 6/2*4/4 = 10 + 3 = 13.

Full answer and marking tips
NSC September 2025 P2 (Eastern Cape) Object-Oriented Programming (OOP) (1)
Answer

It causes an error, because Append places the file pointer at the end and opens the file for writing only, so it cannot be read.

Full answer and marking tips
NSC September 2025 P2 (Eastern Cape) Object-Oriented Programming (OOP) (1)
Answer

The number of lines in the file is not known in advance, so a For loop cannot be set up.

Full answer and marking tips