X842: Using Paramters 2

For this problem assume you have access to a Person class defined here:


public class Person{
  public String name;
  private int age;

  public void setAge(int a){
    age = a;
  }

  public void setName(String n){
    name = n;
  }
}

Below you've been given a method and a Person object has been created. Using the methods defined above, set age to 35 and name to "Carl".

Your Answer:

Feedback

Your feedback will appear here when you check your answer.