A team of programmers is reviewing a proposed API for a new utility class.After some discussion, they realize that they can reduce the number of methods in the API without losing any functionality.If they implement the new design, which two principles will they be promoting?()
ALooser coupling
BTighter coupling
CLower cohesion
DHigher cohesion
EWeaker encapsulation
FStronger encapsulation
相关问题推荐
-
What is the result?()
A、 null
B、 zero
C、 some
D、 Compilation fails.
E、 An exception is thrown at runtime.
-
What is the result?()
A、 23
B、 234
C、 235
D、 2345
E、 2357
F、 Compilation fails.
-
class TestA { public void start() { System.out.println(”TestA”); } } public class TestB extends TestA { public void start() { System.out.println(”TestB”); } public static void main(String[] args) { ((TestA)new TestB()).start(); } } What is the result?()
A、 TestA
B、 TestB
C、 Compilation fails.
D、 An exception is thrown at runtime.
-
1. package foo; 2. 3. import java.util.Vector; 4. 5. private class MyVector extends Vector { 6. int i = 1; 7. public MyVector() { 8. i = 2; 9. } 10. } 11. 12. public class MyNewVector extends MyVector { 13. public MyNewVector () { 14. i = 4; 15. } 16. public static void main (String args []) { 17. MyVector v = new MyNewVector(); 18. } 19. } The file MyNewVector.java is shown in the exhibit. What is the result?()
A、 Compilation will succeed.
B、 Compilation will fail at line 5.
C、 Compilation will fail at line 6.
D、 Compilation will fail at line 14.
E、 Compilation will fail at line 17.
-
Integer i = new Integer (42); Long 1 = new Long (42); Double d = new Double (42.0); Which two expressions evaluate to True? ()
A(i ==1)
B(i == d)
C(d == 1)
D(i.equals (d))
E(d.equals (i))
F(i.equals (42))