Multiple choice java

public class CreditCard {
 private String cardID;
 private Integer limit;
 public String ownerName;
 public void setCardInformation(String cardID, String ownerName, Integer limit) {
  this.cardID = cardID;
  this.ownerName = ownerName;
  this.limit = limit;
 }
}

Which statement is true?

  1. The class is fully encapsulated

  2. The code demonstrates polymorphism

  3. The ownerName variable breaks encapsulation

  4. The cardID and limit variables break polymorphism

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Proper encapsulation requires all fields to be private with controlled access through methods. The ownerName field is public, breaking encapsulation. CardID and limit are correctly private. Option A is wrong (not fully encapsulated). Option B is wrong (no polymorphism shown). Option D is wrong (private fields don't break polymorphism).