Background
During the last decade E-Commerce has widely been adopted as an accepted a reliable and authentic platform for business. Today, almost every business employee’s websites, search engine optimization, and social media marketing to flourish their business at a global level. The transactions for business are quite easy and secure online making internet as a reliable and secure place for transactions [1]. The purpose this report is to develop an online bakery where any products like cakes, pastries and other baker items could be purchased.
An online store is a virtual store operating at the internet where customers can browse the inventory of the retailers and make purchases accordingly. The purchased items are collected in a shopping cart before being checked out by the customer [1]. At the checkout of the retailer’s website the purchased items are represented as an order. At that time, more information is required by the store to carry out the order. The customers are asked to fill in their billing address, credit or debit card information, and in some cases a shipping address. An e-mail notification is also sent to the customer regarding their order [1].
A good e-commerce site should present the following factors for the customers:
- Knowledge about the item when an item was saved or not saved in the shopping cart.
- The site should provide access to the customers at several parts of the website when an order is placed. It is done due to the reason that the customer might want to add, remove or change an item in the shopping cart [1].
- The products or services offered by the retailer should be represented and categorized in an understandable manner [1].
- The shopping links or buttons are efficiently provided to the customer.
- Consistent or demonstrative information about the product being purchased.
- The security messages and notifications are minimum and effective [2].
Data Flow Diagrams (DFD) show the flow of data on the website of the retailer. In the later years, with the integration of SQL and MySQL data bases the diagrams are known as UML diagrams. The UML diagram [4] of our project is presented as follows:
Description:
The client signs-up the site and places the contact details in the SQL database used by the website of the bakery. The next step is the verification of the details from the admin and activation of the account. After the account is activated the user is informed via an e-mail notification. The user is able to visit different product pages at the website and choose the products the likes to purchase [4]. The chosen products are placed in the shopping cart and when the user wants to checks out the products in the shopping cart are represented as order. The order can be cancelled, or placed at hold as required by the organization or the client. After complete payment processing the payments are processed and the order is delivered to the client.
Code:
package co.edureka;
public abstract class Cake {
String name;
String type;
int price;
public String getName(){
Case Study Question 1: Class Diagrams
return name;
}
public String getType(){
return type;
}
public int getPrice(){
return price;
}
public void setName(String name){
this.name=name;
}
public void setPrice(int price){
this.price=price;
}
public void setType(String type){
this.type=type;
}
public abstract void recipe();
public abstract void myFans();
public void aboutCake(){
System.out.println(“I am “+name+” Cake”);
System.out.print(“My Fans : “);
myFans();
System.out.println(“You can get a “+name+” Cake at “+price);
}
}
The activity diagram [4] for the proposed system can be represented by the following figure:
Description:
The activities taking place at the website of the online store can be represented by the diagram above. The user searches for the desired produce while browsing through several categories established at the website [4]. He keeps on browsing the website and the products are presented to him according to the previous preferences of the user at the website. The website continues to provide user access around different categories of the website “A”. After a product is finalized by the customer it is moved to the shopping cart [5]. Here, the user is allowed to browser further for additional products he might want to purchases and allowed access accordingly “B”. After, the products have been finalized the user is redirected to checkout page where the payment information is asked along with billing and shipping addresses “C”.
Code:
package co.edureka;
import java.util.Scanner;
public class CakeTest {
public static void main(String args[]) {
Cake cake = null;
System.out.println(“Which Cake you would like to eat “);
Scanner scanner = new Scanner(System.in);
String choice = scanner.nextLine();
scanner.close();
if (choice.equals(“BlackForest”)) {
cake = new BlackForest();
}
else if (choice.equals(“BlueBerry”)) {
cake = new BlueBerry();
}
else if (choice.equals(“LitchiGateaux”)) {
cake = new LitchiGateaux();
}
else if(choice.equals(“Pineapple”)){
cake=new Pineapple();
}
cake.aboutCake();
}
}
User Accounts
Being the center of activity in an online retail operation the user accounts are of crucial importance. The information provided by the client on the user account should be true as it will be used in all transactional and delivery processes. The payments details should of the client should match the details of the profile as it is required by the law [3]. The entire account creation activities can be represented by the diagram below:
Description
The first activity performed after the user has signed up on the website of the retailer is the verification of the details provided by the user. In case of false or malware information the account is immediately suspended [5]. After the activation of the account the user is able to access the various parts of the website and do shopping according to his will. When an account balance or activity is “Null” for a significant amount of time the account should be suspended saving memory for the new users.
Data flow Diagrams
Code:
create table Accounts (
User_Name varchar(20) not null,
Active bit not null,
Password varchar(20) not null,
User_Role varchar(20) not null,
primary key (User_Name)
);
create table Order_Details (
ID varchar(50) not null,
Amount double precision not null,
Price double precision not null,
Quanity integer not null,
ORDER_ID varchar(50) not null,
PRODUCT_ID varchar(20) not null,
primary key (ID)
);
ID varchar(50) not null,
Amount double precision not null,
Customer_Address varchar(255) not null,
Customer_Email varchar(128) not null,
Customer_Name varchar(255) not null,
Customer_Phone varchar(128) not null,
Order_Date datetime not null,
Order_Num integer not null,
primary key (ID)
);
create table Products (
Code varchar(20) not null,
Create_Date datetime not null,
Image longblob,
Name varchar(255) not null,
Price double precision not null,
primary key (Code)
);
alter table Orders
add constraint UK_sxhpvsj665kmi4f7jdu9d2791 unique (Order_Num);
alter table Order_Details
add constraint ORDER_DETAIL_ORD_FK
foreign key (ORDER_ID)
references Orders (ID);
alter table Order_Details
add constraint ORDER_DETAIL_PROD_FK
foreign key (PRODUCT_ID)
references Products (Code);
insert into Accounts (USER_NAME, ACTIVE, PASSWORD, USER_ROLE)
values (’employee1′, 1, ‘123’, ‘EMPLOYEE’);
insert into Accounts (USER_NAME, ACTIVE, PASSWORD, USER_ROLE)
values (‘manager1’, 1, ‘123’, ‘MANAGER’);
insert into products (CODE, NAME, PRICE, CREATE_DATE)
values (‘S001’, ‘Core Java’, 100, current_timestamp() );
insert into products (CODE, NAME, PRICE, CREATE_DATE)
values (‘S002’, ‘Spring for Beginners’, 50, current_timestamp() );
insert into products (CODE, NAME, PRICE, CREATE_DATE)
values (‘S003’, ‘Swift for Beginners’, 120, current_timestamp() );
insert into products (CODE, NAME, PRICE, CREATE_DATE)
values (‘S004’, ‘Oracle XML Parser’, 120, current_timestamp() );insert into products (CODE, NAME, PRICE, CREATE_DATE)
values (‘S005’, ‘CSharp Tutorial for Beginers’, 110, current_timestamp() );c
- Network Architecture
Description
The figure presented above represents a simple network architecture which can be used by an online retailer. The clients in an online retailing business have a remote access to the website or the network of the retailer protected by firewall [4], [5]. Web frame work is installed to stop and suspected activity and the local databases of the retailers are protected with the help of a firewall. Load balance is used when multiple users are attempting to sign-in and the cache memory of the retailer’s web is not able to handle multiple request or there is some other issue.
Conclusion
In the current paper, we have developed a basic online architecture for an online retailer bakery. First a class diagram is represented displaying the flow of data on the web app designed for the retailer. Secondly, the activity diagrams are presented and elaborated. The main activities are divided into three categories and explained accordingly. Online retail business is supposed to rely most on the user accounts and the way they are managed so we have developed user account profiles keeping their importance in mind.
References
Georgiou C, Stefaneas P. Strategies for accelerating the worldwide adoption of e-commerce. Communications of the ACM. 2002;45(4ve).
Huang Z, Benyoucef M. From e-commerce to social commerce: A close look at design features. Electronic Commerce Research and Applications. 2013;12(4):246-259.
LIU H, SHAO W, MA Z. Decomposition of Large Class Diagrams Generated by Reverse Engineering. Journal of Software. 2011;21(11):2701-2710.
Turan M. Integrating Software Metrics with UML Class Diagrams. Lecture Notes on Software Engineering. 2015;3(3):220-224.
HENRY A, HO D. Code-switching in Bruneian online retail transactions. World Englishes. 2016;35(4):554-570.