Example #1
0
 public void Print(BillingAccount account)
 {
     Console.WriteLine("Dane konta: {0}", account.AccountNumber);
     Console.WriteLine("Saldo: {0}Cebulions", account.Balance);
     Console.WriteLine("Imię właściciela: {0}", account.FirstName);
     Console.WriteLine("Nazwisko właściciela: {0}", account.LastName);
     Console.WriteLine("PESEL właściciela: {0}", account.Pesel);
     Console.WriteLine();
 }
Example #2
0
        public BillingAccount CreateBillingAccount(string firstName, string lastName, long pesel)
        {
            int id = generateId();

            BillingAccount account = new BillingAccount(id, firstName, lastName, pesel);

            _accounts.Add(account);

            return(account);
        }
Example #3
0
        static void Main(string[] args)
        {
            string name   = "nazwa: cyce";
            string author = "author: Ja";

            Console.WriteLine(name);
            Console.WriteLine(author);
            Console.WriteLine();

            SavingsAccount savingsAccount = new SavingsAccount("940000000001", 0.0M, "Hans", "Klop", 92010133333);

            SavingsAccount secondsavingsAccount = new SavingsAccount(940000000002, 6.9M, "Fredi", "Uranus", 92690444333);


            BillingAccount billingAccount = new BillingAccount();

            billingAccount.AccountNumber = "940000000003";
            billingAccount.Balance       = 0.0M;
            billingAccount.FirstName     = savingsAccount.FirstName;
            billingAccount.LastName      = savingsAccount.LastName;
            billingAccount.Pesel         = savingsAccount.Pesel;


            string fullName = savingsAccount.GetFullName();

            Console.WriteLine("Pierwsze konto w systemie dostał(-a): {0}", fullName);


            Printer printer = new Printer();

            printer.Print(savingsAccount);
            printer.Print(secondsavingsAccount);

            printer.Print(billingAccount);



            Console.ReadKey();
        }