Académique Documents
Professionnel Documents
Culture Documents
Login Login ViewStock Products OrderProducts ViewStock E-Shopping MaintainsReports EntersCreditCardNo. ViewFeedback GivesFeedback Logout Logout
1.
The Project deal with the various levels of system allows the customer to do shopping by simply sitting at the home. The project titled as E-Shopping is developed for a valid user id and password, and no body can enter the official section. The system E-shopping provides two logins to the administrative and to customer. In E-shopping the administrator can organize the site and all the products he had. The customer can purchase the products on online by viewing the items. Customer is provided with purchases list after the shopping, and his order number and bill is generated. Customer can send suggestions about Eshopping system to administrator. In E-shopping the administrative applications are to market the goods, to find the required goods and keep them in his website. Administrator can change product details like changing product id, cost etc., and also administrator can add new products, delete or modify existing ones. And reports are generated day to day to check out the stock status, every day purchases, every day sales, Items to be purchased and revenue for sold items. And administrator provides a suggestion box for customers to consider them for growth of organization. Add real-time credit card processing to online store with a secure, easy-tointegrate solution for accepting and processing credit card payments on online.
Page 1
2 INTRODUCTION
INTRODUCTION
The Project E-Shopping deals with the various levels of system allows the customer to do shopping by simply sitting at the home. 2.1Objective and Scope of the System: The Objectives of the proposed system are as follows: The User can sit at home and view the product on Online and purchase them. Only the Registered User can Login and view the products. If the Unregistered User wants to Login then, it warns as Invalid User. The Login User can view the products and select the desired ones. She/he can select any number of products at a time. She/he has to enter their credit card number. So that, the bill is generated to the selected products.
Page 2
Finally, the User can give Suggestions to the Administrator. And the Administrator can view the Reports. The scope of this system is limited to just selecting the product on viewing the products on Online and enter the credit card number. So that, the bill is generated automatically. But, here in this system the returning of products is not possible. If the returning of product is needed then this system will not support.
2.2Background Details: The system is developed for a valid User id and Password, and nobody can enter the official section. Also to minimize the
overhead of repeating for User id and Password each and every time the user move to next page, we are using the concept of session and cookies where a User id and Password are stored in temporary file which get deleted automatically as User logs out. Like this there is no need to enter the User id and Password on each and every page, protecting it with asking for User id and Password as a login page. The database is also controlled so that unnecessary details are not stored in the database and are deleted as they are completed. If needed for future reference we can store them in tapes, which are very cheap and reliable. The maintenance and handling cost is very low when compared to the old system of working with files. The entire system is
built taking at most care of user friendliness and security. VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 3
In order to facilitate the farmers, customers, suppliers, operators, officials for the above stated functionalities the system is to be flexible and efficient. Once a shopper purchases an item, it is calculated in the shopping cart. Settle Online Payments. Add real-time credit card processing to Online store with a secure, easy-to-integrate solution for accepting and processing credit card payments online. At the time of arrival of the commodities, Electronic-weighing scale may be used to capture the weights of commodities into the computers. The display boards will be linked to the computer to display the price details of all commodities.
Module Description: Entire functionality is divided into three modules: 1. Product Management. 2. Client Transactions. 3. Suggestions and Reports. The Product management deals with adding new products by automatically generating their ID, modify the existing stock details, delete the products from the shop. It has a facility to purchase the existing items which are below the reorder level and update the stock status. We can modify the ID of the product also. VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 4
The second module is designed for Online shopping with the e-commerce revolution even the smallest retailers have an Online store every bit as sophisticated as the ones run by large Corporations at a fraction of the cost. The buyers can register with the E-Shopping and already existing users directly login to shop. They can find required vegetables, groceries,electronic goods,crockery,. easily by category or by word. After viewing the descriptions, selecting their required brands and on confirmation they can add to their shopping cart and buy. The buyer can choose the mode of payment and can easily and securely pay for the bought products. The user can easily go through the site by just following the instructions and hyperlinks provided on the screen. Minimum knowledge of computer is sufficient to use this site.
Online Market where various goods are sold and bought. The new user registers, already existing users logs in . Finds the required goods (vegetables, groceries,crockery,). Client can give the suggestions.
The final Module deals with very flexible Reports to know status. Based on the shoppers interest he can plan the new strategies like giving discounts on the sale.In this module the client can also give the Suggestions to the Administrator.The Reports included in this module are:
i.
Stock status.
Page 5
2.3 Definition of the Problem: In the above system some of the problems arise. Those are:
Waste of time to go from Home to the Shopping Complex. Cant go through all the products in the shop. Waiting in the cash counter queue to pay the cash. And getting the bill to the paid product.
3.SYSTEM ANALYSIS
Page 6
3.1.1Existing System Ecommerce can be achieved by a variety of electronic means of communication such as p h o n e o r f a x . B u t n o w p e o p l e a re ex p l o r i n g e - c o m m e r c e b a s e d o n E D I ( e l e c t ro n i c d a t a i n t e rc h a n g e ) a n d t h e i n t e rn e t . p a r t i c u l a r l y a s i n t e r n e t t e c h n o l o g y h a s b e c o m e m o r e sophisticated, real development of ecommerce will be built on the internet technology. So there were some people who take e-commerce as IC (internet commerce).E-commerce refers t o t h e n e t w o r k a s t h e c a rr i e r , t h e u s e o f d i g i t a l e l e c t r o n i c m e a n s t o c a r r y o u t b u s i n e s s activities. With the developing of internet technology and the Web technology, various types of e-commerce sites are coming out. It is not difficult to establish e-commerce sites, but to obtain economic and social benefits. On the e-commerce web site, there may be millions of on-line transactions, generating a large number of documents and records of the registration form every day. Ecommerce companies are faced with a wealth of data, lack of knowledge of embarrassment. Problems in existing system: The time complexity is very large. There are no guidelines for user to buy appropriate things. The schemes are cost effective. 3.1.2 Proposed System E-commerce has changed people's consumption style, there have been a variety of online s t o r e s a n d We b s i t e s d e v o t e d t o b u s i n e s s , c o n s u m e r s c a n a l s o b u y d e s i r a b l e c o m m o d i t y i n homes, but a growing number of similar sites, and also to choose more and more, the face of online shopping, people often will fall into the plight of choice, especially choice of gifts, it is m o r e d i ff i c u l t t o
Page 7
s e l e c t o n e s a t i s f a c t i o n a n d n e w e r. I n r e a l l i f e , w h e n I d o n o t k n o w h o w t o choose, friends or other people as a guide, advise, but not on the Internet. Are there any web site can provide a service as user's guide this election? Smart guide realization of the program: the gift network establish a specialized section help you to choose gift, set up a number of multi-issue election, according to prompt the user answer, such as human sex, love, what kind of gifts they had received, and so on, these data will be connected to the database, using data mining to analyze the data, be able to find what kind of gifts send more appropriately, and then return a result to the user, help users make a decision. To achieve this function is to establish a model: study relationship between all information and gifts user chosen
Page 8
The User can view all the stock details and can view all the products available in the E-Shopping, he can select the desired products from them. After selecting the products he has to enter his credit card number for the bill. The User can also give his suggestions to the Administrator. The Administrator can see the reports like non-sold items, goods sold, daily sales 3.2.2 Non-Functional Requirements: Non-Functional Requirements describe the user aspects of he system that are not directly related with the functional behavior of the system. The proposed system has to accommodate the following Non-Functional Requirements: Documentation: Everything that is done for designing the system is documented in an understandable manner. Hardware Consideration: Hardware should be available for requirements and it should be compatible with the appropriate requirements. Performance Characteristics: The requests should be processed within no time. And the User should be Authenticated for accessing the requested date. Error Handling: VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 9
The system should be error free i.e., the system should display a meaningful error message to the User and to the Administrator to correct their errors. The High-level components in proposed system should handle exceptions that occur while connecting to database server, IO Exceptions. System Modifications: The system should be flexible so that only the authorized persons can do any further modifications. Security Issues: Security and confidentiality are the top most concerns of the User. The proposed system should provide the User with Id and Password for controlled access. And access to database should be restricted to the Administrator only. Quality Issues: Quality issues refer to how reliable, available and robust should the system be. While developing the proposed system the Administrator must be able to guarantee the reliability transactions so that they will proceed completely and accurately. The ability of the system to detect failures and recovery from those failures refers to the availability of the system. Robustness of system refers to the capability of system providing information when concurrent Users requesting for information.
Page 10
3.2.3System models: Identifying Actors: The Actors involved in the E-Shopping system are Administrator and the User (Client) .They are shown below:
E-Shopping
Administrator 3.2.4 Identifying Scenarios: Product Addition, Deletion, Modification Scenario Scenario name Participating Actors
User
Reports Maintenance Scenario Scenario name Participating Actor Maintenance of Reports Administrator
Page 11
Flow of Events
Administrator maintains all the reports. He maintains the stock status report. Daily purchases report is also maintained by the Administrator. Purchases between two particular dates, number of non-sold items, and so on reports are maintained by the Administrator.
Feedback Scenario Scenario name Participating Actors Flow of events Feedback Administrator, Customer After purchasing the desired products, the Customer gives the feedback about the services of E-Shopping. Customer can give any number of feedbacks. Administrator, views all the feedbacks given by the Customers. By watching all the feedbacks, the
3.2.5 Use case Model: Identifying Use cases: VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 12
Administrator, Customer Login Use case Use case name Participating Actors Entry Condition Administrator, Customer Login Administrator, Customer Administrator and Customer enter into the Login page. Flow of events Administrator selects the Login option. Then, he enters the Login Id and password and he will checks, adds, deletes, modifies .the products. Customer also selects the Login page and enters the Login Id, password to enter into E-Shopping. The Customer sees all the Products and selects the desired once and buys them. Exit Condition If the Customer Login Id, password is invalid then, he/she cannot enter into the E-Shopping.
Product Addition, Deletion, Modification Use case Use case name Participating Actor Product addition, deletion, modification Administrator Page 13
Administrator clicks on the Product addition, deletion, modification option from menu. Firstly, Administrator checks all the products. If there is shortage of products then, he adds products. If he doesnt want some of the Products then, he deletes those Products. If he wants to change the selected items then, he modifies the Products from the list.
Exit Condition
Reports Maintenance Use case Use case name Participating Actors Entry Condition Flow of events Reports Maintenance Administrator Administrator clicks on the Reports option from the menu to maintain. Administrator maintains all the reports. He maintains the stock status report. Daily purchases report is also maintained by the Administrator. Purchases between two particular dates, number of non-sold items, and so on reports are maintained by the Administrator. Exit Condition After the Reports, he goes to the next option.
View Stock Use case Use case name View Stock Page 14
Administrator, Customer Administrator, Customer clicks on the view stock option from the menu. Administrator, views the stock. If there is any shortage then, he adds the Products. If there are any unnecessary Products then. He deletes or modifies those Products. Customer views all the available stock and selects the desired Products.
Exit Condition
Products Ordering Use case Use case name Participating Actors Entry Condition Flow of events Products Ordering Customer Customer clicks on the view stock option from the menu to order. Customer views all the Products and selects the desired Products. After selecting the products, he orders for those Products. The Customer has to enter his credit card number to purchase the Products. Exit Condition After ordering the Products, he goes to the next option.
Administrator, Customer Administrator clicks on the Feedback option to view the Feedback. Customer clicks on the Feedback option to give the Feedback.
Flow of events
After purchasing the desired products, the Customer gives the feedback about the services of E-Shopping. Customer can give any number of feedbacks. Administrator, views all the feedbacks given by the Customers. By watching all the feedbacks, the
Administrator clears all the problems. Exit Condition After giving and viewing of the Feedback, both the Administrator and the Customer Logouts.
Page 16
The aim of this module is to enable the administrator to view the stock details available of a concern product. Product Details: Administrator can view the various customers and there concern bill details i.e. the amount of money that he has to pay. Here the administrator can also view the products he/she had bought. Feed Back: Through this module the administrator can view the feedback given by the customer about the customer he had ordered i.e. say description like quality not good, or product got damaged or he/she had satisfied. Add Category: The various products that are available to the customers depending upon there characteristics are placed under certain categorized i.e. leather goods, clothes, electronics good etc. Add Product:
Page 17
Through this module the administrator can add make availability of new product to the customers i.e. by adding new products trough this module. Add Company: That is here company will be registered.
Delivery Details:
Here the administrator after making confirmation about the payment of the bill, he sends the goods for delivery. Customer Module: Ordering Products: Here the products are ordered, the sub modules in this module are:
a) Customer Registration. b) Credit Details.
Feed Back: After the successful Login the Customer can report to the Administrator about the product quality, etc.
be reliable; fault tolerant to loss of connectivity of server as well as it should be secure and can be modified later by any software developers.
Performance criteria:
The proposed system E-Shopping should have fast response while customers are requesting for products, administrators should be able to handle the requests, generate bills, check for bank accounts in an efficient manner and provide the response as quickly as possible. There should be no loss of information given by the customer regarding their products list. Dependency criteria: The proposed system must handle both low level and high-level exceptions with appropriate alert messages. Cost criteria: It includes development cost, deployment cost, maintenance cost and administration cost. As the proposed system will be developed using software, which is free ware, hence it can be developed with minimum costs. As the proposed system is online shopping, deployment of it requires certain amount. Maintenance costs required performing enhancements to the system. Administration costs are required to administrate the system. Maintenance criteria: The proposed system is extensible i.e., new classes can be added to the system and also it is easily modifiable and portable i.e. it is possible to adapt software developed for this system to different platforms.
Page 19
End User criteria: The proposed system supports the work of all the customers throughout the world. Hence it should be kept into the consideration that every customer can easily interact with the system.
Expandability, measures the computer systems ability to conveniently accommodate increased requirements by higher speed or by physical expansion, without the cost of a major design. VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 20
Programmability, or the case of programming the computer, should be considered early in the design. Past Experience has shown that a balance between programming simplicity and hardware complexity is essential to prevent the costs of programming from becoming overwhelming. Maintainability, should not be neglected when designing the computer. Repair should be readily accomplished during ground operation, and if in flight maintenance is desired, this should be specified as a design requirement. In flight repair or reconfiguration is closely associated with reliability and, such, the extent of reconfiguration made possible will be dependent upon the reliability required. Compatibility, should be developed between the computer and its interfaces, software, power levels, and, where necessary, ground
computers, standard interfaces and power levels should be implemented. Adaptability, is defined as the ability of the system to meet a wide range of functional requirements without requiring physical modification. Adaptability is needed when requirements are not well defined or if it is anticipated that the computer will be applied to a variety of missions and/or a number of space vehicles. Although this is similar to the need for growth discussed under expandability. In this case potential requirements should be anticipated by providing reverses in memory capacity, computational speed, word length, and I/O capability. Development status and Cost is complex management-related factors, which can have significant effects on the design. They require the VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 21
estimation of a number of items such as extend of off-the-shelf hardware use, design risks in developing new equipment using advanced
technologies, potential progress in the state of the art during the design and development of the computer etc.
5.2HARDWARE REQUIREMENTS
Processor Ram : 1.0 GHz : 256MB Page 22
Hard Disk
: 30GB
Object Oriented Programming (OOP) is way to write software that is reusable, extensible and maintainable. Java is an Object Oriented language; i.e., it has facilities for OOP incorporated into the language. The main features of Java are as follows:
Encapsulation. Inheritance. Polymorphism. Secure. Portability. Distributed. Robust.
Introduction to JDBC: Database constitutes the primary data resource in enterprise application. The JDBC API provides cross-vendor connectivity and data access across relational database from different vendors. A database vendor such as oracle, Oracle is the most widely used database in the world. It runs on virtually every kind of computer, from PCs and Macintoshes, to minicomputers and Giant mainframes. It functions virtually identical on all
these machines, so when you learn it on one, you can use it on any other. Connectivity: VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 24
The connectivity between the database and the front-end has been established using JDBC (Java Data Base Connectivity). JDBC is a powerful database implementation tool in Java. It is providing an easiest way to connect any DBMS and RDBMS software and allows implementing database operations. Java is using SQL for database operations. To connect a backend database with Java we must use Drivers. The driver indicates that we are connecting specific backend database. The JDBC-ODBC Bridge Driver has been used in this project. What does JDBC do? JDBC makes it possible to do three things:
Establish a connection with a database. Send SQL statements. Process the results.
Microsofts OBDC (Open Database Connectivity) is the most popularly used programming Interface for accessing relational database. It offers the ability to connect to almost all databases on almost all platforms.
Java Server Pages (JSP): Java Server Pages technology is the Java technology in the J2EE platform for building applications containing dynamic Web content such as HTML, DHTML, XHTML and XML. The Java Server Pages technology enables the authoring of Web pages that create dynamic content easily but with maximum power and flexibility VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 25
The Java Server Pages technology provides a textual description for the creation of a response from a request.
Benefits of the Java Server Pages: The Java Server Pages technology offers a number of benefits:
Page 26
Write Once, Run anywhere properties. High quality tool support. Reuse of components and tag libraries. Separation of Business logic From Presentation logic will be easy with JSP technology. Support for scripting and actions.
Java Bean: A JAVA BEAN is a software component that has been designed to be reusable in a variety of different environments. There is no restriction on the capability of a Bean. A Bean may be either visible or invisible to the end user. A Bean may be designed to work autonomously on a users workstation or to work in cooperation with a set of other distributed components. Advantages: 1. Write once, run anywhere. 2. The properties, events, methods of a bean that are exposed to another application such as a builder tool can be controlled. 3. The configuration settings of a bean can be saved in persistent storage and restored at a later time. 4. A Bean may register to receive events from other objects and can generate events that are sent to other objects.
Page 27
Performance: Speed of Oracle 8i database is quite well managed. Even with large database oracle 8i refers to more than 100GB databases and the performance is only raw. But, includes consideration of performance with locking and transaction control. Multiple Database Support: Oracle 8i has superior ability to manage multiple databases within the same transaction using a two-phase commit protocol. You can easily move were the data is actually stored from node-to-node in a network and have a data mirror, making it easy to optimize the location of the data from time to time. Compatibility: Oracle 8i software is compatible with industry standard and industry standard operating systems. The applications developed can be used on any systems with little or no modification. Connectability: Oracle 8i software allows different computers and operating systems to share information across networks
Page 29
Security: Oracle 8i provides powerful security features to limit and monitor data access. These features make it easy to manage even the most complex design of data access.
Products of Oracle 8i: The following are some of the products of Oracle:
SQL * PLUS
SQL * DBA SQL * FORMS
Page 30
7.UML DIAGRAMS
7.1 Use case Diagram:
UML provides the use case diagram to facilitate the process of requirements gathering. The use case diagram models the interactions between the systems external clients and the use cases of the system. Each use case represents a different capability that the system provides the client. Stick figure represents an actor. Actors are external entities such as people, robots, and other systems etc. that use the system. The actors name appears underneath the stick figure.
Page 31
L o g in
A ddProduct s
include
M o d if y De le t e Cu s t o m e r
include A d m in is t r a t o r M a in t a in s R e p o r t s
V ie w S t o c k
Or d e r P r o d u c t s
Fe e d b a c k
Logout
diagrams present a snapshot of the structure while the system is running this provides information about which objects are participating in the system at a specific point in time.Class diagram for Administrator:
Administrator
Product +p_code : varchar2(5) +p_name : varchar2(15) +p_price : num ber(10) +min_stock : number(5) +present_stock : num ber(5) +add ( ) +modify ( ) +delete ( )
Feedback +name : varchar2(15) +phone : number(10) +emailid : varchar2(15) +address : varchar2(20) +advice : varchar2(300) +submit ( )
+add ( )
Page 33
Cust omer
Order Product s + pcode : varchar2(5) + name : varchar2(10) + pqty : number(5) + price : number(12) + total : number(12) + id : varchar2(30) + usr : varchar2(20) + odate : date + submit ( ) + cancel ( ) + new ( )
Fee dback + name : varchar2(15) + phone : number(10) + emailid : varchar2(15) + address : varchar2(20) + advice : varchar2(300) + submit ( )
+ select ( )
Page 34
messages exchanges among set of objects. The sequence diagram consists of objects represented in the usual way as named rectangles with underlined, messages represented as solid-line arrows and time represented as a vertical progression.
1 : \AdministratorLogins\
2 : \Add,modify,deletes Products\
3 : \ChecksStock\
4 : \MaintainsReports\
5 : \ViewsFeedback\
6 : \Logout\
Page 35
1 : \user logins\
5 : \gives advices \
6 : \finally logouts\
diagrams helps during system design to describe domain objects with VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 36
interesting
for each object it is enough to show the state transition for those objects that shows complex behavior.
Lg o in
Po u t r d cs
Ad d
Md y o if
Dlee e t
V w t c Dt ils ie So k ea
Mina s e ot a t in R p r s
V we d a k ie F e b c
Lgu oot
Page 37
Login
ViewStock
OrderProducts
EntersCreditCardNo.
GivesFeedback
Logout
7.5 Activity Diagrams: An activity diagram describes a system in terms of activities. Activities are states that represent the execution of set of operations. These can be used to represent control flow i.e., the order in which VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 38
operations occur and dataflow. This is useful for showing what happens in a business process or an operation.
7.6 Data Dictionary: Employee Details Table: Field Name Eno Ename Fname Dob Data Type Number Varchar2 Varchar2 Date Constraints Primary key
Page 39
Product Details Table: Field Name P_code P_name P_price Min_stock Present_stock
Constraints
Constraints
Purchase Details Table: Field Name P_code P_name P_qty P_price Pursc_date User Details Table: Field Name Name
Constraints
Constraints
Page 40
Uname Pwd Gender Phone Address Pin Suggestions Table: Field Name Name Phone Emailid Address Advice Orders Table: Field Name Pcode Name Pqty Price Total Id Usr Odate
Constraints
Data Type Varchar2 Varchar2 Number Number Number Varchar2 Varchar2 Date
Constraints
Constraints
8.CODING
VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 41
DbCon.java package dbean; import java.sql.*; public class DBCon { static Connection con; public DBCon() { try { System.out.println ("Loading Driver ... "); Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); System.out.println ("Getting Connection... "); con = DriverManager.getConnection ("jdbc:odbc:eshop","eshop","eshop"); System.out.println ("OKKKKK"); System.out.println ("connection:"+con); } catch (Exception e) {System.out.println ("exc:"+e); } } public static Connection getCon() { return con; } }
Page 42
Add_prod_jsp.jsp <HTML> <body bgcolor> <%@ page import="java.sql.*" %> <jsp:useBean id="dcon" scope="session" class="dbean.DBCon" /> <% Connection con; con = dcon.getCon(); Statement st=con.createStatement(); String str=null; String pcode=request.getParameter ("T1"); String pname=request.getParameter("T2"); float price=Float.parseFloat(request.getParameter("T3")); int pmin=Integer.parseInt(request.getParameter("T4")); int present=Integer.parseInt(request.getParameter("T5")); ResultSet rs=st.executeQuery("select p_code from prod_det where p_code ='"+pcode+"'"); if(!rs.next()) { str="insert into prod_det values('"+pcode+"','"+pname+"',"+price+","+pmin+","+present+")"; System.out.println("-------"+str); int i=st.executeUpdate(str); if(i==1) { out.println("<br><br><br><br><br><center><h1><FONT face='comic sans ms' SIZE='+1' COLOR='#006600'>"+i+" Record successfully Added<h1></font><center>"); } else VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 43
{ out.println("<center><h1><FONT face='comic sans ms' SIZE='+1' COLOR='#006600'>Not Added<h1><center></font>"); } out.println("<center><a href='Add_prod.jsp'><font face='comic sans ms' size='4' COLOR='#99CC00'>Add New</font</a></center>"); out.println("<center><a href='Adminservices.html'> <pre><font face='comic sans ms' size='3' COLOR='#99CC00'>Back To Administrative Services</font></pre></a></center>"); } else { out.println("<center><br><br><br><font face='comic sans ms' size='4' COLOR='#006600'>Duplicate Records</font><center><pre><font face='verdana' size='3'><a href='Add_prod.jsp'>Back</a></font></pre>"); } %> </body> </html> Clientpurchases.jsp <HTML> <Head><FONT face="comic sans ms" size=3 COLOR=#006600><center><hr color=#99CC00>Purchase Items<hr color=#99CC00></CENTER></font></head> <script language="javascript"> var isIE = document.all?true:false; function check() { a=frm.T1.value.length; if(a<=0) { VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 44
alert("quantity not mentioned"); return false; } else { return true; } } function Ints() { var _ret=true; if (isIE) { if (window.event.keyCode < 46 || window.event.keyCode > 57) { window.event.keyCode = 0; var_ret = false; } } } </script> <BODY BGCOLOR> <%@ page import="java.sql.*" %> <jsp:useBean id="dcon" scope="session" class="dbean.DBCon" /> <% Connection con; con=dcon.getCon(); String user=request.getParameter("usr"); System.out.println("cpurchase1"+user); Statement st=con.createStatement(); Statement st1=con.createStatement(); VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 45
ResultSet rs=st.executeQuery("select p_code,p_name from prod_det order by p_code"); %> <br><br><br> <form method="post" action="clientpurchases_jsp.jsp" name="frm" onsubmit="return check()"> <FONT face="comic sans ms" size=2 COLOR=#006600>Product Code & Name:</font><select name="list" style='width:150'><br><br><br> <% while(rs.next()) { %> <option value=<%=rs.getString(1)%>>< %=rs.getString(1).toUpperCase()%> --- <%=rs.getString(2).toUpperCase() %></option> <% }st.close(); st1.close(); rs.close(); %> </select> <br><br> <FONT face="comic sans ms" size=2 COLOR=#006600>Number Of Units:</font> <input type=text name="T1" onkeypress="Ints()"> <input type=hidden name="T2" value=<%= user %>> <br><input type="submit" value="Purchase"> </form> </BODY> </HTML> Saveadvice_jsp.jsp VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 46
<HTML> <body bgcolor> <%@ page import="java.sql.*" %> <jsp:useBean id="dcon" scope="session" class="dbean.DBCon" /> <% Connection con; con = dcon.getCon(); Statement st=con.createStatement(); String name=request.getParameter("T1"); String phone=request.getParameter("T2"); String id=request.getParameter("id"); String address=request.getParameter("T3"); String advice=request.getParameter("S1"); String str = "insert into suggest values('"+name+"','"+phone+"','"+id+"','"+address+"','"+advice+"')"; System.out.println("in service......."+str); int i=st.executeUpdate(str); if(i==1) { out.println("<br><br><br><br><br><center><h1><FONT face='comic sans ms' SIZE='+1' COLOR='#006600'>Thanks For Your Suggestions<h1></font><center>"); } else { out.println("<center><h1><FONT face='comic sans ms' SIZE='+1' COLOR='#006600'>Not Accepted<h1><center></font>"); } out.println("<center><a href='suggestions.html'><font face='comic sans ms' size='4' COLOR='#99CC00'>More Suggestions</font</a></center>"); VATHSALYA INSTITUTE OF SCIENCE AND TECHNOLGY Page 47
out.println("<center><a href='main.html' target=_top> <pre><font face='comic sans ms' size='3' COLOR='#99CC00'>Home</font></pre></a></center>"); %> </body> </html>
9.TESTING
9.1 Testing:
Testing is the process of detecting errors.Testing performs a very critical role for quality assurance and for ensuring the reliability of software.The results of testing are used later on during maintainence also Psychology of Testing The aim of testing is often to demonstrate that a program works by showing that it has no errors.The basic purpose of testing phase is to detect the errors that may be present in the program.Hence one should not start testing with the intent of showing that a program works,but the intent should be to show that a program doesnt work. Testing is the process of executing a program with the intent of finding errors. . Testing Objectives:
The main objective of testing is to uncover a host of errors, systematically and with minimum effort and time. Stating formally, we can say,
Page 48
A successful test is one that uncovers an as yet undiscovered error. A good test case is one that has a high probability of finding error, if it exists.
The tests are inadequate to detect possibly present errors. The software more or less confirms to the quality and reliable standards.
LEVELS OF TESTING In order to recover the errors present in different phases we have the concept of levels of testing. The basic levels of testing are
Client Needs
Acceptance Testing
Requirements
System Testing
Design
Integration Testing
Code
Unit Testing
Page 49
to uncover errors within the boundary of the module. All modules must be successful in the unit test before the start of the integration testing begins. In this project each service can be thought of a module.There are so many modules like Login,HWAdmin, MasterAdmin, NormalUser, PManager. Each module has been tested by giving different sets of inputs.when developing the module as well as finishing the development so that each module works without any error.The inputs are validated when accepting from the user.
Page 50
Here entire CRMS has been tested against requirements of project and it is checked whether all requirements of project have been satisfied or not.
Test cases should be selected so that the largest number of attributes of an equivalence class is exercised at once.The testing phase is an important part of software development. It is the process of finding errors and missing operations and also a complete verification to determine whether the objectives are met and the user requirements are satisfied.
Page 51
Page 52
Page 53
Page 54
Adding a Product
Purchases List
Page 55
Administrator Purchases
Product Modification
Page 56
Product Deletion
Page 57
Page 58
Services to Client
Page 59
Page 60
Page 61
Page 62
Page 63
Page 64
11.CONCLUSION
The database is also controlled so that unnecessary are not stored in the database and are deleted as they are completed. If needed for future reference we can store them in tapes, which are very cheap and reliable. The maintenance and handling cost is very low when compared to the old system of working with files. The entire system is built taking at most care of user friendliness and security. In order to facilitate the customers, suppliers, operators, officials for the above stated functionalities the system is to be flexible and efficient.
Page 65
12. BIBLIOGRAPHY
1. Java Complete Reference By Herbert Scheldt, Patrick Naughton 2. Professional Java Server Programming By A Press 3. Software Engineering By Pressman RS 4. Software Engineering Concepts By R. Fairly 5. System Analysis and Design By James A.Senn 6. HTML Black Book By Steven Holster
Page 66