Which statement best describes a class?
Explanation
A class describes what information objects of that class can store and what actions they can perform. It is the plan rather than the thing built from the plan, in the same way that a blueprint describes a kind of building without being the building.
- B is not correct: one specific object with stored data is an instance of a class, such as the building named
"North Hall", rather than the definition every such object is built from. - C is not correct: a single attribute value is one piece of data an object knows about itself, while a class describes which attributes every object of that kind can store.
- D is not correct: a method call asks an object to perform a behavior, which Topic 1.14 covers; a class instead defines the kind of object that receives such a call.