Example #1
0
        static void Main(string[] args)
        {
            SavingAccounts savingsAccount       = new SavingAccounts("940000000001", 0.0M, "Marek", "Zając", 92010133333);
            SavingAccounts secondSavingsAccount = new SavingAccounts("940000000002", 0.0M, "Marek", "Zając", 92010133333);

            string fullName = savingsAccount.getfullName();

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

            string fullBalance = savingsAccount.getBalance();

            Console.WriteLine("Twoja wartość konta wynosi: {0}", fullBalance);



            BillingAcount billingsAccount = new BillingAcount(savingsAccount.AccountNumber, savingsAccount.Balance, savingsAccount.FirstName, savingsAccount.LastName,
                                                              savingsAccount.Pesel);


            Printer printer = new Printer();

            printer.Print(savingsAccount);
            printer.Print(secondSavingsAccount);
            printer.Print(billingsAccount);

            Console.ReadKey();
        }
Example #2
0
 public void Print(BillingAcount account)
 {
     Console.WriteLine("Dane konta: {0}", account.AccountNumber);
     Console.WriteLine("Saldo: {0}zł", 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();
 }