单项选择题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 OO principles will they be promoting?()

A.Looser coupling
B.Tighter coupling
C.Lower cohesion
D.Higher cohesion
E.Weaker encapsulation
F.Stronger encapsulation


您可能感兴趣的试卷

你可能感兴趣的试题

1.多项选择题

Given:

 

Which two code fragments, inserted independently at line 13, will compile?()

A.super(name, baseSalary);
B.this.commission = commission;
C.super();this.commission = commission;
D.this.commission = commission;super();
E. super(name, baseSalary);this.commission = commission;
F.this.commission = commission;super(name, baseSalary);
G.super(name, baseSalary, commission);

2.多项选择题

Given:
Which four code fragments, inserted independently at line 7, will compile?()

A.public void m1() { }
B.protected void m1() { }
C.private void m1() { }
D.void m2() { }
E.public void m2() { }
F.protected void m2() { }
G.private void m2() { }

4.单项选择题Which Man class properly represents the relationship "Man has a best friend who is a Dog"?()

A.class Man extends Dog { }
B.class Man implements Dog { }
C.class Man { private BestFriend dog; }
D.class Man { private Dog bestFriend; }
E.class Man { private Dog<bestFriend>; }
F.class Man { private BestFriend<dog>; }

10.单项选择题

Given:

Which exception or error will be thrown when a programmer attempts to run this code?()

A.java.lang.StackOverflowError
B.java.lang.IllegalStateException
C.java.lang.ExceptionInInitializerError
D.java.lang.ArrayIndexOutOfBoundsException