credit card processing

82
CREDIT CARD PROCESSING OBJECTIVE To study and develop a Credit Card Processing by using object oriented software development PROBLEM STATEMENT Filling application form Proof verification Credit limit calculation Card replacement Credit card renewal Purchase through credit card Payment Credit card monthly statement ( fine if any + purchase details ) ACTORS Card holder Card issuer Verifier

Upload: raj-praveen

Post on 25-Jul-2015

65 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Credit Card Processing

CREDIT CARD PROCESSING

OBJECTIVE

To study and develop a Credit Card Processing by using object oriented software

development

PROBLEM STATEMENT

Filling application form

Proof verification

Credit limit calculation

Card replacement

Credit card renewal

Purchase through credit card

Payment

Credit card monthly statement ( fine if any + purchase details )

ACTORS

Card holder

Card issuer

Verifier

Page 2: Credit Card Processing

SRS

TABLE OF CONTENTS:

1.Introduction

1.1 Purpose

1.2 Scope

1.3 Document overview

2. General description

2.1 System environment

2.2 User characteristics

2.3 Non functional requirements

2.3.1 Product requirements

2.3.2 Organizational requirements

2.3.3 External requirements

3. Specific requirements

3.1 Functional requirements

3.2 Use cases

3.2.1 Apply for credit card

3.2.2 Verify proof

3.2.3 Calculate credit limit

3.2.4 Issue credit card

3.2.5 Replace credit card

3.2.6 Renew credit card

3.2.7 Purchase through card

3.2.8 Pay for credit usage

3.2.9 Produce monthly statement

3.3 External interface specification

Page 3: Credit Card Processing

1. INTRODUCTION

1.1 PURPOSE:

Credit card processing software is used to manage credit card details of a bank. This

includes the sequence of phases involved in the creation of a credit card and the usage details

of the card owned by the bank’s customers.

1.2 SCOPE:

Credit card processing is used in banks all over the world to process their respective

credit cards. The simplicity under the use of credit cards has engrossed a mass of people into

using them bringing a great deal of profit to the bank organizations.

1.3 DOCUMENT OVERVIEW:

This document of software requirement specification contains the functional

requirements, use case identification and the non-functional requirements. The non-functional

requirements would be focussed at a greater detail in a business based development

environment.

2. GENERAL DESCRIPTION

2.1 SYSTEM ENVIROMNENT:

The system composes of a central server for a bank through which the bank itself and

the internet server for credit cards is connected. The credit card purchase is done over the

internet.

2.2 USER CHARACTERISTICS:

The actors associated with the system and their descriptions are as follows :

Card Holder: This is the owner of a credit card. This is a primary actor. The card

holder is the only ine who can purchase through his/her card.

Verifier: This is a supporting actor who verifies the details given by an applicant.

Card Issuer: This is a primary actor whose duty is to issue, renew and replace credit

cards.

2.3 NON-FUNCTIONAL REQUIREMENTS

Page 4: Credit Card Processing

The following are the requirements that focus on the overall quality of the software.

2.3.1 PRODUCT REQUIREMENTS:

Usability: The product should be simple enough to be operated by the actors

concerned.

Efficiency: The product should occupy the least possible memory space and provide

greater performance.

Reliability: The database must not be corrupted in case of power failure or any

malfunctioning of the underlying system.

2.3.2 ORGANIZATIONAL REQUIREMENTS

Deliverability: The deliverable product must include the database pack necessary to

handle the software along with the software itself.

Implementation: The product should be safe to use and should not be easily

subjected to hacking.

2.3.3 EXTERNAL REQUIREMENTS

Interoperability: This product must include the database pack necessary to handle

the software along with the software itself.

Implementation: The product should be safe to use and should not be easily

subjected to hacking.

3. SPECIFIC REQUIREMENTS

3.1 FUNCTIONAL REQUIREMENTS

The following are the requirements necessary for the system to function for its purpose.

There must be database to store the details of credit cards along with the details.

There must be a way in which an applicant can produce his/her details to the bank to

apply for a credit card.

The details given by the applicant should be put through verification.

Applications that pass the police verification should be put for processing.

Page 5: Credit Card Processing

The statuses of the credit card phases must be indicated.

The fully processed credit card must be issued to the applicant.

