
from datetime import datetime

class Account:
    

    def __init__(self) -> None:
        super().__init__()
        self.id = 0
        self.balance = 0
        self.annualInterestRate = 0
        self.dateCreated = datetime.now()

    def __init__(self, id, balance, annualInterestRate):
        self.id = id
        self.balance = balance
        self.annualInterestRate =  annualInterestRate



    def getID(self):
        return self.id

    def getBalance(self):
        return self.balance

    def getAnnualInterestRate(self):
        return self.annualInterestRate

    def withdraw(self, amount):
        if amount > self.balance:
            return "Can't withdraw an larger balance amount"
        else:
            self.balance = self.balance - amount
            return amount

    def deposit(self, amount):
        self.balance = self.balance + amount
        return self.balance
    
    def getMonthyInterestRate(self):
        return self.annualInterestRate / 12

    def setID(self,id):
        self.id = id

    def setBalance(self, balance):
        self.balance = balance
    
    def setAnnualInterestRate(self, anIR):
        self.annualInterestRate = anIR

    def toString(self):
        return "The acount is with id "+str(self.id)+" and balance "+str(self.balance)+" and annual interest rate "+str(self.annualInterestRate)
    
