AllExam Dumps

DUMPS, FREE DUMPS, VCP5 DUMPS| VMWARE DUMPS, VCP DUMPS, VCP4 DUMPS, VCAP DUMPS, VCDX DUMPS, CISCO DUMPS, CCNA, CCNA DUMPS, CCNP DUMPS, CCIE DUMPS, ITIL, EXIN DUMPS,


READ Free Dumps For Oracle- 1z0-851





Question ID 3909

Given:
11.    public class Rainbow {
12.    public enum MyColor {
13.    RED(0xff0000), GREEN(0x00ff00), BLUE(0x0000ff);
14.    private final int rgb;
15.    MyColor(int rgb) { this.rgb = rgb; }
16.    public int getRGB() { return rgb; }
17.    };
18.    public static void main(String[] args) {
19.    // insert code here
20.    }
21.    }
Which code fragment, inserted at line 19, allows the Rainbow class to compile?
 

Option A

A.    MyColor skyColor = BLUE;
 

Option B

B.    MyColor treeColor = MyColor.GREEN;
 

Option C

C.    if(RED.getRGB() < BLUE.getRGB()) { }
 

Option D

D.    Compilation fails due to other error(s) in the code.
 

Correct Answer B
Explanation


Question ID 3910

A company that makes Computer Assisted Design (CAD) software has, within its application, some utility classes that are used to perform 3D rendering tasks. The company's chief scientist has just improved the performance of one of the utility classes' key rendering algorithms, and has assigned a programmer to replace the old algorithm with the new algorithm. When the programmer begins researching the utility classes, she is happy to discover that the algorithm to be replaced exists in only one class. The programmer reviews that class's API, and replaces the old algorithm with the new algorithm, being careful that her changes adhere strictly to the class's API. Once testing has begun, the programmer discovers that other classes that use the class she changed are no longer working properly. What design flaw is most likely the cause of these new bugs?
 

Option A

A.    Inheritance
 

Option B

B.    Tight coupling
 

Option C

C.    Low cohesion
 

Option D

D.    High cohesion
 

Correct Answer B
Explanation

Send email to admin@getfreedumps for new dumps request!!!