예제 #1
0
파일: Program.cs 프로젝트: GBoh/CCweek1
        static void Main(string[] args)
        {
            //add employee 1 to full time employee
            var employee1 = new FullTimeEmployee
            {
                FirstName     = "Bill",
                LastName      = "Gates",
                YearsEmployed = 5
            };

            //checks to ensure is true
            Debug.Assert(employee1.ShowFullName() == "Bill Gates");
            Debug.Assert(employee1.YearsEmployed == 5);


            //add employee 2 to part time employee
            var employee2 = new PartTimeEmployee
            {
                FirstName      = "Steve",
                LastName       = "Jobs",
                MonthsEmployed = 2
            };

            //checks to ensure is true
            Debug.Assert(employee2.ShowFullName() == "Steve Jobs");
            Debug.Assert(employee2.MonthsEmployed == 2);
        }
예제 #2
0
        static void Main(string[] args)
        {
            FullTimeEmployee bill = new FullTimeEmployee();
            bill.FirstName = "Bill";
            bill.LastName = "Gates";
            bill.YearsEmployed = 5;

            ContractEmployee steve = new ContractEmployee();
            steve.FirstName = "Steve";
            steve.LastName = "Jobs";
            steve.MonthsEmployed = 2;

            Console.WriteLine("{0} has been employed for {1} years", bill.ShowFullName(), bill.YearsEmployed);
            Console.WriteLine("{0} has been employed for {1} months", steve.ShowFullName(), steve.MonthsEmployed);

            Console.ReadLine();
        }
예제 #3
0
        static void Main(string[] args)
        {
            FullTimeEmployee bill = new FullTimeEmployee();

            bill.FirstName     = "Bill";
            bill.LastName      = "Gates";
            bill.YearsEmployed = 5;

            ContractEmployee steve = new ContractEmployee();

            steve.FirstName      = "Steve";
            steve.LastName       = "Jobs";
            steve.MonthsEmployed = 2;

            Console.WriteLine("{0} has been employed for {1} years", bill.ShowFullName(), bill.YearsEmployed);
            Console.WriteLine("{0} has been employed for {1} months", steve.ShowFullName(), steve.MonthsEmployed);


            Console.ReadLine();
        }
예제 #4
0
        static void Main(string[] args)
        {
            FullTimeEmployee emp1 = new FullTimeEmployee
            {
                FirstName = "Bill",
                LastName = "Gates",
                YearsEmployed = 5
            };

            ContractEmployee emp2 = new ContractEmployee
            {
                FirstName = "Steve",
                LastName = "Jobs",
                MonthsEmployed = 2
            };

            Debug.Assert(emp1.ShowFullName() == "Bill Gates", "His name is Bill Gates.");
            Debug.Assert(emp1.YearsEmployed == 5, "He's worked here 5 years.");

            Debug.Assert(emp2.ShowFullName() == "Steve Jobs", "His name is Steve Jobs.");
            Debug.Assert(emp2.MonthsEmployed == 2, "He's worked here 2 months.");
        }
        static void Main(string[] args)
        {
            var bill = new FullTimeEmployee
            {
                FirstName = "Bill",
                LastName = "Gates",
                YearsEmployed = 5
            };

            var steve = new ContractEmployee
            {
                FirstName = "Steve",
                LastName = "Jobs",
                MonthsEmployed = 2
            };

            Debug.Assert(bill.ShowFullName()== "Bill Gates", "This is not Bill's full name!!!!");
            Debug.Assert(bill.YearsEmployed == 5);

            Debug.Assert(steve.ShowFullName() == "Steve Jobs", "This is not Steve's full name!!!!");
            Debug.Assert(steve.MonthsEmployed == 2);
        }
예제 #6
0
        static void Main(string[] args)
        {
            FullTimeEmployee bill = new FullTimeEmployee {
                FirstName     = "Bill",
                LastName      = "Gates",
                YearsEmployed = 5
            };

            Debug.Assert(bill.ShowFullName() == "Bill Gates", "Employee's name is Bill Gates");
            Debug.Assert(bill.YearsEmployed == 5, "Employee has been working for 5 years!");

            ContractEmployee steve = new ContractEmployee {
                FirstName      = "Steve",
                LastName       = "Jobs",
                MonthsEmployed = 2
            };

            Debug.Assert(steve.ShowFullName() == "Steve Jobs", "Employee's name is Steve Jobs");
            Debug.Assert(steve.MonthsEmployed == 2, "Employee has been working for 2 months!");

            Console.ReadLine();
        }
