srs of e-commerce (online book shopping)
TRANSCRIPT
Software Requirements Specifications Document
1) Introduction:
1.1) Purpose:
This project is aimed at developing online book shopping that is of
significant to those people who use internet .It is an application that
can be access by all the people and can save their time instead of
doing traditional shopping .Online –shopping is the process
consumers go through to purchase products or services over the
Internet . An online- shop , e-shop , e-store , internet shop, web shop ,
web store, online store, or virtual store evokes the physical analogy
of buying products or services .Consumers find a product of interest
by visiting the website or do a search across many different vendors
using a shopping search engine.
There are many features like :
1) Add item to cart
2) Delete item from cart
3) Total amount display
4) Bill printing
5) payment through credit card or cash payment on delivery options.
1.2) Technologies:
Operating system: Windows (any)
Database: SQL Server
Page 1
Software Requirements Specifications Document
Frame Work: JAVA 2 Enterprise Edition
1.3) Feasibility study:
In order to make sure that the project is feasible, following feasibility studies have been
conducted: -
Economic & financial Feasibility study
Economic feasibility study is a measurement of cost effectiveness of the project.
This project is going to be developed at sufficient Cost so that it will be
acceptable by all the client that need such type of application.
Technical Feasibility Study
It is possible to develop the system using platforms of i.e. Java 2 Enterprise
Edition as front-end and Microsoft SQL Server 2005 as back-end. All the
functions of a traditional online book shopping can be implemented in the new
system. Hence the system is technically feasible.
Operational Feasibility Study
This system is completely operational and can be
successfully implemented in any plate-form .
Legal Feasibility Study
Page 2
Software Requirements Specifications Document
Since this project needs no copyrighting, patenting, and doesn’t intent to
have any relation with anybody else’s intellectual property rights, it can be
considered as a legally feasible project.
1.4) Proposed Solution :
Due to the inconvenience in managing the book manually .It is
required to have a computer based system where an person can
login & can purchase book as per his requirement . Firstly User
have to signup so that he can register himself and can his user
account so that he can login from his password and username . He
can see all the items that he has purchased and can delete from cart
if he wants. User can well check the total Bill that he has to pay and
can get printed copy of that.
2) Specific Requirements:
2.1) Functionality
There are number of functions that the application is supposed to perform which are as
follows: -
Firstly user have to login for that he/she have to
Register him/her self , So for that there will be a
Page 3
Software Requirements Specifications Document
Sign Up page where user have to fill the entries like
Username and Password .
There will be login page / Sign-in page where user have to login with their
username and password.
There will be Book searching option on any category (e.g. - title of the book,
author, edition, price, etc).
After that there will be a book section page will be open where user can
choose book according to their choice.
Maintaining records for books (e.g. books details, title of the book, author,
edition, price etc)
All the books that user have chosen will add-up to the Cart and if user want
to delete any option than he/she can delete it by just clicking on the delete
button.
To see the total bill of the book items that user have selected for that he/she
have to click on the bill option then total bill of the item selected will be
displayed to the user.
To purchase the books there will be two option given to the user through on
Cash payment or through Debit account.
In last user can log-out, just by clicking on the logout button.
3) Overall Description:
3.1) Software Interface:
Client on Internet: Operating System (any)
Data Base Server: Database, Operating System (any)
Page 4
Software Requirements Specifications Document
Software used : Net Beans , Micromedia Dream Viewer .
3.2) Hardware Interface:
Client Side/Server side
Minimum requirement
Processor - Pentium IV at 900 MHz
RAM -1 GB
Disk Space- 10 GB
Internet Explorer 8.0
Page 5
Software Requirements Specifications Document
3.3) CONTROL FLOW DIAGRAM:
Page 6
Software Requirements Specifications Document
DataBase Content:
Page 7
Software Requirements Specifications Document
ER-DIAGRAM
Page 8
Software Requirements Specifications Document
Page 9
Software Requirements Specifications Document
SNAPSHOTS
Page 10
Software Requirements Specifications Document
Page 11
Software Requirements Specifications Document
Page 12
Software Requirements Specifications Document
Page 13
Software Requirements Specifications Document
Page 14
Software Requirements Specifications Document
Page 15
Software Requirements Specifications Document
Page 16
Software Requirements Specifications Document
Page 17
Software Requirements Specifications Document
Page 18
Software Requirements Specifications Document
CODING
/* * Login.java * * Created on July 13, 2009, 10:09 AM */
package pack;
import java.io.*;import java.net.*;
import javax.servlet.*;import javax.servlet.http.*;import utility.ConnectionService;import java.sql.*;
/** * * @author Eshan Gupta * @version */public class Login extends HttpServlet { /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods. * @param request servlet request * @param response servlet response */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //response.setContentType("text/html;charset=UTF-8"); String pass1=request.getParameter("pass"); String user1=request.getParameter("user"); PrintWriter out = response.getWriter(); HttpSession s1=request.getSession(); s1.setAttribute("user",user1);
Page 19
Software Requirements Specifications Document
ResultSet ss=ConnectionService.select("select * from signup where password='" + pass1 + "' and username='"+ user1 + "'"); try { if(ss.next()) { response.sendRedirect("Option"); } else { // response.sendRedirect("Invalid"); out.print("<h1>INVALID USER</h1>"); RequestDispatcher rs=request.getRequestDispatcher("Home.html"); rs.include(request,response); } } catch (SQLException ex) { ex.printStackTrace(); }//try out.close(); } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** Handles the HTTP <code>GET</code> method. * @param request servlet request * @param response servlet response */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** Handles the HTTP <code>POST</code> method. * @param request servlet request * @param response servlet response */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** Returns a short description of the servlet. */ public String getServletInfo() { return "Short description"; } // </editor-fold>}
Page 20
Software Requirements Specifications Document
/* * Magazine.java * * Created on July 13, 2009, 11:35 AM */
package pack;
import java.io.*;import java.net.*;
import javax.servlet.*;import javax.servlet.http.*;import utility.ConnectionService;import java.sql.*;
/** * * @author Eshan Gupta * @version */public class Magazine extends HttpServlet { /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods. * @param request servlet request * @param response servlet response */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter();
HttpSession s1=request.getSession(false); if(s1!=null) { out.print("<body background=aa.jpg></body>"); out.print("<font color=white>"); // out.print("<h3>HELLO!"+s1.getAttribute("user")+"<br></h3>"); out.print("<center><h1>WELCOME TO ONLINE BOOK SHOPPING </h1><br>"); out.print("</font>"); out.print("<center><h1><font color=yellow>WELCOME</font></h1></center><br>"); out.print("<center><h1><marquee direction=up><font color=pink>Magazine Books World</font></marquee></h1></center><br>"); out.print("<center><h1><a href=SignOut><font color=red>SignOUT</font></a></h1></center><br>"); try
Page 21
Software Requirements Specifications Document
{ String query="select * from book where type='magazine'"; ResultSet rs = ConnectionService.select(query); out.print("<form action=Cart >"); out.print("<table border=2 bgcolor=pink>"); out.print("<tr><th>Book_id</th><th>Type<th>Book_name</th><th>Author</th><th>Publication</th><th>Price</th><th>Choice</th></tr>"); while(rs.next()) { String p1=rs.getString(1); String p2=rs.getString(2); String p3=rs.getString(3); String p4=rs.getString(4); String p5=rs.getString(5); String p6=rs.getString(6); //out.print("<tr><td><input type=checkbox name=select value="+ +"></td><td>"+rs.getString(4)+"</td></tr>"); ///String r=rs.getString(3); out.print("<tr><th>"+p1+"</th><th>"+p2+"</th><th>"+p3+"</th><th>"+p4+"</th><th>"+p5+"</th><th>"+p6+"</th><th><input type=checkbox name=select value="+p3+"></th></tr>"); //out.print("<tr><td>"+rs.getString(1)+"</td><td>"+rs.getString("type")+"</td><td>"+r+"</td><td></td><td>jlkjl</td><td>vjhvgjh</td><td><input type=checkbox name=select value="+r+"></td></tr>"); } out.print("</table>"); out.print("<input type=submit value='ADD TO ITEM'>"); out.print("</form>"); }catch(Exception e){} } else { out.print("<h1><font color=red>Please Login to get this page</font></h1>"); } out.close(); } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** Handles the HTTP <code>GET</code> method. * @param request servlet request * @param response servlet response
Page 22
Software Requirements Specifications Document
*/ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** Handles the HTTP <code>POST</code> method. * @param request servlet request * @param response servlet response */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** Returns a short description of the servlet. */ public String getServletInfo() { return "Short description"; } // </editor-fold>}
/* * Option.java * * Created on July 13, 2009, 10:17 AM */
package pack;
import java.io.*;import java.net.*;
import javax.servlet.*;import javax.servlet.http.*;import javax.xml.ws.Response;
/** * * @author Eshan Gupta * @version */public class Option extends HttpServlet { /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods. * @param request servlet request * @param response servlet response
Page 23
Software Requirements Specifications Document
*/ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); HttpSession s1=request.getSession(false); if(s1!=null) { out.print("<body background=aa.jpg></body>"); out.print("<font color=white>"); out.print("<h3>HELLO!"+s1.getAttribute("user")+"<br></h3>"); out.print("<center><h1>WELCOME TO ONLINE BOOK SHOPPING </h1><br>"); out.print("</font>"); out.print("<h2><i><a href=Computer><font color=yellow>Computer Books</font></a></i></h2><br>"); out.print("<h2><i><a href=Magazine><font color=yellow>Magazine Books</font></a></i></h2><br>"); out.print("<h2><i><a href=engineering1><font color=yellow>Engineering Books</font></a></i></h2></center><br>"); } else { out.print("<h1><font color=red>Please Login to get this page</font></h1>"); } out.close(); } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** Handles the HTTP <code>GET</code> method. * @param request servlet request * @param response servlet response */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** Handles the HTTP <code>POST</code> method. * @param request servlet request * @param response servlet response */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
Page 24
Software Requirements Specifications Document
/** Returns a short description of the servlet. */ public String getServletInfo() { return "Short description"; } // </editor-fold>}
/* * Remove.java * * Created on July 13, 2009, 11:11 PM */
package pack;
import java.io.*;import java.net.*;
import javax.servlet.*;import javax.servlet.http.*;import java.sql.*;import utility.ConnectionService;import java.util.*;
/** * * @author Eshan Gupta * @version */public class Remove extends HttpServlet { /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods. * @param request servlet request * @param response servlet response */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); HttpSession s1=request.getSession(false); if(s1!=null) { out.print("<body background=5.jpg></body>"); out.print("HELLO!"+s1.getAttribute("user")+"<br>");
Page 25
Software Requirements Specifications Document
out.print("<h3>" +s1.getAttribute("op1")+ "</h3>"); out.print("<center><form action=Cart method=post >"); out.print("<table border=2 bgcolor=pink>");
out.print("<tr><th>Book_id</th><th>Type<th>Book_name</th><th>Author</th><th>Publication</th><th>Price</th><th>Choice</th></tr>"); for(Object ob:(ArrayList)s1.getAttribute("op1")) { String query1="select * from book where book_name='" +ob+ " ' "; ResultSet rs=ConnectionService.select(query1); try {
while(rs.next()) { String p1=rs.getString(1); String p2=rs.getString(2); String p3=rs.getString(3); String p4=rs.getString(4); String p5=rs.getString(5); String p6=rs.getString(6); //out.print("<tr><td><input type=checkbox name=select value="+ +"></td><td>"+rs.getString(4)+"</td></tr>"); ///String r=rs.getString(3); out.print("<tr><th>"+p1+"</th><th>"+p2+"</th><th>"+p3+"</th><th>"+p4+"</th><th>"+p5+"</th><th>"+p6+"</th><th><input type=checkbox name=delete value="+p3+"></th></tr>"); }//while }catch (SQLException ex) { ex.printStackTrace(); }//for }
out.print("</table>"); out.print("<input type=submit value='DELETE ITEM'>");
Page 26
Software Requirements Specifications Document
out.print("</form></center>"); out.print("<font color=blue><center><h1><a href=credit.html>Generate Bill</a></h1></center></font><br>"); } else { out.print("<font color=red size=6>Please Login to get Page</font>"); } out.close(); } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** Handles the HTTP <code>GET</code> method. * @param request servlet request * @param response servlet response */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** Handles the HTTP <code>POST</code> method. * @param request servlet request * @param response servlet response */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** Returns a short description of the servlet. */ public String getServletInfo() { return "Short description"; } // </editor-fold>}
Page 27