Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started