Professional Documents
Culture Documents
Online Shopping Report
Online Shopping Report
This project is a web based shopping system for an existing shop. The project
objective is to deliver the online shopping application into android platform. This
project is an attempt to provide the advantages of online shopping to customers of a
real shop. It helps buying the products in the shop anywhere through internet by using
an android device. Thus the customer will get the service of online shopping and home
delivery from his favorite shop. This system can be implemented to any shop in the
locality or to multinational branded shops having retail outlet chains. If shops are
providing an online portal where their customers can enjoy easy shopping from
anywhere, the shops won’t be losing any more customers to the trending online shops
such as flipcart or ebay. Since the application is available in the Smartphone it is easily
accessible and always available.
1
1. INTRODUCTION
In addition, only three large scale Asian supermarkets are located in Helsinki
and they are in the same place in the city centre. According to information received
from friends, a lot of Finnish people like Asian diet. Thus, the goal of this project is to
provide a platform for more and more Finnish people to become familiar with Asian
food and purchase it online, and to develop an independent online shopping system
based on Android Studio. In the future, this project could be used for the establishment
of a personal online shopping portal, or it could be sold to a company interested in
Asian product trading. The system includes both a front-end portal for customers and a
back-end management system used by administrators to manage the website in the
background. Android Studio is used as the framework for the project to facilitate
software development, maintenance and upgrading.
2
2. SYSTEM CONFIGURATION
RAM : 2 GB Ram
Cache Memory : 2 MB
Language : JAVA
Android Architecture
1. Application layer
2. Application Framework
3. Libraries
4. Linux kernel
4
Fig 2.1 Android Architecture
Linux Kernel
Lower layer of android operating system is Linux kernel. It does not really
interact with the users and developers. The Linux Kernel provides a level of abstraction
between the device hardware and the upper layers of the Android software stack. Based
on Linux version 2.6, the kernel provides pre-emptive multitasking, lowlevel core
system services such as memory, process and power management in addition to
providing a network stack and device drivers for hardware such as the device display,
Wi-Fi and audio. Also, the kernel handles all the things that Linux is really good at
such as networking and a vast array of device drivers, which take the pain out of
interfacing to peripheral hardware.
Libraries
On top of Linux kernel there is a set of c/c++ libraries used by the various
components of the android system. Some of the core libraries are listed below:
5
System c library – a BSD– derived implementation of the standard and system
library (libc) tuned for embedded Linux-based devices.
Libwebcore – a modern web browser engine which powers both the android
browser and an embedded web view.
Android Runtime:
6
Fig 2.2 Dalvik Virtual Machine
Application Framework
Activity Manager – Controls all aspects of the application lifecycle and activity
stack.
Content Providers – Allows applications to publish and share data with other
applications.
7
Resource Manager – Provides access to non-code embedded resources such as
strings, color settings and user interface layouts.
Package Manager – The system by which applications are able to find out
information about other applications currently installed on the device.
Android Security
Nowadays near all of the tasks that you could only perform on a computer are
also performed on mobile devices as well. This means that more sensitive information
is stored on people mobile devices than before. The need for security is greater than
ever for not only consumers, but large enterprise as well. Android software stack itself
provides security to its application. Key features includes physical access, app
permission, the application sandbox, rooting. Physical access Android has a couple of
features that can help to prevent hackers. The first is the unlock screen when the device
is woken from sleep. The standard unlock screen is just the slider which basically stops
the screen from being activated in your pocket. But Android also allows you to set an
unlock pattern, PIN or password. Unless the intruder knows the pattern, PIN or
password they can’t get access to your device.
8
App permissions
Every app that you install on your device needs to specifically ask you for
permission to perform certain tasks. This is done when you install the app. What this
means in practical terms is that apps have limited abilities. As well as limiting the
abilities of apps, Android also controls how an app accesses the device’s hardware.
There is no direct hardware access allowed in Android; all access is through the
different software layers which make up the Android OS. This means that rogue apps
can’t go around re-programming the microphone on your phone or bypassing the app
permissions by talking directly to the video camera, etc.
Android has another layer of protection in that it doesn’t give one app access to
the resource of another app. This is known as the ‘sandbox’ where every app gets to
play in its own sandbox and can’t use another app’s toys! Android does this by giving
each app a unique user id (a UID) and by running that app as a separate process with
that UID. Only processes with the same UIDs can share resources which, as each ID is
uniquely assigned, means that no other apps have permission. Google’s own words on
this, “like all security features, the Application Sandbox is not unbreakable. However,
to break out of the Application Sandbox in a properly configured device, one must
compromise the security of the Linux kernel.”
Rooting
In the world of Linux ‘root’ is the supreme user level which has the rights to
perform any task. It is similar to the Administrator user on a Windows PC. By default,
only the Linux kernel and a small number of core utilities run as this super user. But by
‘rooting’ your device (which means the root user level is available to all apps) then
many of the security mechanisms described above are made null and void. This is
9
because an app with root permission can modify any other part of the Android OS
including the operating system itself, the kernel, and other apps.
Malware
It is an unfortunate reality, but reality none the less, that Android has a malware
problem. First, for an app to be malicious it doesn’t need to have access to the deeper
levels of the OS. If an unsuspecting user installs a malicious app which sends premium
rate SMS message sand the user granted those privileges to the app when it’s installed,
then the malware has successfully been installed without breaking any of the security.
Secondly, some malware actually comes with root exploits built-in. This means that
when the app is installed it actually roots the device (without the user knowing) and by-
passes all the system security. Thirdly, there is malware that just loves rooted phones. If
the malware gets installed on a non-rooted phone it does nothing, but when installed on
a rooted phone it unleashes all of its nastiness.
3. SYSTEM ANALYSIS
10
3.1 Existing System
Many customers go for purchasing offline so as to examine the product and hold
the possession of the product just after the payment for the product. In this
contemporary world customer loyalty depends upon the consistent ability to deliver
quality, value and satisfaction. Offline shopping has a sense of immediacy. You get to
posses the item you've purchased the very moment. If we can search and make a list of
items that we would like to try while shopping, before actually going out. This way we
can be more confident in our purchase and not missing out something. This can also
help us to decide what areas to visit. And plan such an event with friends.
Disadvantages
Time Consuming
Shipping Rates
Refunds/Returns Disputes
Lack of options
11
home. No need to go anywhere and do shopping. We can get different varieties of
things online and we can choose which one we want.
Advantages
Lower prices
Saves Time
The central concept of the application is to allow the customer to shop virtually
using the Internet and allow customers to buy the items and articles of their desire from
the store. The information pertaining to the products are stores on an RDBMS at the
server side (store).The Server process the customers and the items are shipped to the
address submitted by them. The application was designed into two modules first is for
the customers who wish to buy the articles. Second is for the storekeepers who
maintains and updates the information pertaining to the articles and those of the
customers. The end user of this product is a departmental store where the application is
hosted on the web and the administrator maintains the database. The application which
is deployed at the customer database, the details of the items are brought forward from
the database for the customer view based on the selection through the menu and the
database of all the products are updated at the end of each transaction. Data entry into
the application can be done through various screens designed for various levels of
users. Once the authorized personnel feed the relevant data into
Loginthe
DBsystem, several
reports could be generated as per the security.
13 If Yes
Main Page
Login
Add/
Remove
Manage
moderator User
Detail DB
Block/
Search
Add/
REGISTRATION DFD Remove
Manage
User
Registration
Block/DB
View
Add/
Admin Manage Delete
Enter User Name
Product Check
User Product
& password Validity
Detail DB
Search Successful
Main Page
ADMIN DFD
View
Manage
Order
14
Product
Delete Order DB
6. SYSTEM IMPLEMENTATION AND TESTING
15
The system after careful analysis has been identified to be presented with the
following modules and roles.
Administrator
Users
ADMINISTRATOR
The administrator is the super user of this application. Only admin have access
into this admin page. Admin may be the owner of the shop. The administrator has all
the information about all the users and about all products.
1. Manage Moderators
2. Manage Products
3. Manage Users
4. Manage Orders
MANAGE MODERATORS
Add Moderator
Block moderator
Admin can restrict a moderator from managing the orders by blocking them.
Admin can unblock a blocked user if needed.
16
Remove Moderator
Search moderator
MANAGE PRODUCTS
Add Products
The shopping cart project contains different kind of products. The products can
be classified into different categories by name. Admin can add new products into the
existing system with all its details including an image.
Delete Products
Administrator can delete the products based on the stock of that particular
product.
Search products
Admin will have a list view of all the existing products. He can also search for a
particular product by name.
MANAGE USERS
View Users
The admin will have a list view of all the users registered in the system. Admin
can view all the details of each user in the list except password.
17
Add Users
Administrator has a right to delete or block a user. The default status of a new
user registered is set as blocked. The admin must accept the new user by unblocking
him.
MANAGE ORDERS
View Order
Administrator can view the Orders which is generated by the users. He can
verify the details of the purchase.
Delete order
Admin can delete order from the orders list when the product is taken for
delivery.
Users
Registration
A new user will have to register in the system by providing essential details in
order to view the products in the system. The admin must accept a new user by
unblocking him.
18
Login
A user must login with his user name and password to the system after
registration.
View Products
User can view the list of products based on their names after successful login. A
detailed description of a particular product with product name, products details,
product image, price can be viewed by users.
Search Product
Add to cart:
The user can add the desired product into his cart by clicking add to cart option
on the product. He can view his cart by clicking on the cart button. All products added
by cart can be viewed in the cart. User can remove an item from the cart by clicking
remove.
Submit Cart
After confirming the items in the cart the user can submit the cart by providing a
delivery address. On successful submitting the cart will become empty.
History
Edit Profile
TYPES OF TESTS
Unit testing
Unit testing involves the design of test cases that validate that the internal
program logic is functioning properly, and that program inputs produce valid outputs.
All decision branches and internal code flow should be validated. It is the testing of
individual software units of the application .it is done after the completion of an
individual unit before integration. This is a structural testing, that relies on knowledge
of its construction and is invasive. Unit tests perform basic tests at component level and
test a specific business process, application, and/or system configuration. Unit tests
ensure that each unique path of a business process performs accurately to the
documented specifications and contains clearly defined inputs and expected results.
Ideally, each test case is independent from the others. Substitutes such
as method stubs, mock objects, fakes, and test harnesses can be used to assist testing a
module in isolation. Unit tests are typically written and run by software developers to
ensure that code meets its design and behaves as intended.
Unit testing involves the design of test cases that validate that the internal
program logic is functioning properly, and that program inputs produce valid outputs.
All decision branches and internal code flow should be validated. It is the testing of
individual software units of the application.
Integration testing
Integration tests are designed to test integrated software components to
determine if they actually run as one program. Testing is event driven and is more
concerned with the basic outcome of screens or fields. Integration tests demonstrate
21
that although the components were individually satisfaction, as shown by successfully
unit testing, the combination of components is correct and consistent. Integration
testing is specifically aimed at exposing the problems that arise from the combination
of components.
Functional test
Functional tests provide systematic demonstrations that functions tested are
available as specified by the business and technical requirements, system
documentation, and user manuals.
System Test
System testing ensures that the entire integrated software system meets
requirements. It tests a configuration to ensure known and predictable results. An
example of system testing is the configuration oriented system integration test. System
22
testing is based on process descriptions and flows, emphasizing pre-driven process
links and integration points.
White Box Testing is a testing in which in which the software tester has
knowledge of the inner workings, structure and language of the software, or at least its
purpose. It is purpose. It is used to test areas that cannot be reached from a black box
level.
Black Box Testing is testing the software without any knowledge of the inner
workings, structure or language of the module being tested. Black box tests, as most
other kinds of tests, must be written from a definitive source document, such as
specification or requirements document, such as specification or requirements
document. It is a testing in which the software under test is treated, as a black box .you
cannot “see” into it. The test provides inputs and responds to outputs without
considering how the software works.
23
are generally derived from external descriptions of the software, including
specifications, requirements and design parameters. Although the tests used are
primarily functional in nature, non-functional tests may also be used.
Unit Testing
Unit testing is usually conducted as part of a combined code and unit test phase
of the software lifecycle, although it is not uncommon for coding and unit testing to be
conducted as two distinct phases.
Field testing will be performed manually and functional tests will be written in
detail.
Test objectives
Features to be tested
24
Integration Testing
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
7. APPENDICES
7.1 Source code
package com.shopit.shopit.activities;
import android.graphics.Color;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
25
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.bumptech.glide.Glide;
import com.shopit.shopit.R;
import com.shopit.shopit.database.EntityPersistenceListener;
import com.shopit.shopit.database.InsertEntityAsyncTask;
import com.shopit.shopit.database.InstantiateDatabase;
import com.shopit.shopit.database.PersistableItem;
import com.shopit.shopit.database.PersistableItemDao;
import java.util.ArrayList;
public class ItemInfoActivity extends AppCompatActivity {
private ImageView itemInfoImage;
private TextView itemInfoName;
private TextView itemInfoPrice;
private FloatingActionButton floatingActionButton;
private TextView size1, size2, size3, size4, size5;
private LinearLayout color1, color2, color3, color4, color5;
private LinearLayout size1Selection, size2Selection, size3Selection, size4Selection,
size5Selection;
private LinearLayout color1Selection, color2Selection, color3Selection,
color4Selection, color5Selection;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
26
setContentView(R.layout.activity_item_info);
initViews();
}
private void initViews() {
itemInfoImage = findViewById(R.id.item_info_image);
itemInfoName = findViewById(R.id.item_info_name);
itemInfoPrice = findViewById(R.id.item_info_price);
floatingActionButton = findViewById(R.id.add_to_cart);
final ArrayList<TextView> sizeViews = new ArrayList<TextView>();
final ArrayList<LinearLayout> sizeSelection = new ArrayList<LinearLayout>();
final ArrayList<LinearLayout> colorViews = new ArrayList<LinearLayout>();
final ArrayList<LinearLayout> colorSelection = new ArrayList<LinearLayout>();
initSizeView(sizeViews, sizeSelection);
initColorView(colorViews,colorSelection);
final String itemImageUrl = getIntent().getStringExtra("itemUrl");
final String itemName = getIntent().getStringExtra("itemName");
final Double itemPrice = getIntent().getDoubleExtra("itemPrice", 0.0d);
final String itemId = getIntent().getStringExtra("itemId");
final ArrayList<String> sizes = getIntent().getStringArrayListExtra("sizes");
final ArrayList<String> colors = getIntent().getStringArrayListExtra("colors");
itemInfoName.setText(itemName);
itemInfoPrice.setText(Double.toString(itemPrice));
for (int i = 0; i < sizes.size(); i++) {
sizeViews.get(i).setText(sizes.get(i));
sizeSelection.get(i).setVisibility(View.VISIBLE);
}
27
colorViews.get(i).setBackgroundColor(Color.parseColor(colors.get(i)));
colorSelection.get(i).setVisibility(View.VISIBLE);
}
Glide.with(this)
.load(itemImageUrl)
.into(itemInfoImage);
floatingActionButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
PersistableItemDao persistableItemDao =
InstantiateDatabase.getDatabaseInstance
(getApplicationContext()).itemsDao();
PersistableItem persistableItem = new PersistableItem();
persistableItem.itemId = itemId;
persistableItem.itemColor = "Green";
persistableItem.itemSize = "L";
new InsertEntityAsyncTask(ItemInfoActivity.this, persistableItem, new
EntityPersistenceListener() {
@Override
public void onEntityPersisted() {
Toast.makeText(ItemInfoActivity.this, "Added to cart",
Toast.LENGTH_LONG).show();
}
@Override
public void onFailureOccured() {
Toast.makeText(ItemInfoActivity.this, "Something went wrong",
Toast.LENGTH_LONG).show();
28
}
}, persistableItemDao).execute();
}
});
}
private void initSizeView(final ArrayList<TextView> sizeViews, final
ArrayList<LinearLayout> sizeSelection) {
size1 = findViewById(R.id.size1);
size2 = findViewById(R.id.size2);
size3 = findViewById(R.id.size3);
size4 = findViewById(R.id.size4);
size5 = findViewById(R.id.size5);
size1Selection = findViewById(R.id.size1_selection);
size2Selection = findViewById(R.id.size2_selection);
size3Selection = findViewById(R.id.size3_selection);
size4Selection = findViewById(R.id.size4_selection);
size5Selection = findViewById(R.id.size5_selection);
sizeViews.add(size1);
sizeViews.add(size2);
sizeViews.add(size3);
sizeViews.add(size4);
sizeViews.add(size5);
sizeSelection.add(size1Selection);
sizeSelection.add(size2Selection);
sizeSelection.add(size3Selection);
sizeSelection.add(size4Selection);
sizeSelection.add(size5Selection);
SizeOnClickListener sizeOnClickListener = new SizeOnClickListener();
29
size1Selection.setOnClickListener(sizeOnClickListener);
size2Selection.setOnClickListener(sizeOnClickListener);
size3Selection.setOnClickListener(sizeOnClickListener);
size4Selection.setOnClickListener(sizeOnClickListener);
size5Selection.setOnClickListener(sizeOnClickListener);
size1Selection.setVisibility(View.GONE);
size2Selection.setVisibility(View.GONE);
size3Selection.setVisibility(View.GONE);
size4Selection.setVisibility(View.GONE);
size5Selection.setVisibility(View.GONE);
}
private void initColorView(final ArrayList<LinearLayout> colorViews, final
ArrayList<LinearLayout> colorSelection) {
color1 = findViewById(R.id.color1);
color2 = findViewById(R.id.color2);
color3 = findViewById(R.id.color3);
color4 = findViewById(R.id.color4);
color5 = findViewById(R.id.color5);
color1Selection = findViewById(R.id.color1_selection);
color2Selection = findViewById(R.id.color2_selection);
color3Selection = findViewById(R.id.color3_selection);
color4Selection = findViewById(R.id.color4_selection);
color5Selection = findViewById(R.id.color5_selection);
colorViews.add(color1);
colorViews.add(color2);
colorViews.add(color3);
colorViews.add(color4);
colorViews.add(color5);
30
colorSelection.add(color1Selection);
colorSelection.add(color2Selection);
colorSelection.add(color3Selection);
colorSelection.add(color4Selection);
colorSelection.add(color5Selection);
ColorOnClickListener colorOnClickListener = new ColorOnClickListener();
color1Selection.setOnClickListener(colorOnClickListener);
color2Selection.setOnClickListener(colorOnClickListener);
color3Selection.setOnClickListener(colorOnClickListener);
color4Selection.setOnClickListener(colorOnClickListener);
color5Selection.setOnClickListener(colorOnClickListener);
color1Selection.setVisibility(View.GONE);
color2Selection.setVisibility(View.GONE);
color3Selection.setVisibility(View.GONE);
color4Selection.setVisibility(View.GONE);
color5Selection.setVisibility(View.GONE);
}
class SizeOnClickListener implements View.OnClickListener {
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.size1_selection:
size1Selection.setBackgroundResource(R.color.black);
if (size2Selection.getVisibility() == View.VISIBLE) {
size2Selection.setBackgroundResource(R.color.white);
}
if (size3Selection.getVisibility() == View.VISIBLE) {
31
size3Selection.setBackgroundResource(R.color.white);
}
if (size4Selection.getVisibility() == View.VISIBLE) {
size4Selection.setBackgroundResource(R.color.white);
}
if (size5Selection.getVisibility() == View.VISIBLE) {
size5Selection.setBackgroundResource(R.color.white);
}
break;
case R.id.size2_selection:
size2Selection.setBackgroundResource(R.color.black);
if (size1Selection.getVisibility() == View.VISIBLE) {
size1Selection.setBackgroundResource(R.color.white);
}
if (size3Selection.getVisibility() == View.VISIBLE) {
size3Selection.setBackgroundResource(R.color.white);
}
if (size4Selection.getVisibility() == View.VISIBLE) {
size4Selection.setBackgroundResource(R.color.white);
}
if (size5Selection.getVisibility() == View.VISIBLE) {
size5Selection.setBackgroundResource(R.color.white);
}
break;
case R.id.size3_selection:
size3Selection.setBackgroundResource(R.color.black);
if (size1Selection.getVisibility() == View.VISIBLE) {
size1Selection.setBackgroundResource(R.color.white);
32
}
if (size2Selection.getVisibility() == View.VISIBLE) {
size2Selection.setBackgroundResource(R.color.white);
}
if (size4Selection.getVisibility() == View.VISIBLE) {
size4Selection.setBackgroundResource(R.color.white);
}
if (size5Selection.getVisibility() == View.VISIBLE) {
size5Selection.setBackgroundResource(R.color.white);
}
break;
case R.id.size4_selection:
size4Selection.setBackgroundResource(R.color.black);
if (size1Selection.getVisibility() == View.VISIBLE) {
size1Selection.setBackgroundResource(R.color.white);
}
if (size2Selection.getVisibility() == View.VISIBLE) {
size2Selection.setBackgroundResource(R.color.white);
}
if (size3Selection.getVisibility() == View.VISIBLE) {
size3Selection.setBackgroundResource(R.color.white);
}
if (size5Selection.getVisibility() == View.VISIBLE) {
size5Selection.setBackgroundResource(R.color.white);
}
break;
case R.id.size5_selection:
size5Selection.setBackgroundResource(R.color.black);
33
if (size1Selection.getVisibility() == View.VISIBLE) {
size1Selection.setBackgroundResource(R.color.white);
}
if (size2Selection.getVisibility() == View.VISIBLE) {
size2Selection.setBackgroundResource(R.color.white);
}
if (size3Selection.getVisibility() == View.VISIBLE) {
size3Selection.setBackgroundResource(R.color.white);
}
if (size4Selection.getVisibility() == View.VISIBLE) {
size4Selection.setBackgroundResource(R.color.white);
}
break;
}
}
}
class ColorOnClickListener implements View.OnClickListener {
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.color1_selection:
color1Selection.setBackgroundResource(R.color.black);
if (color2Selection.getVisibility() == View.VISIBLE) {
color2Selection.setBackgroundResource(R.color.white);
}
if (color3Selection.getVisibility() == View.VISIBLE) {
34
color3Selection.setBackgroundResource(R.color.white);
}
if (color4Selection.getVisibility() == View.VISIBLE) {
color4Selection.setBackgroundResource(R.color.white);
}
if (color5Selection.getVisibility() == View.VISIBLE) {
color5Selection.setBackgroundResource(R.color.white);
}
break;
case R.id.color2_selection:
color2Selection.setBackgroundResource(R.color.black);
if (color1Selection.getVisibility() == View.VISIBLE) {
color1Selection.setBackgroundResource(R.color.white);
}
if (color3Selection.getVisibility() == View.VISIBLE) {
color3Selection.setBackgroundResource(R.color.white);
}
if (color4Selection.getVisibility() == View.VISIBLE) {
color4Selection.setBackgroundResource(R.color.white);
}
if (color5Selection.getVisibility() == View.VISIBLE) {
color5Selection.setBackgroundResource(R.color.white);
}
break;
case R.id.color3_selection:
color3Selection.setBackgroundResource(R.color.black);
if (color1Selection.getVisibility() == View.VISIBLE) {
color1Selection.setBackgroundResource(R.color.white);
35
}
if (color2Selection.getVisibility() == View.VISIBLE) {
color2Selection.setBackgroundResource(R.color.white);
}
if (color4Selection.getVisibility() == View.VISIBLE) {
color4Selection.setBackgroundResource(R.color.white);
}
if (color5Selection.getVisibility() == View.VISIBLE) {
color5Selection.setBackgroundResource(R.color.white);
}
break;
case R.id.color4_selection:
color4Selection.setBackgroundResource(R.color.black);
if (color1Selection.getVisibility() == View.VISIBLE) {
color1Selection.setBackgroundResource(R.color.white);
}
if (color2Selection.getVisibility() == View.VISIBLE) {
color2Selection.setBackgroundResource(R.color.white);
}
if (color3Selection.getVisibility() == View.VISIBLE) {
color3Selection.setBackgroundResource(R.color.white);
}
if (color5Selection.getVisibility() == View.VISIBLE) {
color5Selection.setBackgroundResource(R.color.white);
}
break;
case R.id.color5_selection:
color5Selection.setBackgroundResource(R.color.black);
36
if (color1Selection.getVisibility() == View.VISIBLE) {
color1Selection.setBackgroundResource(R.color.white);
}
if (color2Selection.getVisibility() == View.VISIBLE) {
color2Selection.setBackgroundResource(R.color.white);
}
if (color3Selection.getVisibility() == View.VISIBLE) {
color3Selection.setBackgroundResource(R.color.white);
}
if (color4Selection.getVisibility() == View.VISIBLE) {
size4Selection.setBackgroundResource(R.color.white);
}
break;
}
}
}
}
package com.shopit.shopit.login;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.CoordinatorLayout;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
37
import android.widget.EditText;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.shopit.shopit.MainActivity;
import com.shopit.shopit.R;
import com.shopit.shopit.navigation.Navigator;
public class LoginActivity extends AppCompatActivity {
private EditText inputEmail, inputPassword;
private FirebaseAuth auth;
private ProgressDialog progressDialog;
private Button btnSignup, btnLogin, btnReset;
private CoordinatorLayout loginBackground;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (auth.getCurrentUser() != null) {
startActivity(new Intent(LoginActivity.this, Navigator.class));
finish();
}
38
setContentView(R.layout.activity_login);
btnSignup.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(LoginActivity.this, SignUpActivity.class));
finish();
}
});
39
btnReset.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(LoginActivity.this, ResetPasswordActivity.class));
finish();
}
});
btnLogin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String email = inputEmail.getText().toString();
final String password = inputPassword.getText().toString();
if (TextUtils.isEmpty(email)) {
Toast.makeText(getApplicationContext(), "Enter email address!",
Toast.LENGTH_SHORT).show();
return;
}
if (TextUtils.isEmpty(password)) {
Toast.makeText(getApplicationContext(), "Enter password!",
Toast.LENGTH_SHORT).show();
return;
}
progressDialog.show();
//authenticate user
40
auth.signInWithEmailAndPassword(email, password)
.addOnCompleteListener(LoginActivity.this, new
OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
// If sign in fails, display a message to the user. If sign in succeeds
// the auth state listener will be notified and logic to handle the
// signed in user can be handled in the listener.
progressDialog.dismiss();
if (!task.isSuccessful()) {
// there was an error
if (password.length() < 6) {
inputPassword.setError(getString(R.string.minimum_password));
} else {
Toast.makeText(LoginActivity.this,
getString(R.string.auth_failed), Toast.LENGTH_LONG).show();
}
} else {
Intent intent = new Intent(LoginActivity.this, Navigator.class);
startActivity(intent);
finish();
}
}
});
}
});
}
41
}
package com.shopit.shopit.login;
/**
* Created by mohit on 24/9/18.
*/
import android.app.ProgressDialog;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.shopit.shopit.R;
42
private FirebaseAuth auth;
private ProgressDialog progressDialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_reset_password);
auth = FirebaseAuth.getInstance();
btnBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
btnReset.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
43
String email = inputEmail.getText().toString().trim();
if (TextUtils.isEmpty(email)) {
Toast.makeText(getApplication(), "Enter your registered email id",
Toast.LENGTH_SHORT).show();
return;
}
progressDialog.show();
auth.sendPasswordResetEmail(email)
.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
progressDialog.dismiss();
if (task.isSuccessful()) {
Toast.makeText(ResetPasswordActivity.this, "We have sent you
instructions to reset your password!", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(ResetPasswordActivity.this, "Failed to send
reset email!", Toast.LENGTH_SHORT).show();
}
}
});
}
});
}
44
}
package com.shopit.shopit.login;
/**
* Created by mohit on 24/9/18.
*/
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.shopit.shopit.MainActivity;
import com.shopit.shopit.R;
import com.shopit.shopit.navigation.Navigator;
45
private EditText inputEmail, inputPassword;
private Button btnSignIn, btnSignUp, btnResetPassword;
private ProgressDialog progressDialog;
private FirebaseAuth auth;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_signup);
46
btnResetPassword.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(SignUpActivity.this, ResetPasswordActivity.class));
finish();
}
});
btnSignIn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(SignUpActivity.this, LoginActivity.class));
finish();
}
});
btnSignUp.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (TextUtils.isEmpty(email)) {
Toast.makeText(getApplicationContext(), "Enter email address!",
Toast.LENGTH_SHORT).show();
return;
}
47
if (TextUtils.isEmpty(password)) {
Toast.makeText(getApplicationContext(), "Enter password!",
Toast.LENGTH_SHORT).show();
return;
}
if (password.length() < 6) {
Toast.makeText(getApplicationContext(), "Password too short, enter
minimum 6 characters!", Toast.LENGTH_SHORT).show();
return;
}
progressDialog.show();
//create user
auth.createUserWithEmailAndPassword(email, password)
.addOnCompleteListener(SignUpActivity.this, new
OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
progressDialog.dismiss();
// If sign in fails, display a message to the user. If sign in succeeds
// the auth state listener will be notified and logic to handle the
// signed in user can be handled in the listener.
if (!task.isSuccessful()) {
Toast.makeText(SignUpActivity.this, "Authentication failed." +
task.getException().getMessage(),
Toast.LENGTH_SHORT).show();
48
} else {
startActivity(new Intent(SignUpActivity.this,
Navigator.class));
finish();
}
}
});
}
});
}
}
package com.shopit.shopit.fragments;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.bumptech.glide.Glide;
49
import com.bumptech.glide.load.resource.drawable.GlideDrawable;
import com.bumptech.glide.request.animation.GlideAnimation;
import com.bumptech.glide.request.target.SimpleTarget;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.shopit.shopit.R;
import com.shopit.shopit.model.Category;
import com.shopit.shopit.navigation.FragmentTransactionUtils;
import com.shopit.shopit.viewHolders.CategoryViewHolder;
import java.util.ArrayList;
import java.util.List;
/**
* Created by mohit on 30/9/18.
*/
50
private static int navViewId;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
final ViewGroup rootView = (ViewGroup) inflater.inflate(
R.layout.item_recyclerview, container, false);
mRecyclerView = rootView.findViewById(R.id.recycler_view);
mRecyclerView.setHasFixedSize(true);
mLayoutManager = new LinearLayoutManager(getActivity());
mRecyclerView.setLayoutManager(mLayoutManager);
databaseReference =
FirebaseDatabase.getInstance().getReference().child("shopit").child("category");
valueEventListener = new CategoryValueEventListener();
//mAdapter = new DisplayItemRecyclerViewAdapter(getContext());
mAdapter = new
GenericRecyclerViewAdapter<Category,CategoryViewHolder>(new
ViewHolderCreater<CategoryViewHolder>() {
@Override
51
public CategoryViewHolder onCreateViewHolder(ViewGroup parent, int
viewType) {
View v=
LayoutInflater.from(getContext()).inflate(R.layout.category_card_layout,parent,false);
return new CategoryViewHolder(v);
}
}, new ViewHolderBinder<Category, CategoryViewHolder>() {
@Override
public void onBindViewHolder(final CategoryViewHolder holder, final
List<Category> categories, final int position) {
Glide.with(getContext())
.load(categories.get(position).getUrl())
.into(new SimpleTarget<GlideDrawable>() {
@Override
public void onResourceReady(GlideDrawable resource,
GlideAnimation<? super GlideDrawable> glideAnimation) {
holder.categoryLinearLayout.setBackground(resource);
}
});
holder.categoryLinearLayout.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View v) {
final CategoryTypeFragment categoryTypeFragment =
CategoryTypeFragment.getInstance(appCompatActivity,navViewId);
Bundle bundle = new Bundle();
ArrayList<String> childHierarchy = new ArrayList<String>();
childHierarchy.add("shopit");
52
childHierarchy.add(categories.get(position).getName());
bundle.putStringArrayList("childHierarchy",childHierarchy);
categoryTypeFragment.setArguments(bundle);
FragmentTransactionUtils.changeFragment(appCompatActivity,categoryTypeFragment
,navViewId);
}
});
}
});
mRecyclerView.setAdapter(mAdapter);
return rootView;
}
@Override
public void onStart() {
super.onStart();
databaseReference.addValueEventListener(valueEventListener);
}
@Override
public void onStop() {
super.onStop();
if(valueEventListener!=null)
databaseReference.removeEventListener(valueEventListener);
}
53
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
List<Category> updates = new ArrayList<>();
for(DataSnapshot itemSnapshot:dataSnapshot.getChildren()){
updates.add(itemSnapshot.getValue(Category.class));
}
mAdapter.onUpdate(updates);
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
}
}
package com.shopit.shopit.fragments;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
54
import android.view.ViewGroup;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.SimpleResource;
import com.bumptech.glide.load.resource.drawable.GlideDrawable;
import com.bumptech.glide.request.animation.GlideAnimation;
import com.bumptech.glide.request.target.SimpleTarget;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.shopit.shopit.R;
import com.shopit.shopit.model.Category;
import com.shopit.shopit.model.CategoryType;
import com.shopit.shopit.navigation.FragmentTransactionUtils;
import com.shopit.shopit.viewHolders.CategoryTypeViewHolder;
import com.shopit.shopit.viewHolders.CategoryViewHolder;
import java.util.ArrayList;
import java.util.List;
/**
* Created by mohit on 30/9/18.
*/
55
private RecyclerView mRecyclerView;
private GenericRecyclerViewAdapter mAdapter;
private RecyclerView.LayoutManager mLayoutManager;
private DatabaseReference databaseReference;
private ValueEventListener valueEventListener;
private static AppCompatActivity appCompatActivity;
private static int navViewId;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
final ViewGroup rootView = (ViewGroup) inflater.inflate(
R.layout.item_recyclerview, container, false);
mRecyclerView = rootView.findViewById(R.id.recycler_view);
mRecyclerView.setHasFixedSize(true);
mLayoutManager = new LinearLayoutManager(getActivity());
mRecyclerView.setLayoutManager(mLayoutManager);
final Bundle bundle = getArguments();
List<String> childHierarchy = bundle.getStringArrayList("childHierarchy");
databaseReference = FirebaseDatabase.getInstance().getReference();
56
for(String child:childHierarchy){
databaseReference = databaseReference.child(child);
}
mAdapter = new
GenericRecyclerViewAdapter<CategoryType,CategoryTypeViewHolder>(new
ViewHolderCreater<CategoryTypeViewHolder>() {
@Override
public CategoryTypeViewHolder onCreateViewHolder(ViewGroup parent, int
viewType) {
View v=
LayoutInflater.from(getContext()).inflate(R.layout.category_type_cardlayout,parent,fal
se);
return new CategoryTypeViewHolder(v);
}
}, new ViewHolderBinder<CategoryType, CategoryTypeViewHolder>() {
@Override
public void onBindViewHolder(final CategoryTypeViewHolder holder,final
List<CategoryType> categories,final int position) {
Glide.with(getContext())
.load(categories.get(position).getUrl())
.into(holder.categoryTypeImage);
holder.categoryTypeName.setText(categories.get(position).getName());
holder.cardView.setOnClickListener(new View.OnClickListener() {
@Override
57
public void onClick(View v) {
DisplayItemsFragment displayItemsFragment =
DisplayItemsFragment.getInstance(appCompatActivity,navViewId);
Bundle bundle = new Bundle();
ArrayList<String> childHierarchy = new ArrayList<String>();
childHierarchy.add("shopit");
childHierarchy.add(categories.get(position).getName());
bundle.putStringArrayList("childHierarchy",childHierarchy);
displayItemsFragment.setArguments(bundle);
FragmentTransactionUtils.changeFragment(appCompatActivity,displayItemsFragment,
navViewId);
}
});
}
});
mRecyclerView.setAdapter(mAdapter);
return rootView;
}
@Override
public void onStart() {
super.onStart();
databaseReference.addValueEventListener(valueEventListener);
}
@Override
58
public void onStop() {
super.onStop();
if(valueEventListener!=null)
databaseReference.removeEventListener(valueEventListener);
}
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
List<CategoryType> updates = new ArrayList<>();
for(DataSnapshot itemSnapshot:dataSnapshot.getChildren()){
updates.add(itemSnapshot.getValue(CategoryType.class));
}
mAdapter.onUpdate(updates);
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
}
}
package com.shopit.shopit.fragments;
59
import android.content.Context;
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.shopit.shopit.R;
import com.shopit.shopit.model.Item;
import java.util.ArrayList;
import java.util.List;
/**
* Created by mohit on 30/9/18.
*/
60
public DisplayItemRecyclerViewAdapter(Context context){
this.context = context;
}
public ViewHolder(View v) {
super(v);
itemImage = v.findViewById(R.id.item_image);
itemPrice = v.findViewById(R.id.item_price);
itemName = v.findViewById(R.id.item_name);
itemCardView = v.findViewById(R.id.item_card_view);
}
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v=
LayoutInflater.from(context).inflate(R.layout.item_cardlayout,parent,false);
return new ViewHolder(v);
}
61
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
holder.itemPrice.setText("$"+items.get(position).getPrice().toString());
holder.itemName.setText(items.get(position).getName().toString());
Glide.with(context)
.load(items.get(position).getUrl())
.into(holder.itemImage);
}
@Override
public int getItemCount() {
return items.size();
}
package com.shopit.shopit.fragments;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
62
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.bumptech.glide.Glide;
import com.google.firebase.database.ChildEventListener;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.shopit.shopit.R;
import com.shopit.shopit.activities.ItemInfoActivity;
import com.shopit.shopit.model.Item;
import com.shopit.shopit.viewHolders.ItemViewHolder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* Created by mohit on 30/9/18.
*/
63
public class DisplayItemsFragment extends Fragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
final ViewGroup rootView = (ViewGroup) inflater.inflate(
R.layout.item_recyclerview, container, false);
mRecyclerView = rootView.findViewById(R.id.recycler_view);
mRecyclerView.setHasFixedSize(true);
64
mLayoutManager = new LinearLayoutManager(getActivity());
mRecyclerView.setLayoutManager(mLayoutManager);
databaseReference = FirebaseDatabase.getInstance().getReference();
65
.load(items.get(position).getUrl())
.into(holder.itemImage);
holder.itemCardView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getContext(), ItemInfoActivity.class);
intent.putExtra("itemUrl",items.get(position).getUrl());
intent.putExtra("itemName",items.get(position).getName());
intent.putExtra("itemPrice",items.get(position).getPrice());
intent.putExtra("itemId",items.get(position).getId());
String sizesAvailable = items.get(position).getSizesAvailable();
String[] sizes = sizesAvailable.split(",");
for(String size:sizes)
sizeList.add(size);
for(String color:colors)
colorsList.add(color);
intent.putStringArrayListExtra("sizes",sizeList);
intent.putStringArrayListExtra("colors",colorsList);
66
getContext().startActivity(intent);
}
});
}
});
mRecyclerView.setAdapter(mAdapter);
mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
super.onScrollStateChanged(recyclerView, newState);
if(!recyclerView.canScrollVertically(1)){
Item item = (Item) mAdapter.getLastItem();
String lastKeyReceived = item.getKey();
Log.e("Scrolling Reached last","Attaching new listener from
"+lastKeyReceived);
ValueEventListener nextSlotListener = new ItemValueEventListener();
databaseReference.orderByKey().startAt(lastKeyReceived).limitToFirst(slotSize).addV
alueEventListener(nextSlotListener);
valueEventListeners.add(nextSlotListener);
}
}
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
}
67
});
return rootView;
}
@Override
public void onStart() {
super.onStart();
ValueEventListener initialValueEventListener = new ItemValueEventListener();
valueEventListeners.add(initialValueEventListener);
databaseReference.orderByKey().limitToFirst(slotSize).addValueEventListener(initialV
alueEventListener);
@Override
public void onStop() {
super.onStop();
for(ValueEventListener listener:valueEventListeners)
databaseReference.removeEventListener(listener);
}
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
for(DataSnapshot itemSnapshot:dataSnapshot.getChildren()){
Item item = itemSnapshot.getValue(Item.class);
68
item.setKey(itemSnapshot.getKey());
mAdapter.onUpdateSingleItem(item);
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
}
}
package com.shopit.shopit;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;
import android.widget.Toast;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.shopit.shopit.login.LoginActivity;
/**
69
* Created by mohit on 24/9/18.
*/
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
loggedinUser = findViewById(R.id.user_loggedin);
auth = FirebaseAuth.getInstance();
authListener = new FirebaseAuth.AuthStateListener() {
@Override
public void onAuthStateChanged(FirebaseAuth firebaseAuth) {
FirebaseUser user = firebaseAuth.getCurrentUser();
Toast.makeText(MainActivity.this,"Auth State
changed",Toast.LENGTH_SHORT).show();
if (user == null) {
// user auth state is changed - user is null
// launch login activity
startActivity(new Intent(MainActivity.this, LoginActivity.class));
finish();
}
}
70
};
if (auth.getCurrentUser() != null) {
loggedinUser.setText("Hello "+ auth.getCurrentUser().getEmail());
}
}
@Override
protected void onStart() {
super.onStart();
auth.addAuthStateListener(authListener);
}
@Override
protected void onStop() {
super.onStop();
if (authListener != null) {
auth.removeAuthStateListener(authListener);
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
71
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
switch (id){
case R.id.signout:
auth.signOut();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
}
7.2 Screenshot
72
73
74
75
76
77
78
79
8. CONCLUSION
80
The project entitled Online Shopping is developed using android studio as to
computerize the process of online buying and selling of product in a showroom. This
project covers only the basic features required. However a lot of features are already
incorporated in this project. The main beneficiaries are both customers as well as
ADMIN who consume more time while dealing with products. Moreover extra
features can be identified and incorporated in the future In order to accommodate
additional features it will take longer time and effort to understand the requirement
and converting it into computerized system
9. FUTURE ENHANCEMENT
81
The system could be modified suitably to work on a large network. This
involves, among other, resolving used conflicts, protecting database integrity and
ensuring consistency of data if it is distributed across multiple locations. Maintain
attendance details of employee. Maintain product details.
10. BIBLIOGRAPHY
82
JavaScript Enlightenment,Cody Lindley-First Edition, based onJavaScript 1.5,
ECMA-262, Edition
http://www.w3schools.com/html/defualt.asp
http://www.w3schools.com/css/default.asp
http://www.w3schools.com/js/default.asp
83