Valid 1Z0-804 Dumps shared by ExamDiscuss.com for Helping Passing 1Z0-804 Exam! ExamDiscuss.com now offer the newest 1Z0-804 exam dumps, the ExamDiscuss.com 1Z0-804 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com 1Z0-804 dumps with Test Engine here:
Given these facts about Java classes in an application: - Class X is-a Class SuperX. - Class SuperX has-a public reference to a Class Z. - Class Y invokes public methods in Class Util. - Class X uses public variables in Class Util. Which three statements are true?
Correct Answer: B,D,E
Explanation/Reference: Explanation: B: Has class Util has both public methods and variables, it is an example of weak encapsulation. Note:Inheritance is also sometimes said to provide "weak encapsulation," because if you have code that directly uses a subclass, such as Apple, that code can be broken by changes to a superclass, such as Fruit. One of the ways to look at inheritance is that it allows subclass code to reuse superclass code. For example, if Apple doesn't override a method defined in its superclass Fruit, Apple is in a sense reusing Fruit's implementation of the method. But Apple only "weakly encapsulates" the Fruit code it is reusing, because changes to Fruit's interface can break code that directly uses Apple. D: Note:Tight coupling is when a group of classes are highly dependent on one another. This scenario arises when a class assumes too many responsibilities, or when one concern is spread over many classes rather than having its own class. Loose coupling is achieved by means of a design that promotes single-responsibility and separation of concerns. A loosely-coupled class can be consumed and tested independently of other (concrete) classes. Interfaces are a powerful tool to use for decoupling. Classes can communicate through interfaces rather than other concrete classes, and any class can be on the other end of that communication simply by implementing the interface. E: Not enough information regarding SuperX' to determine the level of cohesion.