The credit card details must be maintained even after issue.

The credit cards that are obsolete must be put through for renewal.

3.2 USE CASES

The use cases underlined in this stage are as follows:

Apply for credit card

Verify proof

Calculate credit card

Issue credit card

Replace credit card

Renew credit card

Purchase through card

Pay for credit usage

Produce monthly statement

3.2.1 APPLY FOR CREDIT CARD:

An applicant applies for his/her credit card by giving his/her details necessary for the

credit card ownership.

3.2.2 VERIFY PROOF:

The details given in the apply for credit card use case is put through verification. Only

the applications that pass this phase can proceed further phases in the credit card processing.

3.2.3 CALCULATE CREDIT LIMIT:

The card issuer sets the credit limit of the credit card before issuing to the card holder.

3.2.4 ISSUE CREDIT CARD:

After the credit card is fully processed, it is printed and is ready to be issued by the

card issuer to the card holder who applied for it.

3.2.5 REPLACE CREDIT CARD:

Page 6: Credit Card Processing

If a credit card is lost or stolen, its card holder can replace the card by requesting the

card issuer. The current card is deactivated first and a new credit is created and issued to the

card holder with the credit card number as the only difference.

3.2.6 RENEW CREDIT CARD:

The credit card becomes obsolete after a specified time after which the card holder

must renew the credit card if he/she wishes to further use it. This must again pass through

verification.

3.2.7 PURCHASE THROUGH CARD:

The card holder can purchase using his/her credit card in online shopping or a credit

card.

3.2.8 PAY FOR CREDIT USAGE

Based on the monthly statement the card holder should pay the bank for the purchase

done with the card, delayed payment would add on to the fine in the monthly statement.

3.2.9 PRODUCE MONTHLY STATEMENT

At the end of every month statement is produced for each card the bill would be the

purchase details along with fine plus tax.

3.3 EXTERNAL INTERFACE SPECIFICATION

The following are the program interfaces that are going to be running:

An applicant program at an application counter.

A card issuer program

A verifier program

All programs are planned to be implemented under VC++ language as a front end interface

and with oracle as the back end database.

Page 7: Credit Card Processing

RISK MANAGEMENT

1. RISK IDENTIFICATION:

1. Authenticity problem.

2. Updation problem.

3. Data coherency risk.

2. RISK ANALYSIS:

Authenticity problem: Wrong details given by the applicant which may be more

convincing.

Updation problem: The problem with renewal is that you can have a separate thread

to check the renewal status of all entries int the database.

Data coherency risk: The entered data may be inadvertently modified in the phase

transitions.

3. RISK PLANNIG AND AVOIDANCE:

A stricter verification is required to overcome the authenticity problem.

The applicant is given the duty to renew his/her credit card on the renewal date.

A relational database can be used to mitigate the inadvertent data modification.

4. RISK MONITORING:

The practise of unauthenticated detail submission can be stated as a punishable

offence by international law.

The credit card renewal date must always be noted by the verifiers before its use.

The database should be compared before and after a phase transaction.

Page 8: Credit Card Processing

USE CASE DIAGRAM

AIM:

To identify the business activities and develop an UML use case diagram.

PROCEDURE:

In the Project Explorer view, expand the Analysis Model.

Right-click on the Model

Select Add Diagram > Usecase Diagram.

Name the use cases and actors.

The usecase diagram opens in the Diagram editor.

Page 9: Credit Card Processing

RESULT:

Thus the use cases are identified and the use case model diagram is successfully

drawn for the Credit Card Processing System.

Page 10: Credit Card Processing

UML ACTIVIY DIAGRAM

AIM:

To identify the business activities and develop an UML activity diagram.

PROCEDURE:

In the Project Explorer view, expand the Analysis Model.

Right-click on the Model

Select Add Diagram > Activity Diagram.

Name the activity and draw the diagram for the desired use case

The activity diagram opens in the Diagram editor.

Page 11: Credit Card Processing

UML ACTIVITY DIAGRAM

1.REGISTER

Page 12: Credit Card Processing

2.LOGIN

Page 13: Credit Card Processing

3.PURCHASE

Page 14: Credit Card Processing

4.PAYMENT

Page 15: Credit Card Processing

5.ENTRY

