Exemple #1
0
 static void Main(string[] args)
 {
     Library.Registry registry = new Registry();
     registry.AddNewUser(new User("Person1", "Password1"));
     registry.AddNewUser(new User("Person2", "Password2"));
     registry.AddNewUser(new User("Person3", "Password3"));
     registry.AddNewUser(new User("Person4", "Password4"));
     registry.AddNewUser(new User("Person5", "Password5"));
     registry.AddNewUser(new User("Person6", "Password6"));
     registry.AddNewUser(new User("Person7", "Password7"));
     registry.AddNewUser(new User("Person8", "Password8"));
     registry.AddNewUser(new User("Person9", "Password9"));
     registry.AddNewUser(new User("Person10", "Password10"));
 }
Exemple #2
0
        static void Main(string[] args)
        {
            Registry registry1 = new Registry();

            registry1.AddNewUser(new User("andreas", "abcd1234", new HourlyPaidJob(172)));
            registry1.Login("andreas", "abcd1234");
        }
        static void Main(string[] args)
        {
            Registry registry = new Registry();
            User     user1    = new User();
            Admin    admin1   = new Admin();

            Job[] jobs = new Job[7] {
                new HourlyPaidJob(6), new DailyPaidJob(35), new DailyPaidJob(35), new DailyPaidJob(21), new DailyPaidJob(31), new DailyPaidJob(95), new DailyPaidJob(45)
            };


            registry.Login("lol", "kage");
            registry.AddNewUser(admin1);
            user1.isAdmin();
            admin1.changePassword(user1, "Kage");

            foreach (Job job in jobs)
            {
                job.GetMonthlyPay();
            }

            Console.ReadLine();
        }