nerdexam
Microsoft

98-372 · Question #21

An object that is used to follow the definition of a class is known as what?

The correct answer is C. Instance of that class. An object that is used to follow the definition of a class is said to be an INSTANCE of that class. An instance is a copy of an object whether presently executing or not. An instance of a class sharing identical set of attributes however will vary in what those attributes hold. F

Understanding Namespaces and Classes

Question

An object that is used to follow the definition of a class is known as what?

Options

  • AChild of that class
  • BWorker of that class
  • CInstance of that class
  • DAttribute of that class

How the community answered

(33 responses)
  • A
    6% (2)
  • B
    3% (1)
  • C
    73% (24)
  • D
    18% (6)

Explanation

An object that is used to follow the definition of a class is said to be an INSTANCE of that class. An instance is a copy of an object whether presently executing or not. An instance of a class sharing identical set of attributes however will vary in what those attributes hold. For example, a class "Manager" will describe the attributes common to all instances of the Manager class. For the purpose of the task being solved, the Manager objects may be identical but vary in attributes such as "name" and "salary". The description of the class will list such attributes and define the operations/actions relevant for the class, such as "increase salary" or "change Address". One might then talk about one instance of the Manager object with name = "Allen Ryan" and another instance of the Manager object with name = "Allen Smith". Answer: D is incorrect. An attribute is a data element that exists in every object of a class. It is represented by a specific value in each object. Attributes have no identity outside the object to which they belong. Attributes are controlled by those objects of which they are a part. An attribute is a role that a property takes. An attribute represents a data definition for an instance of a classifier. It describes a range of values for that data definition. A classifier can have any number of attributes or none at all. Attributes describe the structure and value of an instance of a class. Each attribute is described by its name.

Topics

#class instance#object#class definition#OOP

Community Discussion

No community discussion yet for this question.

Full 98-372 Practice