Professional Documents
Culture Documents
UML_PROJECT.docx
UML_PROJECT.docx
Assistant Professor
CONTENTS
(I)PROBLEM STATEMENT
(X) RESULT
(I)PROBLEM STATEMENT:
· Many discerning online shoppers will not give their credit card to an
“untrusted” online merchant (you may want to consider being part of the
Better Business Bureau or similar organization to add credibility). So
there is a need of online and trusted credit card processing.
1.0 INTRODUCTION
The two purchase options for Credit Card Processing facility are:
∙ Validation only
1.1 PURPOSE
1.2 SCOPE
∙ Automatically connects to your financial network for credit card
authorizations and settlements
1.3 OVERVIEW
SRS includes two sections overall description and specific
requirements – Overall Description will describe major role of the system
components and interconnections.
2) Authorization Service
2.4 CONSTRAINTS
(III)USECASE DIAGRAM:
Creating Account: Used to create account.
Bank Enquiry: Used to get the bank enquiry like pin code to verify your
user account.
Purchase the item: Used to list out the purchase details in shop.
Prepare the bill: Used to issuing the bill for the purchased item.
ACTORS INVOLVED
Credit card processor collects billing information from the customer via a
secure connection.
The transaction details are recorded by the credit card processor and
results are securely relayed to the merchant. Merchant’s site receives
transaction result and does appropriate actions (e.g. saves the order &
shows message).
Customer
Banker
Retailer
The main task of object modelling is to graphically show what each object will do in
the problem domain. The problem domain describes the structure and the
relationships among objects.
The Credit Card Processing system class diagram consists of three classes.
They are
1. Banker
2. Customer
3. Retailer
CLASS DIAGRAM
♣ The event line represents a message sent from one object to another,
in which the “form” object is requesting an operation be performed by the
“to” object.
♣ The “to” object performs the operation using a method that the class
contains.
♣ It is also represented by the order in which things occur and how the
objects in the system send message to one another.
1: SELECT BANK
2: CREATING ACCOUNT
3: REQUESTING CARD
4:ENQUIRY
5: ISSUED CARD
6: SELECT SHOP
7: PURCHASE ITEM
9: PREPARING BILLS
6: SELECT SHOP
1: SELECT BANK
2: CREATING ACCOUNT
3: REQUESTING CARD
4: ENQUIRY
COLLABORATION DIAGRAM
START
[ NEW ACCOUNT ]
EXISTING ACCOUNT
REQUEST TO BANK
[ CUSTOMER
ENQUIRY ]
BANK PROCESSING
[SATISFIED
CUSTOMER]
END
#include <string>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <limits>
//#include <windows.h>
#include <conio.h>
#include <stdio.h>
#include <time.h>
void newline(){
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
void timer()
system("cls");
int sec,min,hour,milisecouds;
sec=0;
min=0;
hour=0;
milisecouds=0;
for(hour=0;hour<8760;)
system("cls");
newline();
if (milisecouds==10){
++sec;
milisecouds=0;
if (sec=60){
++min;
sec=0;
if (min==60){
++hour;
min=0;
++milisecouds;
//
Sleep(0.000000000000000000000000000000000000000000000000000000000000
000000000001);
if (hour==8760);
else if(min==0);
else if(sec=0){
break;
void menu();
void newUser();
void give();
void take();
void review();
void money();
bool valid(string,string);
int i=0;
struct user {
string name;
string surname;
string CC;
int date;
float amount;
};
int main() {
// system("color 0f");
menu();
void menu() {
// system("cls");
int o;
cout << " 1. Input new user" << endl << endl;
cout << " 2. Input your deposit" << endl << endl;
cout << " 3. Input the amount you willing to take" << endl << endl;
cout << " 4. Review the users by surname, name and credit card number" <<
endl << endl;
cout << " 5. State of the credit card" << endl << endl;
cout << " 6. Exit" << endl << endl << endl;
switch(o) {
int n;
case 1:
newUser();
menu();
break;
case 2:
give();
menu();
break;
case 3:
take();
menu();
break;
case 4:
review();
menu();
break;
case 5:
money ();
menu();
break;
case 6:
exit(1);
}
}
void newUser() {
// system("cls");
int n=1;
int date;
string CC;
float amount;
user a[5000];
ofstream newUser;
for(i=0;i<n;i++) {
if(v) {
break;
}
a[i].name=name;
a[i].surname=surname;
a[i].CC=CC;
a[i].date=date;
a[i].amount=amount;
cout << "\n\n\nThe user has been successfully entered..." << endl << endl <<
endl;
amount=1000;
newUser << a[i].surname << ' ' << a[i].name << ' ' << a[i].CC << ' ' <<
a[i].amount << ' ' << a[i].date << endl;
newUser.close();
sorting << surname << ' ' << name << ' ' << CC << endl;
sorting.close();
sum.close();
//system ("pause");
void give() {
// system ("cls");
string cc;
fstream sum;
user a;
float add;
if (sum) {
while (!sum.eof()) {
if (cc==a.CC){
cout << "\nYour credit card has been found!" << endl;
cout << "\nEnter the amount of money you willing to add: ";
pom+=add;
a.amount = a.amount+pom;
sum.seekg(ios::cur);
sum << a.surname << ' ' << a.name << ' ' << a.CC << ' ' << a.amount <<
endl;
cout << "\nThe amount you've entered has been successfully added!" <<
endl << endl;
sum.close();
break;
// system ("pause");
void take() {
// system ("cls");
string cc;
fstream sum;
user a;
float take;
if (sum) {
while (!sum.eof()) {
if (cc==a.CC){
cout << "\nYour credit card has been found!" << endl;
cout << "\nEnter the amount of money you're willing to take: ";
pom+=take;
a.amount = a.amount-pom;
sum.seekg(ios::cur);
sum << a.surname << ' ' << a.name << ' ' << a.CC << ' ' << a.amount <<
endl;
cout << "\nThe amount you've entered has been successfully removed!"
<< endl << endl;
sum.close();
break;
// system ("pause");
void review () {
// system ("cls");
user a[5000];
string name;
string surname;
string CC;
cout << "Review of the users by surname, name and credit card" << endl;
ifstream sorting("sorting.txt");
cout << surname << ' ' << name << ' ' << CC << endl;
// system("pause");
}
void money () {
// system ("cls");
user a[5000];
string name;
string surname;
string CC;
float amount;
ifstream sum("sum.txt");
cout << surname << ' ' << name << ' ' << CC << ' ' << amount << endl;
//system ("pause");
bool y=false;
size=name.length();
size2=surname.length();
if (size>15 || size2>15)
y=true;
if (isdigit(name[i]))
y=true;
if (isdigit(surname[i]))
y=true;
return y;