RESULT:

Thus the UML activity diagram is successfully drawn for the Credit Card Processing

system.

Page 16: Credit Card Processing

UML CLASS DIAGRAM

AIM:

To identify the conceptual classes and to develop a Design model with UML class

diagram for Credit Card Processing system..

PROCEDURE:

In Rational software Architect’s Model project explorer view, right-click on

the Model and creates an UML Model, A dialog box appears in that select

Design model and click finish, an UML Design Model will be created.

In Rational software Architect’s Model Explorer view, right click on the

Created UML Design model and select Add Diagram → Class Diagram as

shown below.

Enter Class diagram as the name of the generated diagram to replace the

default name Class diagram1.

Select class in the Palette, then click anywhere in the diagram to create a class

and Name it.

Identify the conceptual classes and give the associated attribute name and

method name for the identified class.

Similarly, create another class and give attributes and method.

Select Association in the Palette.

Draw the association relationship line from one class diagram to another class

diagram Add an entry to initiate a relationship between the two model

elements.

Select ctrl-s to save the program.

Page 17: Credit Card Processing

CLASS DIAGRAM

RESULT:

Thus the UML class diagram is successfully drawn for the Credit Card Processing

system.

Page 18: Credit Card Processing

UML INTERACTION DIAGRAM

AIM:

To find the interaction between objects using the scenarios identified for Credit Card

Processing and represent them using UML interaction diagram.

PROCEDURE:

In Rational software Architect’s Model Explorer view, right click on the

Created UML Design model and select Add Diagram → Sequence Diagram

as shown below.

Select the lifeline in the Palette, then click anywhere in the diagram to create a

class.

Identify the object and give the object name.

Similarly, create another object and find the associative message between the

two objects.

The message can be synchronous or asynchronous message.

Draw the relationship line from one object to another object.

Page 19: Credit Card Processing

UML INTERACTION DIAGRAM

1.REGISTER

Page 20: Credit Card Processing

2.LOGIN

Page 21: Credit Card Processing

3.PURCHASE

Page 22: Credit Card Processing

4.ENTRY

Page 23: Credit Card Processing

5.PAYMENT

RESULT:

Thus the UML interaction diagram is successfully drawn for the Credit Card

Processing system.

Page 24: Credit Card Processing

UML STATE MACHINE DIAGRAM

AIM:

To identify the different states in the Credit Card Processing system and to represent

them using a UML State Machine Diagram.

PROCEDURE:

In Rational Software Architect's Project Explorer view, right-click Created UML

Design Model and select Add Diagram > State Machine Diagram.

Enter State diagram as the name of the generated diagram to replace the default name

StateMachineDiagram1.

STATE MACHINE DIAGRAM

RESULT:

Thus the state machine diagram for the mini project Credit Card Processing is drawn

successfully.

Page 25: Credit Card Processing

UML PACKAGE DIAGRAM

AIM:

To identify and represent the various packages involved in the Credit Card Processing

system using a UML Package Diagram.

PROCEDURE:

In Rational Software Architect's Model Explorer view, right-click Created UML

Design Model and select Add Diagram > Class Diagram as shown below.

Select Package in the Palette, then click anywhere in the diagram to create a Package

diagram and Name it.

PACKAGE DIAGRAM

Page 26: Credit Card Processing

RESULT:

Thus the package diagram for our project Credit Card Processing is drawn

successfully.

Page 27: Credit Card Processing

IMPLEMENTATION OF DOMAIN OBJECTS LAYER

AIM:

To implement the Domain objects Layer defined for the Credit Card Processing

system.

PROCEDURE:

FORWARD ENGINEER (from UML to JAVA code):

1. Select all the class Diagram. Go to File → New project.

2. Select Java project and give next.

3. Give “project name(eg javaconference)” → next → Finish.

4. Give “NO” for open this perspective now.

5. Select the project name (eg: javaconference) →Go to the Modelling Menu→

transform → new configuration.

6. Give Name( eg : conference file) → select UML to java v 5.0→ next →select the

source (select all the class diagram from design model) and target file

(javaconference).

7. In Selected source Go to →Models → Design model → select all the class name.

8. Give Next → Disable Getters and setters→ next →next → Finish.

