using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Banker
{
    public class Customer
    {
        public string Username { get; set; }
        public string Password { get; set; }
        public decimal Balance { get; set; }
        public DateTime LastAccess { get; set; }
        public List<string> LastTransactions { get; set; }

        public Customer(string username, string password, decimal balance)
        {
            Username = username;
            Password = password;
            Balance = balance;
            LastAccess = DateTime.Now;
            LastTransactions = new List<string>();
        }

        public void AddTransaction(string transaction)
        {
            LastTransactions.Insert(0, transaction); 
            if (LastTransactions.Count > 5)
                LastTransactions.RemoveAt(5); 
        }
    }
}
