Which of the following terms applies to a class (type definition) rather than to a specific object (instance)?

Difficulty: Easy

Correct Answer: Scope

Explanation:


Introduction / Context:
Object-oriented terminology distinguishes between class-level concepts (apply to the type) and object-level concepts (apply to instances). Understanding what belongs to the class vs. the object helps clarify design and code organization.



Given Data / Assumptions:

  • Classes define structure and behavior shared by instances.
  • Objects (instances) hold specific state and respond to operations defined by the class.
  • Some properties like visibility or scope are determined at the class level.


Concept / Approach:
“Scope” refers to where a name (attribute/method) is visible and whether a member is class-wide (static) or instance-specific. Scope is defined by the class and language rules, not by any individual object. In contrast, queries/updates are operations typically invoked on instances; constructors are invoked to create instances but conceptually belong to the class's definition of how to instantiate.



Step-by-Step Solution:

Identify which choice is inherently class-level.Recognize that query/update are instance-level behaviors (though classes may define them).Constructor is defined on the class but is operationally about creating an instance; “scope” is purely class/type-level semantics governing members.


Verification / Alternative check:
Language keywords like static/class and access modifiers (public/private/protected) define scope at the class level; objects do not define scope.



Why Other Options Are Wrong:
Query/Update are domain operations most often executed on specific instances (or class methods but still not primarily a “class property”).
Constructor is a class member but commonly treated as the mechanism to create objects rather than a property applying to the class itself.



Common Pitfalls:
Confusing “constructor” as the answer; while defined in the class, the question asks what applies to a class rather than an object as a concept—scope is more precise.



Final Answer:
Scope

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion