using IO = System.Console;
public const int minVotingAge = 18;
public void setAge(int age)
public int getAgeIncrementedBy(int years)
public int getYearsUntilCanVote()
if (this.age >= Person.minVotingAge) { return 0; }
return Person.minVotingAge - this.age;
string output = name + " is " + age + " years old ";
if (this.getYearsUntilCanVote() == 0)
output += "and is able to vote.";
output += "and will be able to vote in " + this.getYearsUntilCanVote() + " years.";
Person personOne = new Person();
IO.WriteLine( personOne.name );
IO.WriteLine( personOne.getAge() );
Person personTwo = new Person();
IO.WriteLine( personTwo.name );
IO.WriteLine( personTwo.getAge() );