9. Go to the file name given in step :6, Right click on the name → go to transform →

UML to java.

10. Coding is available in default Package inside the project name.

Page 28: Credit Card Processing

JAVA CODE:

AUTHENTICATION SERVICE

/**

*

*/

/**

* @author 29jecs58

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public class authenticationservice {

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private String username;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private String email_ID;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private String password;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

Page 29: Credit Card Processing

*/

private String report;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private String reprtname;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private guest guest;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private customer class1;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void register() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

/**

Page 30: Credit Card Processing

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void login() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void entry() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void validate() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

/**

Page 31: Credit Card Processing

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void checkaccount() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void transaction() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void reportbank() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

}

Page 32: Credit Card Processing

CREDIT PAYMENT SERVICE

/**

*

*/

/**

* @author 29jecs58

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public class creditpaymentservice {

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private Integer pinno;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private Integer pwd;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private Integer transactpwd;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private customer customer;

Page 33: Credit Card Processing

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void checkaccount() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void pinnum() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void password() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

}

Page 34: Credit Card Processing

CUSTOMER

/**

*

*/

/**

* @author 29jecs58

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public class customer {

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private authenticationservice authenticationservice;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private String emailid;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private String pwd;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private String products;

Page 35: Credit Card Processing

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private Integer pinnum;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private Integer transpwd;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private Integer passwd;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private identityprovider identityprovider;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private creditpaymentservice creditpaymentservice;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

Page 36: Credit Card Processing

*/

public void login() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void makepurchase() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void viewproducts() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void selectproducts() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

Page 37: Credit Card Processing

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void payment() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void pinno() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void paswd() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}

}

Page 38: Credit Card Processing

IDENTITY PROVIDER

/**

*

*/

/**

* @author 29jecs58

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public class identityprovider {

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private String product;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private customer customer;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void showproducts() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}}

Page 39: Credit Card Processing

GUEST

/**

*

*/

/**

* @author 29jecs58

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public class guest {

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private String username;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private String emailid;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private String pwd;

/**

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

private authenticationservice authenticationservice;

/**

Page 40: Credit Card Processing

* @generated "UML to Java V5.0

(com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"

*/

public void register() {

// begin-user-code

// TODO Auto-generated method stub

// end-user-code

}}

RESULT:

Thus the java code is generated from class diagram of Credit Card Processing

Page 41: Credit Card Processing

IMPLEMENTATION OF USER INTERFACE LAYER

AIM:

To implement the User Interface Layer defined for the Credit Card Processing system.

PROCEDURE:

1. Select projectname (e.g javaconference)→Rightclick on the project name→

new →other→Java→ Visual class.

2. Give Next →Give Name(eg UILayer) → select style →swing → Frame →

enable public static void main as shown below → finish.

3. The UI layers .java tab will be opened with the JF Frame .

4. Right click on the JF Frame select as set layout → Null.

5. From the created JFrame select the palette which is present in the side of the

JFrame. From that palette you can draw Menu Bar, Menus, Menu Item,

Buttons, etc…

6. Change to open perspective (java) → go run button →run as → java

application.

Page 42: Credit Card Processing

1.LOGIN

import javax.swing.SwingUtilities;

import java.awt.BorderLayout;

import javax.swing.JPanel;

import javax.swing.JFrame;

import javax.swing.JTextArea;

import java.awt.Rectangle;

import javax.swing.JTextField;

import javax.swing.JLabel;

import javax.swing.JPasswordField;

import javax.swing.JButton;

public class uil extends JFrame {

private static final long serialVersionUID = 1L;

private JPanel jContentPane = null;

private JLabel Email_ID = null;

private JTextField jTextField = null;

private JLabel jLabel = null;

private JPasswordField jPasswordField = null;

private JButton jButton = null;

/**

* This method initializes jTextField

*

* @return javax.swing.JTextField

*/

private JTextField getJTextField() {

if (jTextField == null) {

jTextField = new JTextField();

jTextField.setBounds(new Rectangle(98, 27, 132, 20));

jTextField.setText("[email protected]");

}

return jTextField;

}

Page 43: Credit Card Processing

/**

* This method initializes jPasswordField

*

* @return javax.swing.JPasswordField

*/

private JPasswordField getJPasswordField() {

if (jPasswordField == null) {

jPasswordField = new JPasswordField();

jPasswordField.setBounds(new Rectangle(94, 58, 136, 20));

jPasswordField.setText("creditcard");

}

return jPasswordField;

}

/**

* This method initializes jButton

*

* @return javax.swing.JButton

*/

private JButton getJButton() {

if (jButton == null) {

jButton = new JButton();

jButton.setBounds(new Rectangle(82, 111, 96, 25));

jButton.setText("Login");

}

return jButton;

}

/**

* @param args

*/

public static void main(String[] args) {

// TODO Auto-generated method stub

SwingUtilities.invokeLater(new Runnable() {

Page 44: Credit Card Processing

public void run() {

uil thisClass = new uil();

thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

thisClass.setVisible(true);

}

});

}

/**

* This is the default constructor

*/

public uil() {

super();

initialize();

}

/**

* This method initializes this

*

* @return void

*/

private void initialize() {

this.setSize(300, 200);

this.setContentPane(getJContentPane());

this.setTitle("Login");

}

/**

* This method initializes jContentPane

*

* @return javax.swing.JPanel

*/

private JPanel getJContentPane() {

Page 45: Credit Card Processing

if (jContentPane == null) {

jLabel = new JLabel();

jLabel.setBounds(new Rectangle(22, 62, 65, 16));

jLabel.setText("Password");

Email_ID = new JLabel();

Email_ID.setBounds(new Rectangle(20, 28, 66, 16));

Email_ID.setText("Email_ID");

jContentPane = new JPanel();

jContentPane.setLayout(null);

jContentPane.add(Email_ID, null);

jContentPane.add(getJTextField(), null);

jContentPane.add(jLabel, null);

jContentPane.add(getJPasswordField(), null);

jContentPane.add(getJButton(), null);

}

return jContentPane;

}

} // @jve:decl-index=0:visual-constraint="48,41"

Page 46: Credit Card Processing

2.REGISTER

import javax.swing.SwingUtilities;

import java.awt.BorderLayout;

import javax.swing.JPanel;

import javax.swing.JFrame;

import javax.swing.JLabel;

import java.awt.Rectangle;

import javax.swing.JTextField;

import javax.swing.JPasswordField;

import java.awt.Dimension;

import javax.swing.JButton;

