get { return empBenefits; }
set { empBenefits = value; }
}
...
}
In the following updated Main() method, notice how we can interact with the internal
BenefitsPackage type defined by the Employee type:
static void Main(string[] args)
{
Console.WriteLine("***** The Employee Class Hierarchy *****\n");
Manager chucky = new Manager("Chucky", 50, 92, 100000, "333-23-2322", 9000);
double cost = chucky.GetBenefitCost();
Console.ReadLine();
}
Do'stlaringiz bilan baham: