// sourcing() method for assigning general details of customer
 public void sourcing() throws Exception {
   System.out.println(
       "----------------------------------------------------------------------------------------");
   System.out.print("\nSTEP - 1");
   System.out.println("    Enter customer's general details :\n");
   textToSpeech.speak("Enter customer general details");
   System.out.print("First name : ");
   textToSpeech.speak("Enter first name");
   firstName = getter.nameGetter();
   System.out.print("Middle name : ");
   textToSpeech.speak("Enter middle Name");
   middleName = getter.middleNameGetter();
   System.out.print("Last name : ");
   textToSpeech.speak("Enter last name");
   lastName = getter.nameGetter();
   System.out.print("\nGender (M/Male OR F/Female) : ");
   textToSpeech.speak("enter your gender");
   gender = getter.genderGetter();
   System.out.print("\nEmail Id : ");
   textToSpeech.speak("Enter email Id");
   emailId = getter.emailIdGetter();
   System.out.print("\nDate of birth (in dd/mm/yyyy) : ");
   textToSpeech.speak("Enter Date of birth ");
   dateOfBirth = getter.dateGetter();
   System.out.print("\nMobile number (+91----------) : ");
   textToSpeech.speak("Enter mobile number ");
   mobileNo = getter.mobileNoGetter();
   System.out.print("\nPermanent address : ");
   textToSpeech.speak("Enter permanent address ");
   permanentAddress = getter.addressGetter();
   System.out.println(
       "\nApplyling for : \n1- (home) for HOME LOAN\n2- (auto) for AUTO LOAN :\n > ");
   textToSpeech.speak("enter loan type. 1- home loan, 2- auto loan");
   loanType = getter.loanTypeGetter();
 }
 public void qdeOfLoanDetails() throws IOException, JavaLayerException {
   System.out.println(
       "----------------------------------------------------------------------------------------");
   System.out.print("\nSTEP - 4");
   System.out.println("    Enter customer's loan details :\n");
   textToSpeech.speak("Enter customer's loan details");
   System.out.println("\nLoan type : " + loanType);
   System.out.println("\nYour assets : ");
   textToSpeech.speak("Enter assets");
   assets = getter.assetsGetter();
   System.out.println("\nExpected cost of assets (in Rs.) : ");
   textToSpeech.speak("Enter expected cost of assets");
   assetsCost = getter.moneyGetter(100.0, 20000000.0);
   System.out.println("\nExpected loan amount (in Rs.) (in average) : ");
   textToSpeech.speak("Enter expected loan amount");
   loanAmount = getter.moneyGetter(1000.0, 10000000.0);
 }
 // qdeOfPersonalDetails() method is used for assigning personal details of customer
 public void qdeOfPersonalDetails() throws IOException, JavaLayerException {
   System.out.println(
       "----------------------------------------------------------------------------------------");
   System.out.print("\nSTEP - 2");
   System.out.println("    Enter customer's personal details :\n");
   textToSpeech.speak("Enter customer's personal details");
   System.out.println("\nStatus :\n1- Married\n2- Unmarried\n > ");
   textToSpeech.speak("Married or unmarried");
   status = getter.statusGetter();
   if ("female".equalsIgnoreCase(gender) && "married".equalsIgnoreCase(status)) {
     System.out.println("Husband's name : ");
     textToSpeech.speak("enter husband's name");
     husbandName = getter.fatherOrHusbandNameGetter();
   } else {
     System.out.println("Father's name : ");
     textToSpeech.speak("enter father's name");
     fatherName = getter.fatherOrHusbandNameGetter();
   }
   System.out.println("Nationality :\n1- Indian\n2- Other\n > ");
   textToSpeech.speak("enter nationality");
   nationality = getter.nationalityGetter();
   System.out.println("Current address : ");
   textToSpeech.speak("enter current address");
   currentAddress = getter.addressGetter();
   System.out.println("PAN : ");
   textToSpeech.speak("enter personal account number");
   pan = getter.panGetter(lastName);
   System.out.println("Number of family members : ");
   textToSpeech.speak("enter number of family members");
   noOfFamilyMembers = getter.noOfFamilyMembersGetter();
   System.out.println(
       "Qualification :\n1- Nothing\n2- Matrics\n3- Intermediate\n4- Graduate\n4- Postgraduate\n5- Others\n > ");
   textToSpeech.speak("enter qualification");
   qualification = getter.qualificationGetter();
   if (!("NOTHING".equals(qualification))) {
     System.out.println("Year of qualification : ");
     textToSpeech.speak("enter year of qualification");
     qualification = getter.qualificationYearGetter();
   }
 }
 public void qdeOfLiabilityDetails() throws Exception {
   System.out.println(
       "----------------------------------------------------------------------------------------");
   System.out.print("\nSTEP - 3");
   System.out.println("    Enter customer's liability details :\n");
   textToSpeech.speak("Enter customer's liability details");
   textToSpeech.speak("Enter customer's liability details");
   System.out.println(
       "\nEmployment type :\n1- Home Maker\n2-Student\n3- Salaried\n4- Bussiness\n5- Other\n > ");
   textToSpeech.speak("Enter employment type");
   employmentType = getter.employmentTypeGetter();
   if (!("HOME MAKER".matches(employmentType))) {
     System.out.println("\nTotal Income(in Rs.) (in average) : ");
     textToSpeech.speak("Enter total income");
     totalIncome = getter.moneyGetter(0.0, 10000000.0);
     System.out.println("\nTotal expenses(in Rs.) (in average) : ");
     textToSpeech.speak("Enter total expenses");
     expenses = getter.expensesGetter(totalIncome);
     System.out.println("\nWorking company name : ");
     textToSpeech.speak("Enter working company name");
     companyName = getter.companyNameGetter();
     if (!("STUDENT".matches(employmentType))) {
       System.out.println("\nWorking experience : ");
       textToSpeech.speak("Enter working experience");
       experience = getter.experienceGetter();
     }
   }
 }
  public void logIn() throws Exception {
    String userId = fileHandler.userIdFormFile();
    String passwd = fileHandler.passwdFormFile();
    databaseUserId = userId.split(",");
    databasePasswd = passwd.split(",");

    byte attempts = 1;
    System.out.println("\t LOG IN :");
    textTospeech.speak("Please login ");
    while (attempts <= 3) {
      System.out.print("User-Id : ");
      textTospeech.speak("enter userid");
      userId = input.nextLine();
      System.out.print("Password : "******"enter password");
      passwd = input.nextLine();
      for (byte i = 0; i < databaseUserId.length; i++) {
        if (userId.equalsIgnoreCase(databaseUserId[i].trim())
            && passwd.equals(databasePasswd[i].trim())) {
          return;
        }
      }
      if (attempts != 3) {
        System.out.print("\n*** you entered wrong userId or password (only 3 attempts) ***     ");
        System.out.println("(remaining : " + (3 - attempts) + ")\n");
        textTospeech.speak("you entered wrong userId or password");
      }
      attempts++;
    }
    System.out.println("\n$$$ you exceeded number of log in attempts $$$\n");
    textTospeech.speak("you exceeded number of log in attempts");
    System.out.println("\t<<<<<<<<< PLEASE CONTACT TO YOUR BANK MANAGER >>>>>>>>>>");
    textTospeech.speak("PLEASE CONTACT TO YOUR BANK MANAGE");
    System.exit(0);
  }