You are on page 1of 51

Automated Online Shopping Mall System

Computing and Concurrent


Systems Design
CE00361-3
Individual Assignment
Automated Online Shopping Mall System
Hand Out: th February 2013
Hand In:

th

April 2013

Submitted By:

Submitted By:

Niro Thakur

Mrs. Kirti Arora

PT0981149

Module Lecturer

APIIT SD INDIA

Page 1

Automated Online Shopping Mall System

ACKNOWLEDGMENT
It was a great experience working on the Computing and Concurrent Systems Design module
assignment Automated Online Shopping Mall System. It is a pleasure to be able to thank all
those people who helped me in making this project successfully. First of all, I want to thank my
module lecturer Ms. Kirti Arora who guided me very well throughout the development. She has
given me the required guidance as and when I have approached her.
I am also thankful to the library staff for providing me necessary books related to my project. I
would like to thank APIIT SD INDIA, Panipat for giving me the opportunity to work in a
friendly environment and also supporting me directly or indirectly.
Lastly, I would like to thank all those whose names may not have appeared here but whose
contribution has not gone unnoticed. I would like to thank all of them, for their help in various
ways.

Niro Thakur
PT0981149

APIIT SD INDIA

Page 2

Automated Online Shopping Mall System

TABLE OF CONTENTS
Contents
Acknowledgment........................................................................................................ 2
Table of Contents........................................................................................................ 3
Introduction.................................................................................................................... 4
Assumption.................................................................................................................... 6
1.1.

SYSTEM MODELING........................................................................................ 6

1.2.

SYSTEM REQUIREMENTS................................................................................7

1.3.

1.3 BASIC REQUIREMENT OF THE SYSTEM.....................................................8

1.4.

1.4 BASIC FUNCTIONALITY............................................................................8

1.5 SPECIAL FUNCTIONALITY................................................................................... 9


1.6 WORKFLOW OF AOSMS AS PER THE REQUIREMENTS........................................9
1.8 MODELING......................................................................................................... 9
1.9 IMPLEMENTATION............................................................................................ 10
1.9.1 ENTITIES....................................................................................................... 10
1.9.2 EVENTS......................................................................................................... 10
1.9.3 INTERACTIONS.............................................................................................. 11
1.9.4 ACTIONS....................................................................................................... 11
1.9.5 IDENTIFY MAIN PROPERTIES.........................................................................12
1.9.6 GOAL OF THE SYSTEM.................................................................................. 12
1.9.7
1

WORK FLOW OF SYSTEM...........................................................................12

Structure Diagram................................................................................................... 13

4.0

Appropriateness of coding techniques used to implement design.......................................17

5.0

Appropriateness of Java Concurrent Programming facilities used......................................19

5.1 Concurrent Programming............................................................................................ 19


8. Usefulness of instructions for compiling and running the program including comment lines in source
codes.......................................................................................................................... 39
9.
10.

EVALUATION AND TESTING................................................................................45


Depth of Discussion.............................................................................................. 49

APIIT SD INDIA

Page 3

Automated Online Shopping Mall System


11.

CRITICAL APPRAISAL...................................................................................... 50

12 Future Enhancement SYSTEMS...................................................................................50


13

CONCLUSIONS................................................................................................. 50

14 References............................................................................................................... 51

APIIT SD INDIA

Page 4

Automated Online Shopping Mall System

INTRODUCTION
With advancement in the computing era, the expectations of users from an Information System
increases substantially .Automated Online Shopping Mall systems based on client/server
architecture it means the systems allow for multiple clients to interact with a server at once, and
hence require the server to be safe when operating concurrently.
The Automated Online Shopping Mall System will service multiple customers at a time. The
system provides following services to the customer Sign Up: - A customer must register with system before accessing the functionality. After
registration the customer get user id and password with the help of user id and password
the customer login with the system and used functionality.
Searching the products based on their brand: - The customer can search the product
availability based on brand by selecting the brand a pop up window will open which
contains all information about the product like product name, product quantity, product
id, date of uploading the product and product price.
Check the availability of the products:- The customer can also search the product
quantity of specific product by entering the product name .If the product are not
available a simple message will display Product unavailable and if the product are
available then the product quantity will be display.
Discounts details: - In automated online shopping mall system the customer get discount
based on the purchase amount. If the purchase amount is greater than Rs.5000/- then
customer get 5% discount otherwise no discount.
Placing an order: - A customer can purchase the available product. The system should
get the customer details such as name, age, address, phone, mode of payment, product
name he/she wants to buy and the quantity of the product.
Cancelling an order: - Customer can cancel the order of product by pressing the cancel
button. After pressing the cancel button the product are deleted from the customer order
and the quantity are updated in the product detail.
Bill-Generation: - The customer can get the bill details after successfully paying the
product amount.
Check Status: - A customer can check the status of product after successfully paying the
product amount.
Pay-Bill: - A customer can make a payment by entering a 16-digits code from his/her
account. If the pay bill is successfully received then the product quantity of the products
are updated.
APIIT SD INDIA

Page 5

Automated Online Shopping Mall System


Abort Transaction: - A customer can abort a transaction in progress by pressing the
Cancel key instead of responding to a request from the machine.
Automated Online Shopping Mall System will allow for multiple clients to interact with a server
at once and hence require the server to be safe when operating concurrently. So, this assignment
has been designed to apply appropriate concurrent program design methods in designing and
implementing a concurrent program from a program specification.
Multiple clients can login with the system at the same time. So, here is the use of
concurrent programming.
Eg. Multiple customer are login at the same time to search the product according to the
brand and individual product but not able to buy the product. Because the system
cannot handle with the deadlock so that no two customer can purchase the product at
the same time.

ASSUMPTION

1.1.

The proposed system is not using internet connection while purchasing or searching the
product.
16-digit verification code are assumed corresponding to the specific customer. Because in
this system purchasing the products only after when customer enters verification code.
Assumed that the system provide computer product.
Price and Discount are assumed for these products according the purchase amount. In the
Automated Online shopping Mall System the discount is only be credited when the
customer purchase more then 5000/-.

SYSTEM MODELING

The Online Shopping Mall System should be implemented in Java by strictly stay to the
modeling approach and converted into an executable Java application. The following diagram
shows how the entire system was designed and developed.
The very first stage of system modeling is gathering and analyzing the requirements.
After that, the requirements were translated into a structure diagram, FSP and LTS. Eventually,
the system was built in Java with greater use of Java concurrency features.

APIIT SD INDIA

Page 6

Automated Online Shopping Mall System

1.2.

RMI m eo pqd lue i lmri en emg n etan tits o n

S
Y
S
T
E
M

REQUIREMENTS

