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();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            var person  = new Person(1, "Dimitris", "Athens");
            var account = new AnalyticAccount(person);

            account.LoadJSON();
            account.Deposit(1);
            account.Withdraw(2);
            account.SaveToJSON();

            //Console.Write(account);
            //account.PrintTransactions();
            //account.Deposit(50);
            //account.Deposit(120);
            //account.Deposit(80);
            //account.Withdraw(1000);
            //account.PrintTransactions();
            //account.SaveToFile("myFile.txt");
            //account.SaveToJSON();
        }