Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var dimitris = new Person(1, "Dimitris", "Athens");
            var account  = new AnalyticAccount(dimitris);

            account.LoadJson(); //loads previous transactions
            account.Deposit(1);
            account.Deposit(2);
            account.Withdraw(1);
            account.PrintTransactions();
            account.SaveToJson();

            Console.ReadLine();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var person  = new Person(1, "Dimitris", "Athens");
            var account = new AnalyticAccount(person);

            account.LoadJson();

            Console.WriteLine(account);

            account.Deposit(1);

            //comment

            account.Withdraw(2);
            account.PrintTransactions();
            account.SaveToFile("myFile.txt");
            account.SaveToJson();
        }