Java Month getMonthTotal(Double bsAmount, Double susAmount, Double changeRate)

Here you can find the source of getMonthTotal(Double bsAmount, Double susAmount, Double changeRate)

Description

Calculates the bsAmount(converted to dollars)+susAmount

License

Open Source License

Parameter

Parameter Description
bsAmount Amount in bs
susAmount amount is sus
changeRate changeRate

Return

the sum

Declaration

public static Double getMonthTotal(Double bsAmount, Double susAmount, Double changeRate) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*from w ww.  j  av a2s . c  o  m*/
     * Calculates the bsAmount(converted to dollars)+susAmount
     *
     * @param bsAmount   Amount in bs
     * @param susAmount  amount is sus
     * @param changeRate changeRate
     * @return the sum
     */
    public static Double getMonthTotal(Double bsAmount, Double susAmount, Double changeRate) {
        Double res = null;
        if (bsAmount != null) {
            res = bsAmount / changeRate;
        }
        if (susAmount != null) {
            if (res != null) {
                res += susAmount;
            } else {
                res = susAmount;
            }
        }
        return (res);
    }
}

Related

  1. getMonthRange(String start, String end)
  2. getMonths()
  3. getMonths(String strDateBegin, String strDateEnd)
  4. getMonthTime(String allDate)
  5. getMonthToMonth(int month)
  6. getNextMonth(String curYearMonth)
  7. getNextMonth(String month)
  8. getNextMonthSpe(String curYearMonth)
  9. getPreMonth(String thisMonth)