public class uil2 extends JFrame {

private static final long serialVersionUID = 1L;

private JPanel jContentPane = null;

private JLabel jLabel = null;

private JTextField jTextField = null;

private JLabel jLabel1 = null;

private JTextField jTextField1 = null;

private JLabel jLabel2 = null;

private JPasswordField jPasswordField = null;

private JPasswordField jPasswordField1 = null;

private JLabel jLabel3 = null;

private JButton jButton = null;

private JButton jButton1 = null;

/**

* This method initializes jTextField

*

* @return javax.swing.JTextField

*/

private JTextField getJTextField() {

if (jTextField == null) {

jTextField = new JTextField();

Page 47: Credit Card Processing

jTextField.setBounds(new Rectangle(109, 33, 109, 20));

jTextField.setText("Siddharth");

}

return jTextField;

}

/**

* This method initializes jTextField1

*

* @return javax.swing.JTextField

*/

private JTextField getJTextField1() {

if (jTextField1 == null) {

jTextField1 = new JTextField();

jTextField1.setBounds(new Rectangle(109, 67, 148, 20));

jTextField1.setText("[email protected]");

}

return jTextField1;

}

/**

* This method initializes jPasswordField

*

* @return javax.swing.JPasswordField

*/

private JPasswordField getJPasswordField() {

if (jPasswordField == null) {

jPasswordField = new JPasswordField();

jPasswordField.setBounds(new Rectangle(109, 96, 88, 20));

jPasswordField.setText("creditcard");

}

return jPasswordField;

}

/**

Page 48: Credit Card Processing

* This method initializes jPasswordField1

*

* @return javax.swing.JPasswordField

*/

private JPasswordField getJPasswordField1() {

if (jPasswordField1 == null) {

jPasswordField1 = new JPasswordField();

jPasswordField1.setBounds(new Rectangle(111, 128, 86, 20));

jPasswordField1.setText("creditcard");

}

return jPasswordField1;

}

/**

* This method initializes jButton

*

* @return javax.swing.JButton

*/

private JButton getJButton() {

if (jButton == null) {

jButton = new JButton();

jButton.setBounds(new Rectangle(32, 172, 75, 18));

jButton.setText("submit");

}

return jButton;

}

/**

* This method initializes jButton1

*

* @return javax.swing.JButton

*/

private JButton getJButton1() {

if (jButton1 == null) {

jButton1 = new JButton();

jButton1.setBounds(new Rectangle(131, 172, 68, 18));

Page 49: Credit Card Processing

jButton1.setText("reset");

}

return jButton1;

}

/**

* @param args

*/

public static void main(String[] args) {

// TODO Auto-generated method stub

SwingUtilities.invokeLater(new Runnable() {

public void run() {

uil2 thisClass = new uil2();

thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

thisClass.setVisible(true);

}

});

}

/**

* This is the default constructor

*/

public uil2() {

super();

initialize();

}

/**

* This method initializes this

*

* @return void

*/

private void initialize() {

this.setSize(300, 249);

this.setContentPane(getJContentPane());

this.setTitle("JFrame");

Page 50: Credit Card Processing

}

/**

* This method initializes jContentPane

*

* @return javax.swing.JPanel

*/

private JPanel getJContentPane() {

if (jContentPane == null) {

jLabel3 = new JLabel();

jLabel3.setBounds(new Rectangle(29, 129, 72, 16));

jLabel3.setText("confirm pwd");

jLabel2 = new JLabel();

jLabel2.setBounds(new Rectangle(30, 98, 62, 16));

jLabel2.setText("Pwd");

jLabel1 = new JLabel();

jLabel1.setBounds(new Rectangle(30, 66, 63, 16));

jLabel1.setText("Email_ID");

jLabel = new JLabel();

jLabel.setBounds(new Rectangle(32, 33, 62, 16));

jLabel.setText("Name");

jContentPane = new JPanel();

jContentPane.setLayout(null);

jContentPane.add(jLabel, null);

jContentPane.add(getJTextField(), null);

jContentPane.add(jLabel1, null);

jContentPane.add(getJTextField1(), null);

jContentPane.add(jLabel2, null);

jContentPane.add(getJPasswordField(), null);

jContentPane.add(getJPasswordField1(), null);

jContentPane.add(jLabel3, null);

jContentPane.add(getJButton(), null);

jContentPane.add(getJButton1(), null);

}

return jContentPane;

Page 51: Credit Card Processing

}

} // @jve:decl-index=0:visual-constraint="10,10"

Page 52: Credit Card Processing

3.PURCHASE

import javax.swing.SwingUtilities;

import java.awt.BorderLayout;

import javax.swing.JPanel;

import javax.swing.JFrame;

import javax.swing.JLabel;

import java.awt.Rectangle;

import javax.swing.JRadioButton;

import java.awt.Dimension;

import javax.swing.JButton;

