Menu
Question Index
...


Write a program to create a SWIFT Message with the given payment details. The format of the swift message is shown with the examples below. For display purposes new lines are shown as $.

Input (PaymentDetails) Output (String)
Sender Reference=1000
Bank Operation Code=Hyd
Value Date=24-May-2013
Currency=INR
Inter Bank Settled Amount=50134.32
Ordering Customer=Cerone
Benificiary Account Number=784380590
Benificiary Customer=22-13-41 Lalpet$Hyderabad 101290
Details Of Charges=SHA
:20:1000
:23B:HYD
:32A:130524INR50134,32
:50K:CERONE
:59:/784380590
22-13-41 LALPET
HYDERABAD 101290
:71A:SHA
Sender Reference=300
Bank Operation Code=Pune
Value Date=20-Dec-2002
Currency=EUR
Inter Bank Settled Amount=94000.99
Ordering Customer=Sravan Kumar
Benificiary Account Number=78456768
Benificiary Customer=11-31-18 Pullareddy Nagar$Kavali$Nellore 524201
Details Of Charges=BIF
:20:300
:23B:PUNE
:32A:021220EUR94000,99
:50K:SRAVAN KUMAR
:59:/78456768
11-31-18 PULLAREDDY NAGAR
KAVALI
NELLORE 524201
:71A:BIF
Sender Reference=1219
Bank Operation Code=Chennai
Value Date=01-Mar-1999
Currency=INR
Inter Bank Settled Amount=20000.24
Ordering Customer=Chandran
Benificiary Account Number=null
Benificiary Customer=15 Mylapore$Chennai$Tamil Nadu
Details Of Charges=BIF
:20:1219
:23B:CHENNAI
:32A:990311INR20000,24
:50K:CHANDRAN
:59:15 MYLAPORE
CHENNAI
TAMIL NADU
:71A:BIF

class CreatePaymentSWIFTMessage

{    public static void main(String s[])
    {
        Payment input = new Payment();
        input.senderReference = "1000";
        input.bankOperationCode = "HYD";
        Calendar c1 = Calendar.getInstance();
        c1.set(2013, 04, 24); /* 24-May-2013 */
        input.valueDate = c1.getTime();
        input.currency = "INR";
        input.interBankSettledAmount = 50134.32;
        input.orderingCustomer = "Cerone";
        input.beneficiaryAccountNumber = "784380590";
        input.beneficiaryCustomer = "22-13-41 Lalpet\nhyderad 101290";
        input.detailsOfCharges = "SHA";
        String result = createSWIFTPayment(input);
        System.out.println("The SWIFT Message is : \n " + result);

    }


public static String createSWIFTPayment(Payment input) {
//Write code here to create a SWIFT payment message with the given input details
return result;
}

//Write additional methods here if required
}
class Payment {

String senderReference;
String bankOperationCode;
Date valueDate;
String currency;
Double interBankSettledAmount;
String orderingCustomer;
String beneficiaryAccountNumber;
String beneficiaryCustomer;
String detailsOfCharges;
}

Doubts

Problems

Topic: Other Advanced Topics In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App