// Sample Solution
///////////////////////////////////////////////////
// Forest.cs code
using System;
namespace BasicClasses
{
class Forest
{
public int age;
public string biome;
public string Name { get; set; }
public int Trees { get; set; }
public string Biome
{
get { return biome; }
set
{
if (value == "Tropical" ||
value == "Temperate" ||
value == "Boreal")
{
biome = value;
}
else
{
biome = "Unknown";
}
}
}
}
}
No comments:
Post a Comment