public class juj extends JFrame {

private static final long serialVersionUID = 1L;

private JPanel jContentPane = null;

private JLabel jLabel = null;

private JLabel jLabel1 = null;

private JLabel jLabel2 = null;

private JRadioButton jRadioButton = null;

private JRadioButton jRadioButton1 = null;

private JRadioButton jRadioButton2 = null;

private JRadioButton jRadioButton3 = null;

private JRadioButton jRadioButton4 = null;

private JRadioButton jRadioButton5 = null;

private JButton jButton = null;

/**

* This method initializes jRadioButton

*

* @return javax.swing.JRadioButton

*/

private JRadioButton getJRadioButton() {

if (jRadioButton == null) {

jRadioButton = new JRadioButton();

jRadioButton.setBounds(new Rectangle(13, 75, 115, 21));

Page 53: Credit Card Processing

jRadioButton.setText("Samsung");

}

return jRadioButton;

}

/**

* This method initializes jRadioButton1

*

* @return javax.swing.JRadioButton

*/

private JRadioButton getJRadioButton1() {

if (jRadioButton1 == null) {

jRadioButton1 = new JRadioButton();

jRadioButton1.setBounds(new Rectangle(187, 72, 88, 21));

jRadioButton1.setText("Nokia");

}

return jRadioButton1;

}

/**

* This method initializes jRadioButton2

*

* @return javax.swing.JRadioButton

*/

private JRadioButton getJRadioButton2() {

if (jRadioButton2 == null) {

jRadioButton2 = new JRadioButton();

jRadioButton2.setBounds(new Rectangle(12, 110, 54, 21));

jRadioButton2.setText("Sony");

}

return jRadioButton2;

}

/**

* This method initializes jRadioButton3

*

* @return javax.swing.JRadioButton

Page 54: Credit Card Processing

*/

private JRadioButton getJRadioButton3() {

if (jRadioButton3 == null) {

jRadioButton3 = new JRadioButton();

jRadioButton3.setBounds(new Rectangle(12, 94, 71, 21));

jRadioButton3.setText("LG");

}

return jRadioButton3;

}

/**

* This method initializes jRadioButton4

*

* @return javax.swing.JRadioButton

*/

private JRadioButton getJRadioButton4() {

if (jRadioButton4 == null) {

jRadioButton4 = new JRadioButton();

jRadioButton4.setBounds(new Rectangle(186, 93, 82, 21));

jRadioButton4.setText("Ericsson");

}

return jRadioButton4;

}

/**

* This method initializes jRadioButton5

*

* @return javax.swing.JRadioButton

*/

private JRadioButton getJRadioButton5() {

if (jRadioButton5 == null) {

jRadioButton5 = new JRadioButton();

jRadioButton5.setBounds(new Rectangle(184, 111, 88, 21));

jRadioButton5.setText("Motorola");

}

return jRadioButton5;

Page 55: Credit Card Processing

}

/**

* This method initializes jButton

*

* @return javax.swing.JButton

*/

private JButton getJButton() {

if (jButton == null) {

jButton = new JButton();

jButton.setBounds(new Rectangle(90, 140, 94, 17));

jButton.setText("Purchase");

}

return jButton;

}

/**

* @param args

*/

public static void main(String[] args) {

// TODO Auto-generated method stub

SwingUtilities.invokeLater(new Runnable() {

public void run() {

juj thisClass = new juj();

thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

thisClass.setVisible(true);

}

});

}

/**

* This is the default constructor

*/

public juj() {

super();

Page 56: Credit Card Processing

initialize();

}

/**

* This method initializes this

*

* @return void

*/

private void initialize() {

this.setSize(300, 200);

this.setContentPane(getJContentPane());

this.setTitle("Purchase");

}

/**

* This method initializes jContentPane

*

* @return javax.swing.JPanel

*/

private JPanel getJContentPane() {

if (jContentPane == null) {

jLabel2 = new JLabel();

jLabel2.setBounds(new Rectangle(204, 47, 38, 16));

jLabel2.setText("Mobile");

jLabel1 = new JLabel();

jLabel1.setBounds(new Rectangle(36, 48, 38, 16));

jLabel1.setText("Tv");

jLabel = new JLabel();

jLabel.setBounds(new Rectangle(69, 19, 164, 16));

jLabel.setText("Select the product");

jContentPane = new JPanel();

jContentPane.setLayout(null);

jContentPane.add(jLabel, null);

jContentPane.add(jLabel1, null);

jContentPane.add(jLabel2, null);

Page 57: Credit Card Processing

jContentPane.add(getJRadioButton(), null);

jContentPane.add(getJRadioButton1(), null);

jContentPane.add(getJRadioButton2(), null);

jContentPane.add(getJRadioButton3(), null);

jContentPane.add(getJRadioButton4(), null);

jContentPane.add(getJRadioButton5(), null);

jContentPane.add(getJButton(), null);

}

return jContentPane;

}

} // @jve:decl-index=0:visual-constraint="160,72"

Page 58: Credit Card Processing

4.PAYMENT

import javax.swing.SwingUtilities;

import java.awt.BorderLayout;

import javax.swing.JPanel;

import javax.swing.JFrame;

import javax.swing.JLabel;

import java.awt.Rectangle;

import javax.swing.JTextField;

import javax.swing.JPasswordField;

import javax.swing.JButton;

import java.awt.Dimension;

