i want to write a function which calculates the Monthly depreciation and accumulation of an asset but i am having difficulties writing it to calculate and insert it into my datebase.I will appreciate the help

private double getAccumulation(){
       double Accumulation = 0;
       double Monthly_Depreciation;
       int Estimated_Useful_Life = Integer.parseInt(eul.getText());
       double Cost_Of_Acquisition = Integer.parseInt(txt_coa.getText());
       double Estimated_Residual_Value = Integer.parseInt(txt_erv.getText());

            Monthly_Depreciation = (Cost_Of_Acquisition - Estimated_Residual_Value)/Estimated_Useful_Life;
            Accumulation = Monthly_Depreciation;

       }catch(Exception e){
        JOptionPane.showMessageDialog(null, e);   

       return Accumulation;

I don't see any see any database in your code. What I will suggest is to print the resuls using system.out.println and check if the value appears.