예제 #7
0
        static void Main(string[] args)
        {
            FullTimeEmployee bill = new FullTimeEmployee
            {
                FirstName     = "Bill",
                LastName      = "Gates",
                YearsEmployed = 5
            };


            ContractEmployee steve = new ContractEmployee
            {
                FirstName      = "Steve",
                LastName       = "Jobs",
                MonthsEmployed = 2
            };

            Debug.Assert(bill.ShowFullName() == "Bill Gates", "Wrong Person!");
            Debug.Assert(bill.YearsEmployed == 5, "Wrong Employment History!");
            Debug.Assert(steve.ShowFullName() == "Steve Jobs", "Wrong Person!");
            Debug.Assert(steve.MonthsEmployed == 2, "Wrong Employment History!");
        }
예제 #8
0
        static void Main(string[] args)
        {
            FullTimeEmployee emp1 = new FullTimeEmployee
            {
                FirstName     = "Bill",
                LastName      = "Gates",
                YearsEmployed = 5
            };

            ContractEmployee emp2 = new ContractEmployee
            {
                FirstName      = "Steve",
                LastName       = "Jobs",
                MonthsEmployed = 2
            };

            Debug.Assert(emp1.ShowFullName() == "Bill Gates", "His name is Bill Gates.");
            Debug.Assert(emp1.YearsEmployed == 5, "He's worked here 5 years.");

            Debug.Assert(emp2.ShowFullName() == "Steve Jobs", "His name is Steve Jobs.");
            Debug.Assert(emp2.MonthsEmployed == 2, "He's worked here 2 months.");
        }
예제 #9
0
        static void Main(string[] args) {

            FullTimeEmployee bill = new FullTimeEmployee {
                FirstName = "Bill",
                LastName = "Gates",
                YearsEmployed = 5
            };

            Debug.Assert(bill.ShowFullName() == "Bill Gates", "Employee's name is Bill Gates");
            Debug.Assert(bill.YearsEmployed == 5, "Employee has been working for 5 years!");

            ContractEmployee steve = new ContractEmployee {
                FirstName = "Steve",
                LastName = "Jobs",
                MonthsEmployed = 2
            };

            Debug.Assert(steve.ShowFullName() == "Steve Jobs", "Employee's name is Steve Jobs");
            Debug.Assert(steve.MonthsEmployed == 2, "Employee has been working for 2 months!");

            Console.ReadLine();
        }
예제 #10
0
        static void Main(string[] args)
        {
            FullTimeEmployee bill = new FullTimeEmployee
            {
                FirstName = "Bill",
                LastName = "Gates",
                YearsEmployed = 5
            };


            ContractEmployee steve = new ContractEmployee
            {
                FirstName = "Steve",
                LastName = "Jobs",
                MonthsEmployed = 2
            };
            Debug.Assert(bill.ShowFullName() == "Bill Gates", "Wrong Person!");
            Debug.Assert(bill.YearsEmployed == 5, "Wrong Employment History!");
            Debug.Assert(steve.ShowFullName() == "Steve Jobs", "Wrong Person!");
            Debug.Assert(steve.MonthsEmployed == 2, "Wrong Employment History!");


        }
예제 #11
0
파일: Program.cs 프로젝트: GBoh/CCweek1
        static void Main(string[] args)
        {
            //add employee 1 to full time employee
            var employee1 = new FullTimeEmployee
            {
                FirstName = "Bill",
                LastName = "Gates",
                YearsEmployed = 5
            };
            //checks to ensure is true
            Debug.Assert(employee1.ShowFullName() == "Bill Gates");
            Debug.Assert(employee1.YearsEmployed == 5);

            //add employee 2 to part time employee
            var employee2 = new PartTimeEmployee
            {
                FirstName = "Steve",
                LastName = "Jobs",
                MonthsEmployed = 2
            };
            //checks to ensure is true
            Debug.Assert(employee2.ShowFullName() == "Steve Jobs");
            Debug.Assert(employee2.MonthsEmployed == 2);
        }