Question 6 of 163

A class named Manager is derived from a parent class named Employee. The Manager class includes characteristics that are unique to managers.
Which term is used to describe this object-oriented concept?
Answer

Suggested Answer

The suggested answer is C.

The term used to describe a class derived from a parent class, inheriting the characteristics of the parent while adding its unique characteristics, is Inheritance. In this scenario, the Manager class inherits properties and behaviors from the Employee class, which illustrates the concept of inheritance in object-oriented programming. Encapsulation involves restricting access to certain components, Data modeling is related to the organization of data, and Data hiding is a subset of encapsulation focused on concealing internal object details, none of which accurately describe the relationship mentioned in the question.

Community Votes

No votes yet

Join the discussion to cast yours

Question 7 of 163

Which term is used to describe a class that inherits functionality from an existing class?
Answer

Suggested Answer

The suggested answer is C.

A class that inherits functionality from an existing class is referred to as a 'derived class'. The derived class, sometimes also known as a child class or subclass, inherits the properties and methods of the base class, allowing it to extend or modify the behavior of the base class as needed.

Community Votes

No votes yet

Join the discussion to cast yours

Question 8 of 163

Two classes named Circle and Square inherit from the Shape class. Circle and Square both inherit Area from the Shape class, but each computes Area differently.
Which term is used to describe this object-oriented concept?
Answer

Suggested Answer

The suggested answer is A.

Community Votes

No votes yet

Join the discussion to cast yours

Question 9 of 163

You create an object of type ANumber. The class is defined as follows.
Exam 98-361: Question 9 - Image 1
What is the value of _number after the code is executed?
Answer

Suggested Answer

The suggested answer is C.

The class ANumber has a private member variable _number which is initialized to 7. The class has two constructors: a default constructor that does nothing and an overloaded constructor that takes an integer parameter and assigns its value to _number. When the statement ANumber mynumber = new ANumber(3); is executed, it calls the overloaded constructor with 3 as an argument, which sets the value of _number to 3. Therefore, after the code is executed, the value of _number is 3.

Community Votes

No votes yet

Join the discussion to cast yours

Question 10 of 163

You need to allow a consumer of a class to modify a private data member.
What should you do?
Answer

Suggested Answer

The suggested answer is C.

Community Votes

No votes yet

Join the discussion to cast yours