Пример #1
0
        static void Main(string[] args)
        {
            Employee tony = new Employee();

            tony.Income         = 1500000;
            tony.YearsOfService = 8;
            tony.SetRating(Employee.Rating.excellent);
            tony.CalculateRaise();
        }
Пример #2
0
        static void Main(string[] args)                // Main driver to run program
        {
            Employee tony = new Employee();            // instantiate new object employee

            tony.Income         = 150000;              // Set the employee property:: income(150k) to tony
            tony.YearsOfService = 8;                   // Set the employee property :: years of service(8) to tony
            tony.SetRating(Employee.Rating.excellent); // Set the method SetRating with enum parameters to tony
            tony.CalculateRaise();                     // Tony object calls the method Calculate raise
        }