EMERGING TRENDS IN SOFTWARE ENGINEERING
MISCELLANEOUS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
Recall that the null object pattern performs a no-op at each method call where null would otherwise be dereferenced. One advantage is that this is more efficient than checking, at each method invocation, whether the receiver ( the this object on which the method is being invoked) is null.
|
True
|
|
False
|
|
Either A or B
|
|
None of the above
|
Explanation:
Detailed explanation-1: -Software Engineering C++ design pattern The Null object pattern is a design pattern that handles null references. Null objects can arise in a program and it is usually handled as a special case which is unnecessarily adds a test case.
Detailed explanation-2: -The null object pattern provides a non-functional object in place of a null reference and therefore allows methods to be called on it. So, for some invalid input to the method GetMobileByName, our MobileRepository would return an instantiated, yet null, IMobile object in place of a null reference.
There is 1 question to complete.