Multiple choice technology programming languages

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 access controlled through getters and setters. The ownerName field is declared public, allowing direct external access and modification - this breaks encapsulation regardless of the setter method's presence.