예제 #1
0
        static void Main(string[] args)
        {
            var john = new Developer("John Doe", 12000);
            var jane = new Designer("Jane Doe", 15000);

            var organization = new Organization();

            organization.AddEmployee(john);
            organization.AddEmployee(jane);

            Console.WriteLine($"正味の給与: {organization.GetNetSalaries()}");
        }
예제 #2
0
        static void Main()
        {
            var dev = new Developer(50, "john");
            var des = new Designer(40, "sarah");
            var org = new Organization();

            org.AddEmployee(dev);
            org.AddEmployee(des);
            Console.WriteLine(org.GetNetSalaries());

            Console.ReadKey();
        }
예제 #3
0
        static void Main()
        {
            // arrange Employees, Organization and add employees
            var developer = new Developer("Jeremy", 5000);
            var designer  = new Designer("John", 3000);

            var organization = new Organization();

            organization.AddEmployee(developer);
            organization.AddEmployee(designer);

            Console.WriteLine($"Net salary of Employees in Organization is {organization.GetNetSalaries():C}");
        }
        static void Main(string[] args)
        {
            //Arrange Employees, Organization and add employees
            var developer = new Developer("John", 5000);
            var designer  = new Designer("Arya", 5000);

            var organization = new Organization();

            organization.AddEmployee(developer);
            organization.AddEmployee(designer);

            Console.WriteLine($"Net Salary of Employees in Organization is {organization.GetNetSalaries():c}");
            //Ouptut: Net Salary of Employees in Organization is $10000.00
            Console.ReadKey();
        }