The requirement of the assignment is to develop Automated Online Shopping Mall System, A
main interface to carry all the options available to customer containing features like: Sign Up: - A customer must register with system before accessing the functionality. After
registration the customer get user id and password with the help of user id and password
the customer login with the system and used functionality.
Searching the products based on their brand: - The customer can search the product
availability based on brand by selecting the brand a pop up window will open which
contains all information about the product like product name, product quantity, product
id, date of uploading the product and product price.
Check the availability of the products:- The customer can also search the product
quantity of specific product by entering the product name .If the product are not
available a simple message will display Product unavailable and if the product are
available then the product quantity will be display.
Discounts details: - In automated online shopping mall system the customer get discount
based on the purchase amount. If the purchase amount is greater than Rs.5000/- then
customer get 5% discount otherwise no discount.
Placing an order: - A customer can purchase the available product. The system should
get the customer details such as name, age, address, phone, mode of payment, product
name he/she wants to buy and the quantity of the product.
APIIT SD INDIA

Page 7

Automated Online Shopping Mall System


Cancelling an order: - Customer can cancel the order of product by pressing the cancel
button. After pressing the cancel button the product are deleted from the customer order
and the quantity are updated in the product detail.
Bill-Generation: - The customer can get the bill details after successfully paying the
product amount.
Check Status: - A customer can check the status of product after successfully paying the
product amount.
Pay-Bill: - A customer can make a payment by entering a 16-digits code from his/her
account. If the pay bill is successfully received then the product quantity of the products
are updated.
Abort Transaction: - A customer can abort a transaction in progress by pressing the
Cancel key instead of responding to a request from the machine.

1.3. 1.3 BASIC REQUIREMENT OF THE SYSTEM


An automated Online Shopping Mall System must be able to provide the following services to
the customer:
S No.
Requirements
1.
A customer must be register with the system to access all the feature of automated
online Shopping Mall System. When the customer register with the system the system
will take name, address, phone no, age, user name, password of the user and provide
user name and password by which customer can login with system
2
A customer must be able to check the availability of product (in the required
quantity). If the product is not available, a short message will appear as product
unavailable will be displayed to the customer.

APIIT SD INDIA

Page 8

Automated Online Shopping Mall System


3
The customer can search the product availability based on brand by selecting the
brand a pop up window will open which contains all information about the product
like product name, product quantity, product id, date of uploading the product and
product price.
4.
A customer must be able to buy the products available. The system should get the
customer details such as name, age, address, phone, mode of payment, product(s)
he/she wants to buy and the quantity of the product.
5.
A customer must be able to check the price of the product, product details, and status
of confirmation of his/her order.
6.
A customer can cancel the order and the status of the available products should be
updated in order to maintain the integrity and consistency.
7.
A customer must be able to make a payment by entering a 16-digits code from any
suitable account linked to any credit card to pay the price. Proper validation should be
there.
8.
The customer can check the ordered items payment details and order confirmation.
9.
A customer must be able to abort a transaction in progress by pressing the Cancel key
instead of responding to a request from the machine.
10.
The software should provide search options. If the product brand is entered then all the
products of that brand along with their price details should be displayed for the
customer.

1.4.
Serial
1.
2.

1.4 BASIC FUNCTIONALITY


Functionality
Customer registration before accessing the functionality of the system
Customer must login with the system to access all the feature and then logout

3.
4.
5.
6.
7.

Product search according to brand name


Check availability of the product
Purchasing the available product
Payment should be done by the customer to confirm the product purchase details
Adding the product to the cart

8.
9.

Order cancelation module by which customer cancel the purchase product


Check order Confirmation of the product either the product is delivered or pending

1.5 SPECIAL FUNCTIONALITY


1. To make payment from verification code of 16 digit with three tries. If the customer is
not able to verify the code after three tries the system will navigate the customer to
purchase to product module.
APIIT SD INDIA

Page 9

Automated Online Shopping Mall System


2. To abort transaction in any stage of ordering the product quantity will be updated in the
product details.
3. Maintain log to rollback in case of hardware failure or any circumstances.
4. The user can change the password.

1.6 WORKFLOW OF AOSMS AS PER THE REQUIREMENTS


A customer will be providing user name and password for validation. The customer will then be
able to perform one or more actions. A 16 digit verification number will be entered in regards to
pay the purchase the bill of any product. The Automated Online Shopping Mall System will
verify all the actions taken. If the customer's verification number is invalid the customer will be
required to re-enter the Credit Card number before an action to be proceed. If the customer is
unable to successfully enter the verification code number after three tries, the transaction will be
cancelled and the system will redirect to the product information page.

1.7

SYSTEM MODELING

After analyzing all basic requirements, basic functionality and special requirement of the system
modeling is started. System modeling will help us to recognize how to improving and
understanding of a situation, how to identifying problems or how to formulating opportunities
and supporting decision making.
Different models present the system from different perspectives. For modeling the system we
have to go further steps first of all we identifying following things
Main events, actions and interactions.
Identify main processes.
Identify main properties.
Define and structure each process
Then after we go for creating Model outline design, Model system in FSP then accordingly
generates LTSA. Implements safety and Liveliness property and then we evaluate and test the
traces.

1.8 MODELING
S.no
1.
2.
3.
4.
5.
6.
7.

Modeling:
Create model outline design.
Model the system in FSP.
Generate LTS.
Implement Safety and Liveliness property.
Evaluate and test the traces.
Identify the main activities -> to be implemented as threads.
Identify the main shared entities ->to be implemented as monitors.

1.9 IMPLEMENTATION
S.no
1.

Implementation:
Create the Class Diagram.

APIIT SD INDIA

Page 10

Automated Online Shopping Mall System


2.
3.
4.

Using threads plan concurrency part implementation.


Using threads implement the concurrency part.
Integrate the system.

1.9 CONVERSION OF REQUIREMENT INTO MODELS


The following section identifies, categorizes and lists the entities, events and interactions.

1.9.1 ENTITIES
Entity
LOGIN

Description
After registration Customer get user id and password for login into the system

CUSTOMER

Customer who will use the System. It includes all the information of the
registered user.
When Customer orders the products the information about the ordered product
and whom these products are ordered are stored here. Order can be ordered or
cancelled.
Product is an entity containing all the products information with unique product
code.
For getting payment from customer after purchasing products includes Bank
information which is stored in this entity.
To generate bill report.
To generate user log maintenance. It is for rollback in case of any interruption
in the process

CUSTOMER
ORDER
PRODUCT
ACCOUNT
BILL
LOG

1.9.2 EVENTS
Events
Login

Description
When a random user wants to login for
accessing functionalities.
Product Search Customer searches details of the products based
on their brand
Check
Customer selects a particular product and
Availability
checks for availability of product
Payment
After giving order give payment.
Three tries for As making payment is confidential resource
payment
and the developer is not allowing customers to
make any no. of fake tries.
Give Order
customer can give order if products are
available
Cancelation
The customer can cancel the order.
View Status
To display the status of a purchased product.
Bill Generation View billing of all purchased or cancelled
order.
Discount Detail
Payment Code
APIIT SD INDIA

