Question: is my answer correct? Given the following code: public class person { private int age; private string status; private string name; public Person ( )
is my answer correct?
Given the following code:
public class person
private int age;
private string status;
private string name;
public Person
this.status "young";
this. age ;
this. name "Unnamed Person";
public int getage
return this.age;
public string getName
return
this.name;
public void setNameString name
this. name name;
public void getolderByYearsint years
this.age this age years;
if thisage
this.status "old";
Part
Which of the following clauses should be included in the specification of the constructor for the Person
class?
a MODIFIES
b REQUIRES
c EFFECTS
Select all possible options that apply.
Part
Which of the following clauses should be included in the specification of the setwame method of the
Person class?
a EFFECTS
b MODIFIES
c REQUIRES
Select all possible options that apply.
Part
Which of the following clauses should be included in the specification of the getolderbyrears method of
the Person class?
a EFFECTS
b MODIFIES
c REQUIRES
Select all possible options that applyJA ASDFA.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
