You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
516 B
26 lines
516 B
using System;
|
|
|
|
namespace ClassLib000.TestModel
|
|
{
|
|
public class Car
|
|
{
|
|
private const int MaxAge = 20;
|
|
public string PlateNumber;
|
|
public string Color;
|
|
public int AgeYears = default(int);
|
|
private bool AgedEnough = false;
|
|
|
|
public void PassYear()
|
|
{
|
|
if (!AgedEnough)
|
|
{
|
|
this.AgeYears++;
|
|
}
|
|
if (AgeYears > MaxAge)
|
|
{
|
|
AgedEnough = true;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|