Entities Required
CUSTOMER
PRODUCT,CUSTOMER
PRODUCT,CUSTOMER
ORDER,PRODUCT,BANK
BANK
CUSTOMER,ORDER,
PRODUCT
ORDER, PRODUCT
ORDER
ORDER

To view discount and price details of the PRODUCT


product
System will ask customer to enter 16 digit BANK
payment code
Page 11

Automated Online Shopping Mall System

1.9.3 INTERACTIONS
Number
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

Customer approaching to AOSMS


AOSMS will be deployed online for accessing from various terminals.
Valid customer can access the system.
For a new customer registration facility will be available.
Search for products detail based on their brand
Available all products gets listed along with details such as price, discount, brand
and quantity
Customer can select any product of their choice.
Customer can check availability of the product by entering product name.
Customer can purchase product even if products are available.
Customer fills details of account number and verification code during payment.
Customer can check the ordered items payment details and order confirmation.
Order can be cancelled at anytime.
If payment event is a success the order is confirmed.
If the customer is unable to successfully enter the verification code number after
three tries, the action should be canceled automatically.
Finally the order will be canceled and database is updated.

11.
12.
13.
14.
15.

Customer can check for status of Order Details with Customers Details for each
successful paid bill.
And at last the customer will logged out from AOSMS.
A log file of each transaction will be maintained for the Administrative use.

16
17

1.9.4 ACTIONS
Process
LOGIN
CUSTOMER
ORDER
PRODUCT
BANK
BILL
LOG

Action
userid, password,match, nomatch
userid,password,checkproduct,giveorder,checkdiscount,verificationcode,
givepayment
orderid, giveorder, verificationcode, givepayment
availableproduct, productdetail, checkbrand, discountdetail
Accountnumber, verificationcode
Displaybill,printbill
Displaylog

1.9.5 IDENTIFY MAIN PROPERTIES

User cannot enter the main page without login to the system with incorrect password.
User can enter the verification code number only for 3 times only the can order the
product otherwise it will cancel.
Multiple users cannot allow purchasing the same products at the same time.

1.9.6 GOAL OF THE SYSTEM


The system Automated online shopping mall system is to be designed for the customer for
online shopping. The main goal of the system is to provide maximum facility to the customer
APIIT SD INDIA

Page 12

Automated Online Shopping Mall System


like check the product availability , details of the products, to add/remove the items in the
cart, customer details (sign up), discounts details, placing/cancelling an order, bill generation,
searching the products based on their brand.

1.9.7 WORK FLOW OF SYSTEM

1 STRUCTURE DIAGRAM
1. LOGIN

APIIT SD INDIA

Page 13

Automated Online Shopping Mall System

2. SEARCH_PRODUCT

3. PRODUCT_AVAILABILITY

APIIT SD INDIA

Page 14

Automated Online Shopping Mall System


4. GIVE_ORDER

5. MAKE_PAYMENT

APIIT SD INDIA

Page 15

Automated Online Shopping Mall System

6. CANCEL_ORDER

7. VIEW_STATUS

APIIT SD INDIA

Page 16

Automated Online Shopping Mall System


8. AUTOMATED_ONLINE_SHOPPING_MALL_SYSTEM

APIIT SD INDIA

Page 17

Automated Online Shopping Mall System

4.0 APPROPRIATENESS OF CODING TECHNIQUES USED


TO IMPLEMENT DESIGN
The coding technique used in the system to implement the design of the system. Coding takes a
vital role in the implementation for software development. Although they generally do not have
any impact on the operation of the application, they contribute to an improved understanding of
the source code. The developer has followed following coding techniques1. Proper Comments are used:

For understanding purpose comments are very helpful. If any third party user want to
understand what is happening in these codes then proper comments give them ideas.
Comments are given to the methods, any logic applied then their would be provides
comments. Following are the code where I have applied proper comments.

//calling open() function by static class name


