info@meritcampus.com    +91-85006-22255
...

Write a program to get the outstanding loan amount on a required date. The loan amount, interest rate, start date and the duration are given. We need to calculate the EMI, before arriving at the outstanding loan. Round the EMI and interest per month to nearest rupee. Also round the outstanding loan amount to the nearest rupee.

Input (String, String, int, double, int) Output (double)
03-05-2013, 03-06-2013, 2000000, 12.5, 20 1998110.0
03-07-2015, 03-05-2025, 1250000, 12, 35 1206637.0
25-11-1990, 21-08-2000, 500000, 7.5, 15 240776.0
28-02-2010, 02-03-2010, 95000, 10, 1 87440.0
28-07-1980, 02-03-2002, 1230000, 12.5, 25 437390.0
06-07-2013, 02-07-2013, 1575, 10, 2 1515.0
15-12-2020, 13-01-2028, 750000, 15, 3 0.0

``` class CalculateOutstandingLoanAmount {    public static void main(String s[])    {        double principal = 10000;        double interestRate = 10;        int loanInYears = 1;        String startDate = "03-05-2013";        String requiredDate = "03-09-2013";        Double outstandingAmount = getOutstandingAmount(startDate, requiredDate, principal, interestRate, loanInYears);        System.out.println("Outstanding amount on " + requiredDate + " is " + outstandingAmount);    } public static double getOutstandingAmount(String startDate, String requiredDate, double principal, double interestRate, int loanInYears) { double result = 0.0; //Write code here to get the outstanding loan amount on the required date return result; } //If required, write any additional methods here } ```

Topic: Locale Class In Java

0
Wrong
Score more than 2 points