public class amm extends JFrame {

private static final long serialVersionUID = 1L;

private JPanel jContentPane = null;

private JLabel jLabel = null;

private JTextField jTextField = null;

private JLabel jLabel1 = null;

private JPasswordField jPasswordField = null;

private JLabel jLabel2 = null;

private JPasswordField jPasswordField1 = null;

private JButton jButton = null;

/**

* This method initializes jTextField

*

* @return javax.swing.JTextField

*/

private JTextField getJTextField() {

if (jTextField == null) {

jTextField = new JTextField();

jTextField.setBounds(new Rectangle(154, 32, 107, 20));

jTextField.setText("01007064");

}

Page 59: Credit Card Processing

return jTextField;

}

/**

* This method initializes jPasswordField

*

* @return javax.swing.JPasswordField

*/

private JPasswordField getJPasswordField() {

if (jPasswordField == null) {

jPasswordField = new JPasswordField();

jPasswordField.setBounds(new Rectangle(154, 69, 94, 20));

jPasswordField.setText("creditcard");

}

return jPasswordField;

}

/**

* This method initializes jPasswordField1

*

* @return javax.swing.JPasswordField

*/

private JPasswordField getJPasswordField1() {

if (jPasswordField1 == null) {

jPasswordField1 = new JPasswordField();

jPasswordField1.setBounds(new Rectangle(152, 106, 94, 20));

jPasswordField1.setText("creditcards");

}

return jPasswordField1;

}

/**

* This method initializes jButton

*

* @return javax.swing.JButton

*/

private JButton getJButton() {

Page 60: Credit Card Processing

if (jButton == null) {

jButton = new JButton();

jButton.setBounds(new Rectangle(92, 143, 87, 19));

jButton.setText("submit");

}

return jButton;

}

/**

* @param args

*/

public static void main(String[] args) {

// TODO Auto-generated method stub

SwingUtilities.invokeLater(new Runnable() {

public void run() {

amm thisClass = new amm();

thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

thisClass.setVisible(true);

}

});

}

/**

* This is the default constructor

*/

public amm() {

super();

initialize();

}

/**

* This method initializes this

*

* @return void

*/

private void initialize() {

Page 61: Credit Card Processing

this.setSize(187, 145);

this.setContentPane(getJContentPane());

this.setTitle("Payment");

}

/**

* This method initializes jContentPane

*

* @return javax.swing.JPanel

*/

private JPanel getJContentPane() {

if (jContentPane == null) {

jLabel2 = new JLabel();

jLabel2.setBounds(new Rectangle(18, 105, 93, 16));

jLabel2.setText("TXN Password");

jLabel1 = new JLabel();

jLabel1.setBounds(new Rectangle(19, 67, 81, 16));

jLabel1.setText("Password");

jLabel = new JLabel();

jLabel.setBounds(new Rectangle(19, 30, 81, 16));

jLabel.setText("Pin_no");

jContentPane = new JPanel();

jContentPane.setLayout(null);

jContentPane.add(jLabel, null);

jContentPane.add(getJTextField(), null);

jContentPane.add(jLabel1, null);

jContentPane.add(getJPasswordField(), null);

jContentPane.add(jLabel2, null);

jContentPane.add(getJPasswordField1(), null);

jContentPane.add(getJButton(), null);

}

return jContentPane;

}

} // @jve:decl-index=0:visual-constraint="121,141"

Page 62: Credit Card Processing

RESULT:

Thus the user interface layers for Credit Card Processing is drawn

successfully.

Page 63: Credit Card Processing

UML COMPONENT DIAGRAM

AIM:

To identify the different components present in the Credit Card Processing system and

design an UML Component diagram.

PROCEDURE:

In Rational Software Architect's Model Explorer view, right-click Created UML

Design Model and select Add Diagram > Component Diagram as shown below.

COMPONENT DIAGRAM

RESULT:

Thus the component diagram for the project Credit Card Processing is drawn

successfully.

Page 64: Credit Card Processing

UML DEPLOYMENT DIAGRAM

AIM:

To illustrate the deployment of the Credit Card Processing system using UML

Component diagram.

PROCEDURE:

In Rational Software Architect's Model Explorer view, right-click Created UML

Design Model and select Add Diagram > Deployment Diagram as shown below.

DEPLOYMENT DIAGRAM

RESULT:

Thus the deployment diagram for the project Credit Card Processing is drawn

successfully.