Skip to content

Object-Oriented Programming (OOP)

The following statement describes a specific concept. What is it called? a contract that defines a set of methods a class must implement without specifying how.

Difficulty: Hard

About this MCQ

This Hard Object-Oriented Programming (OOP) MCQ checks one syllabus fact.

The question is: “The following statement describes a specific concept. What is it called? a contract that defines a set of methods a class must implement without specifying how.”

The accepted answer is A. Interface. The following statement describes a specific concept What is it called a contract that defines a set of methods a class must implement without specifying how is answered by Interface option A Option B This self keyword does not match the stem it is a near-miss used to catch incomplete recall of Interface Option C Method overriding does not match the stem it is a near-miss used to catch incomplete recall of Interface Remaining alternatives Abstraction fall outside the same rule and should be eliminated once Interface is identified Object-Oriented Programming OOP questions of this type reward precise definitions rather than approximate associations Object-Oriented Programming OOP recall of this distinction is a regular item in FPSC PPSC NTS and CSS.

Correct answer

A. Interface

Explanation

The following statement describes a specific concept What is it called a contract that defines a set of methods a class must implement without specifying how is answered by Interface option A Option B This self keyword does not match the stem it is a near-miss used to catch incomplete recall of Interface Option C Method overriding does not match the stem it is a near-miss used to catch incomplete recall of Interface Remaining alternatives Abstraction fall outside the same rule and should be eliminated once Interface is identified Object-Oriented Programming OOP questions of this type reward precise definitions rather than approximate associations Object-Oriented Programming OOP recall of this distinction is a regular item in FPSC PPSC NTS and CSS.

Source: Object-Oriented Programming (OOP) Official Reference Guide

Tags: computer science, oop, object-oriented programming, software design

Submitted by: MCQsHub Editorial

Related MCQs

More Object-Oriented Programming (OOP) MCQs