Sign In
Ask Question
Azul Powers
Computers & Technology
29 October, 20:40
Where might the Null Object pattern be useful?
+1
Answers (
1
)
Serena Spears
29 October, 20:51
0
Answer: Null Object pattern be useful when the absence of an object can be encapsulated by other alternatives which does not have any have any effect.
Explanation:
public interface Rectangle {
double area ();
double surfaceare ();
boolean isNull ();
}
In the code above we have a function for null object. So in the absence of an object we have encapsulated with a method of null which does not do anything. It simplifies the use of dependencies that can be undefined.
In case of collaborator the NULL object pattern makes use of the existing collaboration instead of defining a new one.
It also enable to abstract the handling of null objects from the client so that internal details of the program are not know to outsiders.
Comment
Complaint
Link
Know the Answer?
Answer
Not Sure About the Answer?
Find an answer to your question 👍
“Where might the Null Object pattern be useful? ...”
in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers
You Might be Interested in
Elizabeth uses various networking sites. Which network makes her more vulnerable to privacy-related risks?
Answers (1)
declare and initialise a variable called 'initial' that will hold the first letter of your name in java
Answers (1)
Which is a common problem caused by the widespread use of computers?
Answers (1)
A link, as seen in an email, will always take you to exactly where the text says it will.
Answers (1)
When the continue statement is encountered in a loop, all the statements in the body of the loop that appear after it are ignored, and the loop prepares for the next iteration.
Answers (1)
New Questions in Computers & Technology
What screen enables you to customize how files will be saved on your computer? a. Save Options b. Word Options c. Save As Options d. Auto Options
Answers (1)
Arrange the following storage media in descending order of storage capacity:Zip disk, a standard floppy disk, a compact disc, 123, 321,132, 312
Answers (1)
Jacob wants to be a Steamfitter. He just finished his associate's degree. Which best describes what he should do next? A. Get a bachelor's degree. B. Do a three - to five-year apprenticeship. C. Get a master's degree. D.
Answers (2)
what is the difference between a packet filtering firewall and a dynamic stateful inspection firewall?
Answers (1)
What is another name for maize?
Answers (1)
Home
»
Computers & Technology
» Where might the Null Object pattern be useful?
Sign In
Sign Up
Forgot Password?