Upload
niro-thakur
View
256
Download
1
Tags:
Embed Size (px)
DESCRIPTION
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.
Citation preview
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
ContentsAcknowledgment.........................................................................................................................................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 WORK FLOW OF SYSTEM.......................................................................................................12
1 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. EVALUATION AND TESTING....................................................................................................45
APIIT SD INDIA Page 3
Automated Online Shopping Mall System
10. Depth of Discussion.......................................................................................................................49
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.
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.
APIIT SD INDIA Page 5
Requirements
Identify the basic requirements and additional requirements of the Automated Online Shopping Mall System by which the system run successfully.Identify processes and their actions.
Modeling
Model the processes and their actions into structure finite state machine.Generate labeled transition systems from the modeled FSP.
ImplementationCreate the class diagram.Implement simulation using Java programming.Conduct program execution tests.
Automated Online Shopping Mall System
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
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/-.
1.1. 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. SYSTEM 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.
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.
APIIT SD INDIA Page 7
Automated Online Shopping Mall System
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.
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. 1.4 BASIC FUNCTIONALITYSerial Functionality
1. Customer registration before accessing the functionality of the system2. Customer must login with the system to access all the feature and then logout
3. Product search according to brand name4. Check availability of the product5. Purchasing the available product6. Payment should be done by the customer to confirm the product purchase details7. Adding the product to the cart
8. Order cancelation module by which customer cancel the purchase product9. Check order Confirmation of the product either the product is delivered or pending
APIIT SD INDIA Page 8
Automated Online Shopping Mall System
1.5 SPECIAL FUNCTIONALITY1. 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.
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 MODELINGS.no Modeling:
1. Create model outline design.2. Model the system in FSP.3. Generate LTS.4. Implement Safety and Liveliness property.5. Evaluate and test the traces.6. Identify the main activities -> to be implemented as threads.
APIIT SD INDIA Page 9
Automated Online Shopping Mall System
7. Identify the main shared entities ->to be implemented as monitors.
1.9 IMPLEMENTATIONS.no Implementation:
1. Create the Class Diagram.
2. Using threads plan concurrency part implementation.
3. Using threads implement the concurrency part.
4. Integrate the system.
1.9 CONVERSION OF REQUIREMENT INTO MODELSThe following section identifies, categorizes and lists the entities, events and interactions.
1.9.1 ENTITIESEntity DescriptionLOGIN 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.
CUSTOMER ORDER
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 Product is an entity containing all the products information with unique product code.
ACCOUNT For getting payment from customer after purchasing products includes Bank information which is stored in this entity.
BILL To generate bill report.LOG To generate user log maintenance. It is for rollback in case of any interruption
in the process
1.9.2 EVENTSEvents Description Entities RequiredLogin When a random user wants to login for
accessing functionalities.CUSTOMER
Product Search Customer searches details of the products based on their brand
PRODUCT,CUSTOMER
Check Availability
Customer selects a particular product and checks for availability of product
PRODUCT,CUSTOMER
Payment After giving order give payment. ORDER,PRODUCT,BANKThree tries for payment
As making payment is confidential resource and the developer is not allowing customers to make any no. of fake tries.
BANK
Give Order customer can give order if products are available
CUSTOMER,ORDER, PRODUCT
APIIT SD INDIA Page 10
Automated Online Shopping Mall System
Cancelation The customer can cancel the order. ORDER, PRODUCTView Status To display the status of a purchased product. ORDERBill Generation View billing of all purchased or cancelled
order.ORDER
Discount Detail To view discount and price details of the product
PRODUCT
Payment Code System will ask customer to enter 16 digit payment code
BANK
1.9.3 INTERACTIONSNumber Customer approaching to AOSMS1. AOSMS will be deployed online for accessing from various terminals.2. Valid customer can access the system.3. For a new customer registration facility will be available.4. Search for products detail based on their brand 5. Available all products gets listed along with details such as price, discount, brand
and quantity6. Customer can select any product of their choice.7. Customer can check availability of the product by entering product name.8. Customer can purchase product even if products are available.9. Customer fills details of account number and verification code during payment.10. Customer can check the ordered items payment details and order confirmation.11. Order can be cancelled at anytime.12. If payment event is a success the order is confirmed.13. If the customer is unable to successfully enter the verification code number after
three tries, the action should be canceled automatically.14. Finally the order will be canceled and database is updated.
15. Customer can check for status of Order Details with Customer’s Details for each successful paid bill.
16 And at last the customer will logged out from AOSMS.17 A log file of each transaction will be maintained for the Administrative use.
1.9.4 ACTIONSProcess ActionLOGIN userid, password,match, nomatchCUSTOMER userid,password,checkproduct,giveorder,checkdiscount,verificationcode,
givepaymentORDER orderid, giveorder, verificationcode, givepaymentPRODUCT availableproduct, productdetail, checkbrand, discountdetailBANK Accountnumber, verificationcodeBILL Displaybill,printbillLOG Displaylog
APIIT SD INDIA Page 11
Automated Online Shopping Mall System
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 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
APIIT SD INDIA Page 12
Automated Online Shopping Mall System
1 STRUCTURE DIAGRAM1. LOGIN
2. SEARCH_PRODUCT
3. PRODUCT_AVAILABILITY
APIIT SD INDIA Page 13
Automated Online Shopping Mall System
4. GIVE_ORDER
5. MAKE_PAYMENT
APIIT SD INDIA Page 14
Automated Online Shopping Mall System
6. CANCEL_ORDER
7. VIEW_STATUS
8
APIIT SD INDIA Page 15
Automated Online Shopping Mall System
8. AUTOMATED_ONLINE_SHOPPING_MALL_SYSTEM
APIIT SD INDIA Page 16
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 techniques-
1. 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 nameconnection.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. customerTextfield name stars with txt e.g. txt_username Label name stars with lbl e.g. lbl_username JComboBox starts with eg:jcomButton name start with btn e.g. btn_homeCreating a Frame e.g. JFrame f1=new JFrame();JTable tb,tb1;DefaultTableModel model,model1; JScrollPane sb,sb1;
APIIT SD INDIA Page 17
Automated Online Shopping Mall System
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 indentationtxtcname.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 structureE.g. - public class user implements ActionListenerUse of methods to provide modularity & reusabilityE.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; public static ResultSet rs = null;
APIIT SD INDIA Page 18
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, and4. 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
{
void run();
}
APIIT SD INDIA Page 19
Automated Online Shopping Mall System
Thread Explanation
public class login extends JFrame implements ActionListener,Runnable{void callThread() { new Thread().start(); } public void run() { setVisible(true);}
The idea behind using threads in login is to allow multiple users to login into the system at the same time.
This is the main class from where the project starts and this class instantiate the login, so to maintain multiple logins, the login is instantiated with the help of Threads.
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 project-
Code Explanation
//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); }
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.
APIIT SD INDIA Page 20
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 methods-Following 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.
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.
APIIT SD INDIA Page 21
Automated Online Shopping Mall System
6. PROGRAM RUN APPROPRIATELY
6.1 Login
6.1.1 Description
Only registered customer are using the system.
6.1.2 Assumption
Assuming that two customer a and b login into the system
6.1.3
FSP
CUSTOMER=(enter_username->enter_password->VALIDATELOGIN),
VALIDATELOGIN=(invalid_Login->CUSTOMER|check_valid_Login->ok->goHomepage->logout->CUSTOMER).
||MULTPLE_LOGIN=({a,b}:CUSTOMER).
6.1.4
JAVA Code
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 22
Automated Online Shopping Mall System
11.1.6
Safety
No deadlocks/errors
Progress Description
Progress Check...
-- States: 36 Transitions: 84 Memory used: 15274K
No progress violations detected.
Progress Check in: 0ms
6.2 Check Availability6.2.1 Description
Customer can check that product are available or not
6.2.2 Assumption
Assuming that user has entered a valid login for accessing the system.
6.2.3
FSP
PRODUCT_AVAILABILITY=(valid_Login->enter_ProductName->check_Availability->message_Shown->STOP)\{valid_Login,message_Shown}.
6.2.4
JAVA Code
//checking condition product are Available or Not
rs = connection.stm.executeQuery("select quantity from product_detail where pname='" +txtid.getText()+ "'");
if(rs.next())
{
APIIT SD INDIA Page 23
Automated Online Shopping Mall System
stq=rs.getString(1);
if(stq.equals("0"))
{
JOptionPane.showMessageDialog(null,"product unavailable");
6.2.5
LTSA & TRACES
6.2.6
Safety
Composition:DEFAULT = PRODUCT_AVAILABILITYState Space: 5 = 2 ** 3Analysing...Depth 5 -- States: 5 Transitions: 4 Memory used: 17241KTrace to DEADLOCK:
tauenter_ProductNamecheck_Availabilitytau
Analysed in: 0ms6.2.7 Progress Description
Composition:DEFAULT = PRODUCT_AVAILABILITYState Space: 5 = 2 ** 3Progress Check...-- States: 5 Transitions: 4 Memory used: 18281KFinding trace to cycle...Depth 4 -- States: 4 Transitions: 4 Memory used: 18681KFinding trace in cycle...
APIIT SD INDIA Page 24
Automated Online Shopping Mall System
Progress violation for actions: {check_Availability, enter_ProductName}
Trace to terminal set of states:tauenter_ProductNamecheck_Availabilitytau
Cycle in terminal set:Actions in terminal set:
{}Progress Check in: 0ms
6.3 Product Search by Brand
6.3.1 Description
After login into the system Customer can search the product bye selecting the brand of product
6.3.2 Assumption
Assuming that customer can valid login into the system
6.3.3
FSP
SEARCH_PRODUCT=(valid_Login->request->enter_Productbrand->get_Detail->release->STOP)\{valid_Login,enter_Productbrand,get_Detail}.
6.3.4
JAVA Code
QUERY
connection.open();
rs = connection.stm.executeQuery("select quantity from product_detail where pname='" +txtid.getText()+ "'");
if(rs.next())
6.3.5
LTSA & TRACES
APIIT SD INDIA Page 25
Automated Online Shopping Mall System
6.3.6
Safety
Composition:DEFAULT = SEARCH_PRODUCTState Space: 6 = 2 ** 3Analysing...Depth 6 -- States: 6 Transitions: 5 Memory used: 17384KTrace to DEADLOCK:
taurequesttautaurelease
Analysed in: 0ms6.3.7 Progress Description
Composition:DEFAULT = SEARCH_PRODUCTState Space: 6 = 2 ** 3Progress Check...-- States: 6 Transitions: 5 Memory used: 18837KFinding trace to cycle...Depth 5 -- States: 5 Transitions: 5 Memory used: 19237KFinding trace in cycle...Progress violation for actions:
{release, request}Trace to terminal set of states:
taurequesttautaurelease
Cycle in terminal set:Actions in terminal set:
{}Progress Check in: 0ms
APIIT SD INDIA Page 26
Automated Online Shopping Mall System
6.4 Give Order
6.3.1 Description
Same product are not ordered by multiple user. Only one customer are allowed to buy product at one time
6.3.2 Assumption
Assumed that two customer a and b and ITEM number is 0 and 1
6.3.3
FSP
const False = 0const True = 1range 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 || Customer::PRODUCTS||{a,b}::LOCK).
||UNSAFEORDER = (Customer:CUSTOMER || Customer::PRODUCTS ||
Customer::BROKENLOCK).
6.3.4
JAVA Code
QUERY
//step 4 - create sql query
private synchronized void updateData(){ String s3=Integer.toString(result); try{ String stuser=txtuser.getText();
APIIT SD INDIA Page 27
Automated Online Shopping Mall System
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 28
Automated Online Shopping Mall System
6.3.5
LTSA & TRACES
6.3.6
Safety
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
APIIT SD INDIA Page 29
Automated Online Shopping Mall System
a.item.0.check
a.item.0.giveOrder
Analysed in: 0ms
6.3.7 Progress Description
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 Description
For making payment customer should enter valid varification code. Wrong code would be entered only three times otherwise order will be canceled
6.5.2 Assumption
Assuming that Customer can enter verification code for making payment only three times otherwise it cancel the order.
6.5.3
FSP
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),
APIIT SD INDIA Page 30
Automated Online Shopping Mall System
HOME=(homepage->HOME).
6.2.4
JAVA 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(); 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); f1.setVisible(true); }
6.5.5
LTSA & TRACES
APIIT SD INDIA Page 31
Automated Online Shopping Mall System
6.5.6Safety
Composition:DEFAULT = PAYMENTState Space: 9 = 2 ** 4Analysing...Depth 6 -- States: 9 Transitions: 10 Memory used: 14221KNo deadlocks/errorsAnalysed in: 0ms
6.5.7Progress Description
Composition:DEFAULT = PAYMENTState Space: 9 = 2 ** 4Progress Check...-- States: 7 Transitions: 8 Memory used: 18444K
Finding trace to cycle...Depth 3 -- States: 4 Transitions: 5 Memory used: 18844KFinding trace in cycle...Progress violation for actions:
{{cancel_order, give_payment}, items.release, payment[1..2], wrong_code}Trace to terminal set of states:
payment.1items.releasegive_payment
Cycle in terminal set:homepage
Actions in terminal set:homepage
Progress Check in: 0ms
APIIT SD INDIA Page 32
Automated Online Shopping Mall System
6.6 Cancel Order
6.6.1 Description
If customer wants to cancel the order they can cancel at any time
6.6.2 Assumption
Assuming that order id are 1 and 2
6.6.3
FSP
range ORDERID=1..2
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
JAVA Code
QUERY for deleting data from cust_order table
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 tableublic 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()) {
APIIT SD INDIA Page 33
Automated Online Shopping Mall System
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.6Safety
Composition:DEFAULT = CANCELLINGState Space:6 = 2 ** 3Analysing...Depth 4 -- States: 6 Transitions: 7 Memory used: 9485KNo deadlocks/errorsAnalysed in: 0ms
6.6.7 Progress Description
Composition:DEFAULT = CANCELLINGState Space: 6 = 2 ** 3Progress Check...-- States: 4 Transitions: 5 Memory used: 10407KFinding trace to cycle...Depth 3 -- States: 4 Transitions: 5 Memory used: 10807KFinding trace in cycle...Progress violation for actions:
APIIT SD INDIA Page 34
Automated Online Shopping Mall System
{{exit, item}, items.{acquire, release}, {matched_orderID, unavailable}}Trace to terminal set of states:
itemunavailableexit
Cycle in terminal set:homepage
Actions in terminal set:homepage
Progress Check in: 0ms
6.7 View Status
6.7.1 Description
This module provides the functionality of checking the order status as confirmed or cancelled
6.7.2 Assumption
Assuming that orderid is generated during paying the bill
6.7.3
FSP
range CHOICE=1..1
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
JAVA Code
QUERY For View status
//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
APIIT SD INDIA Page 35
Automated Online Shopping Mall System
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();
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");
APIIT SD INDIA Page 36
Automated Online Shopping Mall System
6.7.5
LTSA & TRACES
6.7.6Safety
Composition:DEFAULT = VIEWORDERSTATUSState Space: 7 = 2 ** 3Analysing...Depth 4 -- States: 7 Transitions: 10 Memory used: 18772KNo deadlocks/errorsAnalysed in: 0ms
6.7.7 Progress Description
Composition:DEFAULT = VIEWORDERSTATUSState Space:
APIIT SD INDIA Page 37
Automated Online Shopping Mall System
7 = 2 ** 3Progress Check...-- States: 5 Transitions: 7 Memory used: 20022KFinding trace to cycle...Depth 3 -- States: 3 Transitions: 4 Memory used: 20422KFinding 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_statusorderid.1show_ORDER_status
Cycle in terminal set:homepage
Actions in terminal set:homepage
Progress Check in: 0ms
7. CLASS DIAGRAM
APIIT SD INDIA Page 38
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
Login Screen: - The register user enters the user name and password to access the functionality of the system.
JAVA CODE:
connection.open();
//this is for checking valid user name and password connection.rs=connection.stm.executeQuery("SELECT email,password,name from registration where email='" + txt1.getText() + "'");
while(connection.rs.next())
8.2 Registration
Registration Module: - The customer must register before using the any functionality of Automated Online Shopping Mall System.
APIIT SD INDIA Page 39
Enter the user name
Enter the Password
Auto-generated ID
Auto-generated
Date
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.showMessageDialog(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()+ "','"
APIIT SD INDIA Page 40
Automated Online Shopping Mall System
+jmode.getSelectedItem()+ "','" +txtcode.getText()+ "','" +pn + "','" +co + "','" +pp + "','" +tq + "','" + c_pid+ "','" +txtdate.getText()+ "')"); connection.close(); 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();
APIIT SD INDIA Page 41
Automated Online Shopping Mall System
connection.stm.executeUpdate("UPDATE product_detail SET quantity='" + result+ "' WHERE pname='" + txtpname.getText() + "'"); connection.close(); } catch(Exception ex) { 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
APIIT SD INDIA Page 42
Automated Online Shopping Mall System
//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 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 System
Testing Date 8/5/2013
Test Case Name Login Test Case ID ID:01
Description This module deals with user authentication through username & password.
No Steps Result Expected Outputs from Module
Result (Pass/Fail)
Corrective Actions
1.1 Run the systemFill the username & password click submit button
System should open login screen, It must take username & password to access the functionality of the system & if username & password matches in the database then open user’s home page.
System must open home page
Pass Not Required
Conclusion: After all corrective actions, the Login module worked correctly.
Project Title Automated Online Shopping Mall System
Testing Date
8/5/2013
Test Case Name Register Test Case ID
ID:02
Description This module deals with user to register into the system
No Steps Result Expected
Outputs from Module
Result (Pass/Fail)
Corrective Actions
1.1 Click register Button Registration page will be open
Registration page will successfully opened
Pass Not Required
1.2 Click new Button New ID will be
New ID successfull
Pass Not Required
APIIT SD INDIA Page 45
Automated Online Shopping Mall System
displayed in ID field
y displayed in ID field
1.2 Enter Following Field Customer’s name=”Niro”Address=”Panipat”Phone number=”9068567614”Password=”123”Age=”21”
User should be registered successfully
New user added successfully
Pass Name should be 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 Mall System
Testing Date 8/5/2013
Test Case Name Add Product Test Case ID ID:03
Description This module deals with admin to add Product
No Steps Result Expected
Outputs from Module
Result (Pass/Fail)
Corrective Actions
1.2 Click new Button New ID will be displayed in ID field
New ID successfully displayed in ID field
Pass Not Required
1.2 Enter Following Field Product’s name=”Dell”Select Brand=”Dell”Product Price=”3000”Product Quantity=”4”
Product should be registered successfully
New product added successfully
Pass Product’s 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 Mall System
Testing Date 8/5/2013
APIIT SD INDIA Page 46
Automated Online Shopping Mall System
Test Case Name Find Product by Brand Test Case ID ID:04
Description This module deals with user for finding the product
No Steps Result Expected
Outputs from Module
Result (Pass/Fail)
Corrective Actions
1.2 Click Find Button Find Screen will be opened
Find screen successfully opened
Pass Not Required
1.2 Select Brand name Product would be displayed
Product successfully displayed
Pass Not Required
Conclusion: After all corrective actions, the Find Product module worked correctly.
Project Title Automated Online Shopping Mall System
Testing Date 8/5/2013
Test Case Name Check availability Test Case ID ID:05
Description This module deals with user to check availability
No Steps Result Expected
Outputs from Module
Result (Pass/Fail)
Corrective Actions
1.2 Click check availability Button
check availability Screen will be opened
Find screen successfully opened
Pass Not Required
1.2 Enter name of the product
Message Box would be display with information Product are available or Product are not Available
Message Box successfully displayed
Pass Not Required
Conclusion: After all corrective actions, the Check availability module worked correctly.
APIIT SD INDIA Page 47
Automated Online Shopping Mall System
Project Title Automated Online Shopping Mall System
Testing Date 8/5/2013
Test Case Name Find Make Payment Test Case ID ID:06
Description This module deals with user to give order and pay bill
No Steps Result Expected
Outputs from Module
Result (Pass/Fail)
Corrective Actions
1.2 Click Buy Button Order Screen will be opened
order screen successfully opened
Pass Not Required
1.3 Enter product name of Product and Click search button
Detail of the product would have to display
Detail of the product successfully displayed
Pass Not Required
1.4 Enter Number of Quantity Of product and click pay button
Payment Screen would have to display
Payment Screen successfully displayed
Pass Not Required
1.5 Select payment Mode then and Enter Verification code
Payment Successfully message box would have to display
Payment Successfully message box would have to displayed
Pass 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 Shopping Mall System
Testing Date 8/5/2013
Test Case Name Find cancel order Test Case ID ID:07
Description This module deals with user to cancel the order
No Steps Result Expected
Outputs from Module
Result (Pass/Fail)
Corrective Actions
1.2 Click Cancel Order Cancel Order Cancel Pass Not Required
APIIT SD INDIA Page 48
Automated Online Shopping Mall System
Button Screen will be opened
order screen successfully opened
1.3 Enter ID number of Product and Click Cancel button
Order would have to be cancel and display message
Order successfully cancel and displayed message
Pass If product are ordered
Conclusion: After all corrective actions, the cancel module worked correctly.
Project Title Automated Online Shopping Mall System
Testing Date 8/5/2013
Test Case Name Display status Test Case ID ID:08Description This module deals with user to display status of canceled order or
buy productNo Steps Result
ExpectedOutputs from Module
Result (Pass/Fail)
Corrective Actions
1.1Click the button view status
pass pass Pass Not Required
1.2 A pop up window will open and display the status of the product
pass pass Pass If product are ordered
Conclusion: After all corrective actions, the cancel module worked correctly.
10. DEPTH OF DISCUSSIONUnder 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
System’s basic Functionality that is discussed above is successfully meeting the requirement and Special Functionality is also trying to achieve it.
Serial Basic Functionality Achieved1. Customer registration Yes2. Customer login and logout Yes
3. Product search according to brand name Yes4. Check availability Yes
APIIT SD INDIA Page 49
Automated Online Shopping Mall System
5. Purchase the product Yes6. Payment Module Yes7. Cancelation Order Yes8. Check order Confirmation Yes
Serial Special Functionality Achieved1. payment code of 16 digit with only 3
tries Yes
2. abort transaction Yes
3. Maintain log No4. Concurrency Yes5. 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.
APIIT SD INDIA Page 50
Automated Online Shopping Mall System
12 FUTURE ENHANCEMENT SYSTEMS1. In Future System will work online.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 Java’s 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 REFERENCESBOOK
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