The Metro Bank provides various types of loans Using java IfytQ

The Metro Bank provides various types of loans such as car loans, business loans and house loans to its account holders, i.e., customers.

Implement a program to determine the eligible loan amount and the EMI that the bank can provide to its customers based on their salary and the loan type they expect to avail.

The values required for determining the eligible loan amount and the EMI are:

  • account number of the customer

  • account balance of the customer

  • salary of the customer

  • loan type 

  • expected loan amount

  • expected no. of EMIs

The following validations should be performed:

  • The account number should be of 4 digits and its first digit should be 1

  • The customer should have a minimum balance of $1000 in the account

Display appropriate error messages if the validations fail.

If the validations pass, determine whether the bank would provide the loan or not. 

The bank would provide the loan, only if the loan amount and the number of EMIs expected by the customer is less than or equal to the loan amount and the number of EMIs decided by the bank respectively. The bank decides the eligible loan amount and the number of EMIs based on the below table.




Display the account number, eligible and requested loan amount and the number of EMIs if the bank provides the loan.

Display an appropriate message if the bank does not provide the loan.


 the code is here for you

//Sorry Guys I am a very lazy person so I use many shortcuts plz Accept 


class Tester {

public static void main(String[] args) {

// Implement your code here 

double aNo, sal,acB,LnAm,exEmi,outelAm,elgibemi;

String Lty ="bussiness";

aNo =902;

sal = 300000;

acB=6000;

LnAm=400000;

exEmi =30;

if(aNo>999 && aNo<2000){

    System.out.println("the Accout Number : " + aNo);

    

if(sal>=25000 && acB >=1000){

    System.out.println("your eligible ");

    

  }

if(Lty =="car"){

        System.out.println(outelAm = 5000000);

        System.out.println(elgibemi =36);

        

}

else if(Lty =="house"){

  System.out.println(outelAm = 60000000);

        System.out.println(outelAm = 60);


}

else if(Lty =="bussiness"){

        System.out.println(outelAm = 75000000);

        System.out.println(outelAm = 65);


}


}

else{

    System.out.println("your are not eligible for the loan  ");

}

}

}






Comments