Which statement is true?

Given:
20. public class CreditCard {
21.
22. private String cardID;
23. private Integer limit;
24. public String ownerName;
25.
26. public void setCardInformation(String cardID,
27. String ownerName,
28. Integer limit) {
29. this.cardID = cardID;
30. this.ownerName = ownerName;
31. this.limit = limit;
32. }
33. }
Which statement is true?

Given:
20. public class CreditCard {
21.
22. private String cardID;
23. private Integer limit;
24. public String ownerName;
25.
26. public void setCardInformation(String cardID,
27. String ownerName,
28. Integer limit) {
29. this.cardID = cardID;
30. this.ownerName = ownerName;
31. this.limit = limit;
32. }
33. }
Which statement is true?

A.
The ownerName variable breaks encapsulation.

B.
The class is fully encapsulated.

C.
The cardID and limit variables break polymorphism.

D.
The code demonstrates polymorphism.

E.
The setCardInformation method breaks encapsulation.



Leave a Reply 0

Your email address will not be published. Required fields are marked *