connection.open();
//matching product quantity by product name from database
connection.rs=connection.stm.executeQuery("SELECTemail,password,name
from registration where email='" + txt1.getText() + "'");
//checking condition that If quantity of product are greater than zero then
displays the message otherwise message displays product are not Available
Selecting the quantity from product details and store it into a and getting the
quantity filled by user and store it into b then checking (a-b) . If (a-b)>0 then
purchase the product otherwise message displayed product not available.
/** Creates a new instance of Customer */
Creating a new Instance of any class new keyword are used
new customer();

2. Naming convention are used:


I have followed proper naming convention so that any one can identify each kind of thing
like
Classes Name starts with Capital letter- E.g. customer
Textfield name stars with txt e.g. txt_username
Label name stars with lbl e.g. lbl_username
JComboBox starts with eg:jcom
Button name start with btn e.g. btn_home
Creating a Frame e.g. JFrame f1=new JFrame();
JTable tb,tb1;
APIIT SD INDIA

Page 18

Automated Online Shopping Mall System


DefaultTableModel model,model1;
JScrollPane sb,sb1;

3. Indentation are used:


Indentation helps to finding which loop comes under which section , up to where loop
ends. It is easy to find which things come under what section.
Here is the example which I have giving proper indentation
txtcname.addKeyListener(new KeyAdapter()
{
public void keyTyped(KeyEvent e)
{
String input = txtcname.getText();
Pattern p = Pattern.compile("[0-9]");
Matcher m = p.matcher(input);
if (m.find())
{
lblname.setText("* only Text Value");
lblname.setVisible(true);
lblname.setForeground(Color.red);
}
Else
{
lblname.setVisible(false);
}
}
});
4. Classes and Methods:
Use of class for abstraction & packaging the methods into one structure
E.g. - public class user implements ActionListener
Use of methods to provide modularity & reusability
E.g. public void getcID()
Static method are used which is used to call with class name. Developer creating
the connection class which is used to create connection through out the project
insite the connection class three static methods are used.
public static Connection con = null;
public static Statement stm = null;
APIIT SD INDIA

Page 19

Automated Online Shopping Mall System


public static ResultSet rs = null;

APIIT SD INDIA

Page 20

Automated Online Shopping Mall System

5.0 APPROPRIATENESS OF JAVA CONCURRENT


PROGRAMMING FACILITIES USED
Concurrent Programming:
The operations for each stream are strictly ordered, but the interleaving of operations from a
collection of streams is undetermined and depends on the vagaries of a particular execution of
the program. One stream may run very fast while another does not run at all. In the absence of
fairness guarantees, a given thread can starve unless it is the only runnable thread.
In a concurrent program, several streams of operations may execute concurrently. Each stream of
operations executes as it would in a sequential program except for the fact that streams can
communicate and interfere with one another. Each such sequence of instructions is called a
thread. For this reason, sequential programs are often called single-threaded programs. When
a multi-threaded program executes, the operations in its various threads are interleaved in an
unpredictable order subject to the constraints imposed by explicit synchronization operations that
may be embedded in the code.
There are several reasons for a programmer to be interested in concurrency:
1. To better understand computer architecture (it has a great deal of concurrency with
pipelining (multiple steps) and super-scalar (multiple instructions)) and
2. some problems are most naturally solved by using a set of co-operating processes,
3. A sequential solution constitutes over specification, and
4. To reduce the execution time.

5.1 CONCURRENT PROGRAMMING


5.1.1. Threads:
There are two ways to create thread in java;

Implement the Runnable interface

By Extending the Thread class

The Runnable Interface Signature


public interface Runnable
{
APIIT SD INDIA

Page 21

Automated Online Shopping Mall System


void run();
}

Thread
Explanation
public class login extends JFrame implements The idea behind using threads in login is to
ActionListener,Runnable
allow multiple users to login into the system at
{
the same time.
void callThread()
This is the main class from where the project
{
starts and this class instantiate the login, so to
new Thread().start();
maintain multiple logins, the login is
}
instantiated with the help of Threads.
public void run()
{
setVisible(true);
}

5.1.2. MONITORS AND SEMAPHORE


Active entities (that initiate actions) are implemented as threads.
Passive entities (that respond to actions) are implemented as monitors
Java provides many other features for safety and for avoiding deadlock. This is mainly
accomplished by using monitors in Java.
The following is the code extract from the projectCode
//synchronizedkeyword is used for lock on the
object in which one user work at one time.
private synchronized void updateData()
{
String s3=Integer.toString(result);
try{
String stuser=txtuser.getText();
connection.open();
connection.rs=connection.stm.executeQuery
("select account_no from account where
user_name='" +stuser+ "'");
while(connection.rs.next())
{
s1=connection.rs.getString(1);
}

APIIT SD INDIA

Page 22

Explanation
Method updateData() is called only when
the users ordering the same item at the
same time that is ordered by other.
Synchronized is used so that only one
customer can buy same item at a time and
after updating the record it is released for
other customer.

Automated Online Shopping Mall System

Developer has followed the three citeria


1. Multiple clients can search or login the system at the same time. So, here is the use of
concurrent programming. Eg. Multiple customer are login at the same time
This condition has achieved by following methodsFollowing code allows multiple users can login into the system at the same time.
public class login extends JFrame implements ActionListener,Runnable
{
void callThread()
{
new Thread().start();
}
public void run()
{
setVisible(true);
}
2. Multiple clients can update and purchasing product at one time which lead to handle
issue of data corruption. Eg. Only one customer can purchase and update same item
at one time

private synchronized void updateData()


{
String s3=Integer.toString(result);
try{
String stuser=txtuser.getText();
connection.open();
connection.rs=connection.stm.executeQuery("select account_no from account where
user_name='" +stuser+ "'");
while(connection.rs.next())
{
s1=connection.rs.getString(1);
}

3. For handling the issue of deadlock this system provides locks in which multiple clients
can lock on multiple resources at one time. Eg. At one time more than one person
updating thing by providing proper locks on of the database.

APIIT SD INDIA

Page 23

Automated Online Shopping Mall System


Same product cannot be updated at the same time so developer would be provided proper
locks into the system for data accuracy. Developer has allowed one by one access by using
synchronized method & as soon as one user buy the product then notifyAll gets called to
allow other user to buy the product.

6. PROGRAM RUN APPROPRIATELY


6.1 Login
6.1.1
Description
6.1.2
Assumption
6.1.3
FSP
6.1.4
JAVA Code

Only registered customer are using the system.


Assuming that two customer a and b login into the system
CUSTOMER=(enter_username->enter_password->VALIDATELOGIN),
VALIDATELOGIN=(invalid_Login->CUSTOMER|check_valid_Login->ok>goHomepage->logout->CUSTOMER).
||MULTPLE_LOGIN=({a,b}:CUSTOMER).
public void validateuser()
{
String s1=txt1.getText();
String s2=txt2.getText();
try
{
connection.open();//Connection open
//selecting username and password from database
connection.rs=connection.stm.executeQuery("SELECT
email,password,name from registration where email='" + txt1.getText() + "'");
while(connection.rs.next())
{

6.1.5
LTSA
&
TRACES

APIIT SD INDIA

Page 24

Automated Online Shopping Mall System

11.1.6
Safety
Progress
Description

No deadlocks/errors
Progress Check...
-- States: 36 Transitions: 84 Memory used: 15274K
No progress violations detected.
Progress Check in: 0ms

6.2 Check Availability


6.2.1
Customer can check that product are available or not
Description
6.2.2
Assuming that user has entered a valid login for accessing the system.
Assumption
6.2.3
PRODUCT_AVAILABILITY=(valid_Login->enter_ProductNameFSP
>check_Availability->message_Shown->STOP)\{valid_Login,message_Shown}.
6.2.4
//checking condition product are Available or Not
JAVA Code
rs = connection.stm.executeQuery("select quantity from product_detail
where pname='" +txtid.getText()+ "'");
if(rs.next())
{
stq=rs.getString(1);
if(stq.equals("0"))
{
JOptionPane.showMessageDialog(null,"product unavailable");
6.2.5
LTSA
&
TRACES

APIIT SD INDIA

Page 25

Automated Online Shopping Mall System

6.2.6
Safety

6.2.7
Progress
Description

Composition:
DEFAULT = PRODUCT_AVAILABILITY
State Space:
5 = 2 ** 3
Analysing...
Depth 5 -- States: 5 Transitions: 4 Memory used: 17241K
Trace to DEADLOCK:
tau
enter_ProductName
check_Availability
tau
Analysed in: 0ms
Composition:
DEFAULT = PRODUCT_AVAILABILITY
State Space:
5 = 2 ** 3
Progress Check...
-- States: 5 Transitions: 4 Memory used: 18281K
Finding trace to cycle...
Depth 4 -- States: 4 Transitions: 4 Memory used: 18681K
Finding trace in cycle...
Progress violation for actions:
{check_Availability, enter_ProductName}
Trace to terminal set of states:
tau
enter_ProductName
check_Availability
tau
Cycle in terminal set:
Actions in terminal set:
{}
Progress Check in: 0ms

6.3 Product Search by Brand


6.3.1
After login into the system Customer can search the product bye selecting the
APIIT SD INDIA

Page 26

Automated Online Shopping Mall System


Description

brand of product

6.3.2
Assumption
6.3.3
FSP
6.3.4
JAVA Code

Assuming that customer can valid login into the system


SEARCH_PRODUCT=(valid_Login->request->enter_Productbrand>get_Detail->release->STOP)\{valid_Login,enter_Productbrand,get_Detail}.
QUERY
connection.open();
rs = connection.stm.executeQuery("select quantity from
product_detail where pname='" +txtid.getText()+ "'");
if(rs.next())

6.3.5
LTSA
&
TRACES

6.3.6
Safety

6.3.7
Progress
Description

Composition:
DEFAULT = SEARCH_PRODUCT
State Space:
6 = 2 ** 3
Analysing...
Depth 6 -- States: 6 Transitions: 5 Memory used: 17384K
Trace to DEADLOCK:
tau
request
tau
tau
release
Analysed in: 0ms
Composition:
DEFAULT = SEARCH_PRODUCT
State Space:
6 = 2 ** 3
Progress Check...
-- States: 6 Transitions: 5 Memory used: 18837K

APIIT SD INDIA

Page 27

Automated Online Shopping Mall System


Finding trace to cycle...
Depth 5 -- States: 5 Transitions: 5 Memory used: 19237K
Finding trace in cycle...
Progress violation for actions:
{release, request}
Trace to terminal set of states:
tau
request
tau
tau
release
Cycle in terminal set:
Actions in terminal set:
{}
Progress Check in: 0ms
6.4 Give Order
6.3.1
Same product are not ordered by multiple user. Only one customer are allowed
Description to buy product at one time
6.3.2
Assumed that two customer a and b and ITEM number is 0 and 1
Assumption
6.3.3
const False = 0
FSP
const True = 1
range Bool = False..True
ITEM = ITEM[False],
ITEM[ordered:Bool]
=(
check -> (when (ordered) giveOrder -> ERROR
|when(!ordered) giveOrder -> ITEM[True]) //error of ordered
twice
).
range N = 0..1
||PRODUCTS = (item[N]:ITEM).
LOCK = (acquire ->release -> LOCK).
BROKENLOCK = ({acquire,release}->BROKENLOCK).
CUSTOMER = (acquire->choose[s:N]
->item[s].check->(item[s].giveOrder -> release-> CUSTOMER)
).
set Customer = {a,b}
||ORDER
=
(Customer:CUSTOMER
{a,b}::LOCK).
APIIT SD INDIA

Page 28

||

Customer::PRODUCTS||

Automated Online Shopping Mall System

6.3.4
JAVA Code

||UNSAFEORDER = (Customer:CUSTOMER || Customer::PRODUCTS ||


Customer::BROKENLOCK).
QUERY
//step 4 - create sql query
private synchronized void updateData()
{
String s3=Integer.toString(result);
try{
String stuser=txtuser.getText();
connection.open();
connection.rs=connection.stm.executeQuery("select account_no from
account where user_name='" +stuser+ "'");
while(connection.rs.next())
{
s1=connection.rs.getString(1);
}
connection.close();
String sa=txtcode.getText();
if(s1.equals(sa))
{
connection.open();
connection.stm.executeUpdate("UPDATE product_detail SET
quantity='" + s3+ "' WHERE pname='" + jcom1.getText() + "'");
connection.close();
connection.open();
connection.rs=connection.stm.executeQuery("select
c_product_name,product_per_price,company,totalquantity,pid
from
purchase_detail where c_name='" +txtuser.getText()+ "'");
while(connection.rs.next())
{
pn=connection.rs.getString(1);
pp=connection.rs.getString(2);
co=connection.rs.getString(3);
tq=connection.rs.getString(4);
c_pid=connection.rs.getString(5);
}

APIIT SD INDIA

Page 29

Automated Online Shopping Mall System


6.3.5
LTSA
&
TRACES

6.3.6
Safety

6.3.7
Progress
Description

Compiled: CUSTOMER
Compiled: ITEM
Compiled: LOCK
Composition:
ORDER = a:CUSTOMER || b:CUSTOMER || {a,b}::PRODUCTS.item.0:ITEM ||
{a,b}::PRODUCTS.item.1:ITEM || {a,b}::LOCK
State Space:
8 * 8 * 4 * 4 * 2 = 2 ** 11
Analysing...
Depth 9 -- States: 30 Transitions: 39 Memory used: 9446K
Trace to property violation in {a,b}::PRODUCTS.item.0:ITEM:
a.acquire
a.choose.0
a.item.0.check
a.item.0.giveOrder
a.release
a.acquire
a.choose.0
a.item.0.check
a.item.0.giveOrder
Analysed in: 0ms
Composition:
ORDER = a:CUSTOMER || b:CUSTOMER || {a,b}::PRODUCTS.item.0:ITEM ||
{a,b}::PRODUCTS.item.1:ITEM || {a,b}::LOCK
State Space:
8 * 8 * 4 * 4 * 2 = 2 ** 11
Progress Check...
Safety property violation detected - check safety.
Progress Check in: 0ms

6.5 Make Payment


6.5.1
For making payment customer should enter valid varification code. Wrong code
Description
would be entered only three times otherwise order will be canceled
6.5.2
Assuming that Customer can enter verification code for making payment only
APIIT SD INDIA

Page 30

Automated Online Shopping Mall System


Assumption
6.5.3
FSP

6.2.4
JAVA Code

three times otherwise it cancel the order.


const SIXTEENDIGIT = 1
const NOTSIXTEENDIGIT=2
range PAYMENTCODE=SIXTEENDIGIT..NOTSIXTEENDIGIT
range TRIES=1..4
PAYMENT=(payment[paymentcode:PAYMENTCODE]>CONDITIONCHECK[paymentcode][1]),
CONDITIONCHECK[paymentcode:PAYMENTCODE][counter:TRIES]=
(when(paymentcode==SIXTEENDIGIT
&&
counter<4)items.release>give_payment->HOME
|
when(paymentcode==NOTSIXTEENDIGIT&&
counter<4)wrong_code>CONDITIONCHECK[paymentcode][counter+1]
|when(counter==4)cancel_order->items.release>HOME),
HOME=(homepage->HOME).
connection.open();
connection.stm.executeUpdate("Insert into cust_order values('" +
txtcname.getText() + "','" +txtadd.getText()+ "','" +txtphone.getText()+ "','"
+txtpri.getText()+ "','" +jmode.getSelectedItem()+ "','" +txtcode.getText()+ "','"
+pn + "','" +co + "','" +pp + "','" +tq + "','" + c_pid+ "','" +txtdate.getText()+
"')");
connection.close();
JOptionPane.showMessageDialog(null,"Generate The Bill");
//f7.setVisible(true);
genarateBill();
// f6.setVisible(false);
//JLabel lbl=new JLabel();
}
else
{
JOptionPane.showMessageDialog(null,"Invalid Account Number","Try
Again",0);
txtcode.setText("");
count=count+1;
}
if(count==3)
{
JOptionPane.showMessageDialog(null, "Your Payment is block for
today", "Sorry",0);
f6.setVisible(false);
f5.setVisible(false);

APIIT SD INDIA

Page 31

Automated Online Shopping Mall System


f1.setVisible(true);
}
6.5.5
LTSA
&
TRACES

6.5.6
Safety

Composition:
DEFAULT = PAYMENT
State Space:
9 = 2 ** 4
Analysing...
Depth 6 -- States: 9 Transitions: 10 Memory used: 14221K
No deadlocks/errors
Analysed in: 0ms
6.5.7Progress Composition:
Description
DEFAULT = PAYMENT
State Space:
9 = 2 ** 4
Progress Check...
-- States: 7 Transitions: 8 Memory used: 18444K
Finding trace to cycle...
Depth 3 -- States: 4 Transitions: 5 Memory used: 18844K
Finding trace in cycle...
Progress violation for actions:
APIIT SD INDIA

Page 32

Automated Online Shopping Mall System


{{cancel_order,
give_payment},
wrong_code}
Trace to terminal set of states:
payment.1
items.release
give_payment
Cycle in terminal set:
homepage
Actions in terminal set:
homepage
Progress Check in: 0ms

items.release,

payment[1..2],

6.6 Cancel Order


6.6.1
If customer wants to cancel the order they can cancel at any time
Description
6.6.2
Assuming that order id are 1 and 2
Assumption
6.6.3
range ORDERID=1..2
FSP
CANCELLING(ORDERID=1)=(item->CANCELSTATE[ORDERID]),
CANCELSTATE[orderid:ORDERID] =(when(orderid<=2)matched_orderID>items.acquire->items.release->HOME
|unavailable->exit->HOME),
HOME=(homepage->HOME).
6.6.4
QUERY for deleting data from cust_order table
JAVA Code
public void deletedata()
{
try{
connection.open();
String s1=(String)txtpid.getSelectedItem();
String s2=txtcname.getText();
connection.stm.executeUpdate("delete from cust_order where [product
ID]='" + s1 + "' and c_name='" + s2 + "' " );
connection.close();
}
catch(Exception ex)
{
ex.printStackTrace();
}QUERY for Updating the quantity of product in product table
ublic void updatedata()
{
String st=txttq.getText();
String sq=null;
int a,b,result;
a=Integer.parseInt(st);
APIIT SD INDIA

Page 33

Automated Online Shopping Mall System


try{
connection.open();
connection.rs = connection.stm.executeQuery("select quantity from
product_detail where pname='" +txtpname.getText()+ "'");
if(connection.rs.next())
{
sq=connection.rs.getString(1);
}
connection.close();
b=Integer.parseInt(sq);
result=a+b;
connection.open();
connection.stm.executeUpdate("UPDATE product_detail SET
quantity='" + result+ "' WHERE pname='" + txtpname.getText() + "'");
connection.close();
}
catch(Exception ex)
{
ex.printStackTrace();
}
6.6.5
LTSA
&
TRACES

6.6.6
Safety

6.6.7
Progress
Description

Composition:
DEFAULT = CANCELLING
State Space:
6 = 2 ** 3
Analysing...
Depth 4 -- States: 6 Transitions: 7 Memory used: 9485K
No deadlocks/errors
Analysed in: 0ms
Composition:
DEFAULT = CANCELLING
State Space:
6 = 2 ** 3

APIIT SD INDIA

Page 34

Automated Online Shopping Mall System


Progress Check...
-- States: 4 Transitions: 5 Memory used: 10407K
Finding trace to cycle...
Depth 3 -- States: 4 Transitions: 5 Memory used: 10807K
Finding trace in cycle...
Progress violation for actions:
{{exit,
item},
items.{acquire,
release},
{matched_orderID,
unavailable}}
Trace to terminal set of states:
item
unavailable
exit
Cycle in terminal set:
homepage
Actions in terminal set:
homepage
Progress Check in: 0ms
6.7 View Status
6.7.1
This module provides the functionality of checking the order status as confirmed
Description or cancelled
6.7.2
Assuming that orderid is generated during paying the bill
Assumptio
n
6.7.3
range CHOICE=1..1
FSP
range ORDERID=1..2
range USERNAME=1..2
VIEWORDERSTATUS(ORDERID=1)=
(request_order_status>ORDERSTATUS[ORDERID] ),
ORDERSTATUS[or:ORDERID]=(orderid[ord:ORDERID]>ORDERSTATE[ord]),
ORDERSTATE[ord:ORDERID]=(when(ord<=2)show_ORDER_status->HOME|
unavailable->exit->HOME),
HOME=(homepage->HOME).
6.7.4
QUERY For View status
JAVA Code //checking order id by Customer name if available then Delivered
succssesfully message showned otherwise order will canceled message
showned
f3.setVisible(true);
try {
connection.open();
rs = connection.stm.executeQuery("select
c_name,product_name,price_per_item,total_quantity,totalprice from cust_order
where c_name='" + txtuser.getText() + "'");
//ResultSetMetaData rsmd = rs.getMetaData();
// JPanel panel = new JPanel();
APIIT SD INDIA

Page 35

Automated Online Shopping Mall System


model = new DefaultTableModel();
model.addColumn("Customer Name");
model.addColumn("Product Name");
model.addColumn("Product Price");
model.addColumn("Total Quantity");
model.addColumn("Total Price");
model.addColumn("Status of confirmation");
6.7.5
LTSA
&
TRACES

6.7.6
Safety

Composition:
DEFAULT = VIEWORDERSTATUS
State Space:
7 = 2 ** 3

APIIT SD INDIA

Page 36

Automated Online Shopping Mall System

6.7.7
Progress
Description

Analysing...
Depth 4 -- States: 7 Transitions: 10 Memory used: 18772K
No deadlocks/errors
Analysed in: 0ms
Composition:
DEFAULT = VIEWORDERSTATUS
State Space:
7 = 2 ** 3
Progress Check...
-- States: 5 Transitions: 7 Memory used: 20022K
Finding trace to cycle...
Depth 3 -- States: 3 Transitions: 4 Memory used: 20422K
Finding trace in cycle...
Progress violation for actions:
{exit, orderid[1..2], {request_order_status, show_ORDER_status,
unavailable}}
Trace to terminal set of states:
request_order_status
orderid.1
show_ORDER_status
Cycle in terminal set:
homepage
Actions in terminal set:
homepage
Progress Check in: 0ms

7. CLASS DIAGRAM

APIIT SD INDIA

Page 37

Automated Online Shopping Mall System

8. USEFULNESS OF INSTRUCTIONS FOR COMPILING AND


RUNNING THE PROGRAM INCLUDING COMMENT LINES
IN SOURCE CODES
8.1 Login Module

APIIT SD INDIA

Page 38

Automated Online Shopping Mall System


Login Screen: - The register user enters the
user name and password to access the
functionality of the system.

Enter the user


name

JAVA CODE:
connection.open();
//this is for checking valid user name and
password
connection.rs=connection.stm.executeQuery("S
ELECT email,password,name from registration
where email='" + txt1.getText() + "'");

Enter the Password

while(connection.rs.next())

8.2 Registration
Registration Module: - The customer must register before using the any functionality of
Automated Online Shopping Mall System.
Auto-generated ID

Auto-generated
Date

APIIT SD INDIA

Page 39

Automated Online Shopping Mall System


8.3 Check Availability By name
Customer can check availability of the
product by entering name
JAVA CODE
String stq;
connection.open();
rs =
connection.stm.executeQuery("select
quantity from product_detail where
pname='" +txtid.getText()+ "'");
if(rs.next())
{
stq=rs.getString(1);
if(stq.equals("0"))
{
JOptionPane.showMessageDialo
g(null,"product unavailable");
}
else
txtquantity.setText(stq);
}
8.4 Verification code
Customer can enter only three time verification code

connection.open();
connection.stm.executeUpdate("Insert into cust_order values('" + txtcname.getText() +
"','"
+txtadd.getText()+
"','"
+txtphone.getText()+
"','"
+txtpri.getText()+
"','"
+jmode.getSelectedItem()+ "','" +txtcode.getText()+ "','" +pn + "','" +co + "','" +pp + "','" +tq +
"','" + c_pid+ "','" +txtdate.getText()+ "')");
connection.close();
APIIT SD INDIA

Page 40

Automated Online Shopping Mall System


JOptionPane.showMessageDialog(null,"Generate The Bill");
genarateBill();
}
else
{
JOptionPane.showMessageDialog(null,"Invalid Account Number","Try Again",0);
txtcode.setText("");
count=count+1;
}
if(count==3)
{
JOptionPane.showMessageDialog(null, "Your Payment is block for today",
"Sorry",0);
f6.setVisible(false);
f5.setVisible(false);
f1.setVisible(true);
}
8.5 Cancel Order
Customer can cancel order at any time
JAVA CODE
public void updatedata()
{
String st=txttq.getText();
String sq=null;
int a,b,result;
a=Integer.parseInt(st);
try{
connection.open();
connection.rs = connection.stm.executeQuery("select quantity from product_detail where
pname='" +txtpname.getText()+ "'");
if(connection.rs.next())
{
sq=connection.rs.getString(1);
}
connection.close();
b=Integer.parseInt(sq);
result=a+b;
connection.open();
connection.stm.executeUpdate("UPDATE product_detail SET quantity='" + result+ "'
WHERE pname='" + txtpname.getText() + "'");
connection.close();
}
catch(Exception ex)
APIIT SD INDIA

Page 41

Automated Online Shopping Mall System


{
ex.printStackTrace();
}
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==btnsearch)
{
getdetail();
}
else if(e.getSource()==btncancel)
{
deletedata();
updatedata();
JOptionPane.showMessageDialog(null,"Your Order Cancel successfully");
f1.setVisible(false);
}

JAVA CODE
QUERY
//Selecting discount detatil from Product table
CreateConnection.open();
Statement stm=CreateConnection.con.createStatement();
String sql="select product_id,product_name,product_price,product_discount from product";
ResultSet rs3=stm.executeQuery(sql);
ResultSetMetaData rsmd = rs3.getMetaData();

APIIT SD INDIA

Page 42

Automated Online Shopping Mall System

APIIT SD INDIA

Page 43

Automated Online Shopping Mall System


8.2 validation
Validation
Screen: - The
user cannot fill
the
incorrect
details.
The
system accepts the
correct format of
e-mail,
name,
phone etc.

JAVA CODE validation for email id


txt5.addKeyListener(new KeyAdapter()
{
public void keyTyped(KeyEvent e)
{
String email=txt5.getText();
String exp="^[\\w\\-]([\\.\\w])+[\\w]+@([\\w\\-]+\\.)+[A-Z]{2,4}$";
CharSequence seq = email;
Pattern pattern = Pattern.compile(exp,Pattern.CASE_INSENSITIVE);
Matcher m = pattern.matcher(seq);
if (m.matches())
{
lbldisplay.setVisible(false);
}
else
{
lbldisplay.setText("* Invalid Email ID");
lbldisplay.setVisible(true);
lbldisplay.setForeground(Color.red);
}

APIIT SD INDIA

Page 44

Automated Online Shopping Mall System

9. EVALUATION AND TESTING


Following are the test cases performed on the Automated Online Shopping Mall System
Project Title

Automated Online Shopping Mall Testing Date


8/5/2013
System
Test Case Name
Login
Test Case ID
ID:01
Description
This module deals with user authentication through username &
password.
No
Steps
Result Expected
Outputs Result
Corrective
from
(Pass/Fail) Actions
Module
1.1
Run the System should open login System
Pass
Not
system
screen, It must take must
Required
Fill
the username & password to open
username access the functionality of home
&
the system & if username page
password
& password matches in
click
the database then open
submit
users home page.
button
Conclusion: After all corrective actions, the Login module worked correctly.
Project Title

Automated
Online Testing
Shopping Mall System
Date

Test Case Name

Register

Description

This module deals with user to register into the system

Test
ID

8/5/2013

Case ID:02

No

Steps

Result
Expected

1.1

Click register Button

Registration Registration Pass


page will be page will
open
successfully
opened

Not
Required

1.2

Click new Button

New
ID
will
be
displayed in
ID field

Not
Required

1.2

Enter Following Field


Customers

User should
New user Pass
be
added

APIIT SD INDIA

Page 45

Outputs
from
Module

Result
Corrective
(Pass/Fail) Actions

New
ID Pass
successfully
displayed in
ID field

Name
should be

Automated Online Shopping Mall System


name=Niro
Address=Panipat
Phone
number=9068567614
Password=123
Age=21

registered
successfully
successfully

in
text,
Phone
number in
9
digit
number
and
age
should be
Integer

Conclusion: After all corrective actions, the Registration module worked correctly.

Project Title

Automated Online Shopping Testing Date


Mall System

8/5/2013

Test Case Name

Add Product

ID:03

Description

This module deals with admin to add Product

Test Case ID

No Steps

Result
Expected

Outputs
from
Module

Result
(Pass/Fail
)

Corrective
Actions

1.
2

Click new Button

New ID will New


ID Pass
be displayed successfull
in ID field
y displayed
in ID field

Not
Required

1.
2

Enter Following Field


Products name=Dell
Select Brand=Dell
Product Price=3000
Product Quantity=4

Product
New Pass
should
be product
registered
added
successfully
successfull
y

Products
name
should be
in
text,
Product
Quantity in
number

Conclusion: After all corrective actions, the Add Product module worked correctly.

Project Title

Automated Online Shopping Testing Date


Mall System

8/5/2013

Test Case Name

Find Product by Brand

ID:04

Description

This module deals with user for finding the product

No Steps

APIIT SD INDIA

Result
Expected
Page 46

Test Case ID

Outputs
from

Result
(Pass/Fail

Corrective

Automated Online Shopping Mall System


Module

Actions

1.
2

Click Find Button

Find Screen Find screen Pass


will be opened successfull
y opened

Not
Required

1.
2

Select Brand name

Product would
Product Pass
be displayed
successfull
y displayed

Not
Required

Conclusion: After all corrective actions, the Find Product module worked correctly.

Project Title

Automated Online Shopping Testing Date


Mall System

8/5/2013

Test Case Name

Check availability

ID:05

Description

This module deals with user to check availability

No Steps

Result
Expected

Test Case ID

Outputs
from
Module

Result
(Pass/Fail
)

Corrective
Actions

1.
2

Click check availability check


Find screen Pass
Button
availability
successfull
Screen will be y opened
opened

Not
Required

1.
2

Enter name
product

Not
Required

of

the Message Box


would
be
display with
information
Product
are
available
or
Product
are
not Available

Message
Box
successfull
y displayed

Pass

Conclusion: After all corrective actions, the Check availability module worked
correctly.

Project Title

Automated
Online Testing Date
Shopping Mall System

8/5/2013

Test Case Name

Find Make Payment

ID:06

Description

This module deals with user to give order and pay bill

APIIT SD INDIA

Page 47

Test Case ID

Automated Online Shopping Mall System


No Steps

Result
Expected

Outputs
from
Module

Result
(Pass/Fail
)

1.
2

Click Buy Button

Order Screen order screen Pass


will
be successfully
opened
opened

1.
3

Enter product name Detail of the


of Product and Click product
search button
would have to
display

Detail of the Pass


product
successfully
displayed

Not Required

1.
4

Enter Number of Payment


Quantity Of product Screen would
and click pay button
have
to
display

Payment
Screen
successfully
displayed

Not Required

1.
5

Select payment Mode Payment


then and
Enter Successfully
Verification code
message box
would have to
display

Payment
Pass
Successfull
y message
box would
have
to
displayed

Pass

Corrective
Actions
Not Required

User have to
enter
code
only
three
time
otherwise
order will be
canceled

Conclusion: After all corrective actions, the Make Payment module worked
correctly.

Project Title

Automated
Online Testing Date
Shopping Mall System

8/5/2013

Test Case Name

Find cancel order

ID:07

Description

This module deals with user to cancel the order

No Steps

1.
2

Result
Expected

Test Case ID

Outputs
from
Module

Result
(Pass/Fail
)

Click Cancel Order Cancel Order Cancel


Pass
Button
Screen will be order screen
opened
successfully
opened

APIIT SD INDIA

Page 48

Corrective
Actions
Not Required

Automated Online Shopping Mall System


1.
3

Enter ID number of Order would


Product and Click have to be
Cancel button
cancel
and
display
message

Order
Pass
successfully
cancel and
displayed
message

If product are
ordered

Conclusion: After all corrective actions, the cancel module worked correctly.

Project Title

Automated
Online Testing Date
8/5/2013
Shopping Mall System
Test Case Name
Display status
Test Case ID
ID:08
Description
This module deals with user to display status of canceled order or
buy product
No Steps
Result
Outputs
Result
Corrective
Expected
from
(Pass/Fail Actions
Module
)
1.
pass
pass
Pass
Not Required
1
Click the button view
status
1. A pop up window pass
pass
Pass
If product are
2
will open and display
ordered
the status of the
product
Conclusion: After all corrective actions, the cancel module worked correctly.

10.

DEPTH OF DISCUSSION

Under this section, the developer is going to discuss the listings of sections that did not meet
the requirements and the code/extracts of the sections that successfully accomplish the
requirements. And also giving the complex part of the system
Sections that meet the requirements
Systems basic Functionality that is discussed above is successfully meeting the requirement and
Special Functionality is also trying to achieve it.
Serial
1.
2.
3.
4.
5.
6.
7.
APIIT SD INDIA

Basic Functionality
Customer registration
Customer login and logout

Achieved
Yes
Yes

Product search according to brand name


Check availability
Purchase the product
Payment Module
Cancelation Order

Yes
Yes
Yes
Yes
Yes

Page 49

Automated Online Shopping Mall System


8.
Serial
1.
2.

Check order Confirmation

Yes

Special Functionality
Achieved
payment code of 16 digit with only 3 Yes
tries
abort transaction
Yes

3.
Maintain log
No
4.
Concurrency
Yes
5.
Deadlock
Yes
Sections that did not meet the requirements
The developer tried to maintain all the requirements of the system but failed to maintain the log
file of the system.

11.

CRITICAL APPRAISAL

Database concurrency control permits users to access a database in a multi-programmed fashion


while preserving the delusion that each user is executing alone on a dedicated system. The main
difficulty in achieving this goal is to prevent database updates performed by one user from
interfering with database retrievals and updates performed by another.
Concurrent System Design is a very important subject in field of Computer science regardless of
specialization in any particular field. The assignment has covered all the practical aspects that we
have learnt, with some additional requirement which really was a challenge.
Starting form drawing FSP which is a simple algebraic notation called FSP (Finite State
Processes) to describe process models has helped in understanding state changes. Every FSP
description has a corresponding state machine (LTS) description with all traces possible.
Structure diagram for the whole system and for some shared resource process have been made
which gives a clear idea of resources like seat is been shared.
Continuing with Class Diagram which depicts all the classes with its operations and attributes
and links with other classes shows a rough idea of how system is been made.
Code implementation includes all necessary explanation of the codes required by the system,
concurrency, multithreading, Safety and levelness checks for various processes states that the
system is appropriate though the requirement which cannot be made are thoroughly explained.
Test cases used for testing checks all validation fed in the system, it also checks whether or not a
process is working.

12 FUTURE ENHANCEMENT SYSTEMS


1. In Future System will work online.
APIIT SD INDIA

Page 50

Automated Online Shopping Mall System


2. For more secure, payment would be transacted from actual bank
3. SMS and mailing feature will be included to notify the users after purchasing products or
bill report.
4. E-mailing user about their purchasing products as well as cancellation updated.

13 CONCLUSIONS
The developer was able to apply appropriate concurrent program design methods. The second
tough job successfully completed was the implementation concurrent programming concepts
using Java. The modeling of requirements into Finite State Processes (FSPs) and Labeled
Transition Systems was also a challenging task to perform. Developer has delved into advanced
Javas facilities including multi-threading, Exception Handling, Inheritance, interface and
polymorphism, semaphore. As the developer was totally new to swings so it a challenge for her
to implement the system using swings. Swings are one of the great features provided by Java for
easy designing.

14 REFERENCES
BOOK
1. Jean B (1998). , Concurrent Systems Operating Systems, Database and Distributed
Systems: An Integrated Approach, Harlow 2nd Edition, Addison-Wesley page 167
2. Jeff M & Jeff K (2006) , Concurrency State Models & Java Programming , England,
1st Edition John Wiley & sons, Chapter-1 page 1-16, 2 page 1-20

WEBSITE
1. Corky

Cartwright.

(2007).

What

is

Concurrent

Programming?.

Available:

http://www.cs.rice.edu/~cork/book/node96.html. Last accessed 14 April 2013


2. Lars Vogel. (2011). Java Concurrency / Multithreading - Tutorial. Available:
http://www.vogella.de/articles/JavaConcurrency/article.html. Last accessed 08 April 2013

APIIT SD INDIA

Page 51