PharmaDocument Uml Over 110709
PharmaDocument Uml Over 110709
PharmaDocument Uml Over 110709
BY
1.1.1 A. MONIKA
Regd no: 04K21A0503
B. L. SADODITHA
Regd no: 04K21A0522
Ms. Srujana
1
ALPHA COLLEGE OF ENGINEERING & TECHNOLOGY
(AFFILIATED TO JNTU)
Peddhakadhakuru, Allagadda - 524320
CERTIFICATE
in partial fulfillment of the requirements for the award of the bachelor of engineering
in Computer Science & Engineering.
Srujana
2
ACKNOWLEDGEMENTS
It gives me immense pleasure to thank the people behind the successful completion
of this project.
I am greatly indebted to my external guide xxxxxxx, for all that he provided me, a
wonderful opportunity to do this work in this division and for his special care and
timely advice that always energized me to do a better work.
I wish and thank and honor my internal guide Ms. Srujana, Department of CSIT,
ALPHA College of Engineering, & Technology, JNTU who continuously
encouraged me throughout this project and gave me timely advice for improvement
and for his wholehearted support in completing this project.
I also express my sincere gratitude to our Principal, Mr. V. N. Raju for providing the
opportunity to get the industrial exposure with the initiative of such a brilliant
course.
I thank all my friends who have helped me in many ways directly or indirectly for
this project. I thank all my classmates who studied with me in ALPHA College of
Engineering, & Technology and helped me in many ways to make this project a
great success.
Last but not the least I want to thank my parents without whom I could not have
been what I am today.
B. L. SADODITHA,
04K21A0522
A. MONIKA, 04K21A0503
3
Table of Content
INTRODUCTION...............................................................................................................7
1. REQUIREMENTS.......................................................................................................9
1.1. SYSTEM SCOPE.....................................................................................................9
1.2. FUNCTIONAL REQUIREMENTS..........................................................................9
1.2.1. APPLICATION OVERVIEW.............................................................................9
1.2.2. APPLICATION SCOPE/ HIGH LEVEL REQUIREMENTS..........................10
1.2.2.1. SUPPLIER DETAILS...................................................................................10
1.2.2.2. PRODUCTS DETAILS..................................................................................10
1.2.2.3. CUSTOMER DETAILS.................................................................................10
1.2.2.4. PURCHASE ORDER DETAILS....................................................................11
1.2.2.5. SALES ORDER DETAILS............................................................................11
1.2.2.6. INVOICE DETAILS......................................................................................11
1.2.2.7. DELIVERY DETAILS...................................................................................12
1.2.2.8. REPORTS DETAILS.....................................................................................12
1.3. SYSTEM REQUIREMENTS.................................................................................12
1.3.1. SYSTEM INTERFACE......................................................................................12
1.3.2. USER INTERFACE...........................................................................................12
1.3.3. COMMUNICATION INTERFACE...................................................................13
1.3.4. AVAILABILITY................................................................................................13
1.3.5. USABILITY.......................................................................................................13
1.3.6. MAINTAINABILITY........................................................................................13
2. SYSTEM DESIGN.....................................................................................................23
2.1. DESIGN PRINCIPLES:.......................................................................................23
2.2. HIGH LEVEL DESIGN OVERVIEW...................................................................25
2.2.1. USE CASES.......................................................................................................25
2.2.2. RELATION TO EXTERNAL ENVIRONMENT................................................39
2.2.3. UNIFIED MODELING LANGUAGE...........................................................39
2.3.3.1 INTRODUCTION.................................................................................................39
2.2.3.2 NOTATIONS........................................................................................................40
4
2.2.4. PROCESS FLOW..............................................................................................45
2.2.5. DEPLOYMENT VIEW......................................................................................46
2.2.6. MODULE DECOMPOSITION..........................................................................48
2.2.6.1. SUPPLIER DETAILS...................................................................................48
2.2.6.2. PRODUCTS DETAILS..................................................................................51
2.2.6.3. CUSTOMER DETAILS.................................................................................54
2.2.6.4. PURCHASE ORDER DETAILS....................................................................56
2.2.6.5. SALES ORDER DETAILS............................................................................58
2.2.6.6. INVOICE DETAILS.....................................................................................60
2.2.6.7. DELIVERY DETAILS...................................................................................62
System Maintenance........................................................................................................169
5
6
Introduction
7
8
2 REQUIREMENTS
The main aim of this project is to automate the manual processing in the
stock maintenance, financial transactions, and employee transactions etc. If
these are done manually, it consumes large amount of time, scope for errors,
and cost of maintenance is also very high. So, in order to reduce all these
disadvantages we developed a business application for the concerned company.
The application will generate reports for the stock levels and sales levels in order
to place purchase orders and assigns duties to the employees for promoting
sales.
User login
1. Supplier Module
2. Products
3. Customer
4. Purchase Order
5. Sales Order
6. Invoice
7. Delivery
8. Reports
9
2.2.2.1 Supplier Details
New Supplier
Modify Supplier
Delete Supplier
New Product
Modify Product
Delete Product
New Customer
Modify Customer
Delete Customer
10
2.2.2.5 Sales Order Details
New Invoice
Modify Invoice
Delete Invoice
New Delivery
Modify Delivery
Delete Delivery
11
Sub Titles are
Supplier Report
Customer Report
Sales Report
Invoice Report
Delivery Report
The user interacts with the system through runtime Oracle D2K GUI screens.
The communication between the front-end and the back-end of the application is
provided by ODBC.
2.3.4 Availability
2.3.5 Usability
12
2.3.6 Maintainability
The Pharma Management Information System should be designed for ease of maintenance.
13
What is Java?
14
Java is a high-level, third generation programming language, like C, Fortran,
Smalltalk, Perl, and many others. You can use Java to write computer
applications that crunch numbers, process words, play games, store data or
do any of the thousands of other things computer software can do.
Java is Object-Oriented
15
Simpler, easier to read programs
More efficient reuse of code
Faster time to market
More robust, error-free code
Java is Platform Independent
Java was designed to not only be cross-platform in source form like C, but
also in compiled binary form. Since this is frankly impossible across processor
architectures Java is compiled to an intermediate form called byte-code. A
Java program never really executes natively on the host machine. Rather a
special native program called the Java interpreter reads the byte code and
executes the corresponding native machine instructions. Thus to port Java
programs to a new platform all that is needed is to port the interpreter and
some of the library routines. Even the compiler is written in Java. The byte
codes are precisely defined, and remain the same on all platforms.
Java byte codes can be compiled on the fly to code that rivals C++ in speed using a
"just-in-time compiler." Several companies are also working on native-machine-
architecture compilers for Java. These will produce executable code that does not
require a separate interpreter, and that is indistinguishable in speed from C++.
It is certainly possible to write large programs in Java. The HotJava browser, the
Eclipse integrated development environment, the LimeWire file sharing application,
the jEdit text editor, the JBoss application server, the Tomcat servlet container, the
Xerces XML parser, the Xalan XSLT processor, and the javac compiler are large
programs that are written entirely in Java.
16
JSP
Introduction
While there are numerous technologies for building web applications that serve
dynamic content, the one that has really caught the attention of the development
community is Java Server Pages (JSP). And not without ample reason either. JSP not
only enjoys cross-platform and cross-Web-server support, but effectively melds the
power of server-side Java technology with the WYSIWYG features of static HTML
pages.
JSP pages typically comprise of:
Static HTML/XML components.
Special JSP tags
Optionally, snippets of code written in the Java programming language called
"scriptlets."
Consequently, you can create and maintain JSP pages by conventional HTML/XML
tools.
It is important to note that the JSP specification is a standard extension
defined on top of the Servlet API. Thus, it leverages all of your experience with
servlets.
There are significant differences between JSP and servlet technology. Unlike servlets,
which is a programmatic technology requiring significant developer expertise, JSP
appeals to a much wider audience. It can be used not only by developers, but also
by page designers, who can now play a more direct role in the development life
cycle.
Another advantage of JSP is the inherent separation of presentation from
content facilitated by the technology, due its reliance upon reusable component
technologies like the JavaBeans component architecture and Enterprise JavaBeans
technology.
JSP Advantages
17
Separation of static from dynamic content: With servlets, the logic for
generation of the dynamic content is an intrinsic part of the servlet itself, and is
closely tied to the static presentation templates responsible for the user interface.
Thus, even minor changes made to the UI typically result in the recompilation of the
servlet. This tight coupling of presentation and content results in brittle, inflexible
applications. However, with JSP, the logic to generate the dynamic content is kept
separate from the static presentation templates by encapsulating it within external
JavaBeans components. These are then created and used by the JSP page using
special tags and scriptlets. When a page designer makes any changes to the
presentation template, the JSP page is automatically recompiled and reloaded into
the web server by the JSP engine.
Write Once Run Anywhere: JSP technology brings the "Write Once, Run
Anywhere" paradigm to interactive Web pages. JSP pages can be moved easily
across platforms, and across web servers, without any changes.
Dynamic content can be served in a variety of formats: There is nothing that
mandates the static template data within a JSP page to be of a certain format.
Consequently, JSP can service a diverse clientele ranging from conventional browsers
using HTML/DHTML, to handheld wireless devices like mobile phones and PDAs using
WML, to other B2B applications using XML.
Recommended Web access layer for n-tier architecture: Sun's J2EE Blueprints,
which offers guidelines for developing large-scale applications using the enterprise
Java APIs, categorically recommends JSP over servlets for serving dynamic content.
Completely leverages the Servlet API: servlet developers are at a distinct advantage
because JSP is nothing but a high-level abstraction of servlets. You can do almost
anything that can be done with servlets using JSP--but more easily!
JSP vs. Active Server Pages (ASP). ASP is a similar technology from Microsoft.
The advantages of JSP are twofold. First, the dynamic part is written in Java, not
Visual Basic or other MS-specific language, so it is more powerful and easier to use.
Second, it is portable to other operating systems and non-Microsoft Web servers.
JSP vs. Pure Servlets. JSP doesn't give you anything that you couldn't in principle
do with a servlet. But it is more convenient to write (and to modify!) regular HTML
than to have a zillion println statements that generate the HTML. Plus, by separating
the look from the content you can put different people on different tasks; your Web
18
page design experts can build the HTML, leaving places for your servlet programmers
to insert the dynamic content.
JSP vs. Server-Side Includes (SSI).SSI is a widely-supported technology for
including externally-defined pieces into a static Web page. JSP is better because it
lets you use servlets instead of a separate program to generate that dynamic part.
Besides, SSI is really only intended for simple inclusions, not for "real" programs that
use form data, make database connections, and the like.
JSP vs. JavaScript.JavaScript can generate HTML dynamically on the client. This is
a useful capability, but only handles situations where the dynamic information is
based on the client's environment. With the exception of cookies, HTTP and form
submission data is not available to JavaScript. And, since it runs on the client,
JavaScript can't access server-side resources like databases, catalogs, pricing
information, and the like.
JSP vs. Static HTML. Regular HTML, of course, cannot contain dynamic information.
JSP is so easy and convenient that it is quite feasible to augment HTML pages that
only benefit marginally by the insertion of small amounts of dynamic data.
Previously, the cost of using dynamic data would preclude its use in all but the most
valuable instances.
Servlets are Java technology's answer to CGI programming. They are programs that
run on a Web server and build Web pages. Building Web pages on the fly is useful
(and commonly done) for a number of reasons:
The Web page is based on data submitted by the user. For example the results
pages from search engines are generated this way, and programs that process
orders for e-commerce sites do this as well.
The data changes frequently. For example, a weather-report or news headlines
page might build the page dynamically, perhaps returning a previously built page if it
is still up to date.
The Web page uses information from corporate databases or other such
sources. For example, you would use this for making a Web page at an on-line store
that lists current prices and number of items in stock.
What are the Advantages of Servlets over Traditional CGI?
19
Java servlets are more efficient, easier to use, more powerful, more portable, and
cheaper than traditional CGI and many alternative CGI-like technologies. (More
importantly, servlet developers tend to get paid more than Perl programmers :-).
Here is a breakdown of the advantages of servlets over CGI:
Efficient. With traditional CGI, a new process is started for each HTTP request. If
the CGI program does a relatively fast operation, the overhead of starting the
process can dominate the execution time. With servlets, the Java Virtual Machine
stays up, and each request is handled by a lightweight Java thread, not a
heavyweight operating system process. Servlets also have more alternatives than do
regular CGI programs for optimizations such as caching previous computations,
keeping database connections open, and the like.
Convenient. Hey, you already know Java. Why learn Perl too? Besides the
convenience of being able to use a familiar language, servlets have an extensive
infrastructure for automatically parsing and decoding HTML form data, reading and
setting HTTP headers, handling cookies, tracking sessions, and many other such
tasks.
Powerful. Java servlets let you easily do several things that are difficult or
impossible with regular CGI. For one thing, servlets can talk directly to the Web
server (regular CGI programs can't). This simplifies operations that need to look up
images and other data stored in standard places. Servlets can also share data among
each other, making useful things like database connection pools easy to implement.
They can also maintain information from request to request, simplifying things like
session tracking and caching of previous computations.
Portable. Servlets are written in Java and follow a well-standardized API.
Consequently, servlets written for, say I-Planet Enterprise Server can run virtually
unchanged on Apache, Microsoft IIS, or WebStar. Servlets are supported directly or
via a plug in on almost every major Web server.
Inexpensive. There are a number of free or very inexpensive Web servers available
that are good for "personal" use or low-volume Web sites. But with the major
exception of Apache, which is free, most commercial-quality Web servers are
relatively expensive. But once you have a Web server, no matter the cost of that
server, adding servlet support to it (if it doesn't come pre configured to support
servlets) is usually cheap or even free.
20
JDBC
21
22
3 SYSTEM DESIGN
Software design is both a process and a model. The design process is a sequence
of steps that enable the designer to describe all aspects of the software to be built
.Creative skill, past experience, a sense of what makes “good “software and an over
all commitment to quality are critical issues for success of a competent design
character, its look, its offering to students, its stance on new technologies and it over
all sprits. And it must enable the administrative staff to maintain the information of
students and staff easier and simpler. Davis suggested a set of principles for
software design which have been adapted and extended in the following list:
a) The design process should not suffer from “tunnel vision”:- we have
considered alternative approaches, judging each approach based on the
requirements of the problem, the resources available to do job.
b) The design should be traceable to the analysis model: - As the single element
of the design model of ten traces to multiple requirements, it is necessary to
have a means for tracking how the design model has satisfied requirements.
Our model is designed in such a way so as to keep whether the requirements
have been satisfied or not.
c) The design should not reinvent the wheel: - Systems are constructed using a
set of design patterns, many of which have likely been encountered before.
23
These patterns should always be chosen as an alternative to reinvention. Here
we have invested the design time in representing truly new ideas and
integrating those patterns that already exist.
d) The design should “minimize the intellectual distance” between the software
and the problem as it exists in the real world: - The structure of our project
mimics the structure of the problem domain.
e) The design should exhibit uniformity and integration: - A design is uniform if
it appears that one person developed the entire thing. We have defined rules
of style and format for our design team before work began. And our design is
integrated as care is taken in defining interfaces between design components.
f) The design should be structured to accommodate change: - Our design is
structured in such a way that any new feature can be accommodating with
little effort and ease.
g) The design should be structured to degrade gently, even when aberrant data,
events, or operating conditions are encountered: - Well-designed software
should never “bomb”. Our system is designed to accommodate unusual
circumstances and if must terminate processing, does so in graceful manner.
h) Design is not coding and coding is not design: - Even when details are created
for program concepts, the level of abstraction of the design model is higher
than source code. The only design decisions made at the coding level address
the small implementation details that enable the procedural design to be
coded. We have taken care that the coding does not interface in the design
phase and have implemented only what we have designed during coding.
i) The design should be accessed for quality, as it is being created, not after the
fact: - The design fundamentals and design measures are available to assist
the designer is maintained at every level of design.
j) The design should be reviewed to minimize conceptual errors:-There is
something tendency to focus on minutiae when the design is reviewed,
missing the forest for the trees. We have ensured that the major conceptual
elements of design have been addressed before worrying about the syntax of
the design model.
When these design principles are properly applied, the software engineer creates a
design that exhibits both external and internal quality factors. External quality
factors are those properties of the software that can be readily observed by users
24
(e.g. speed, reliability, correctness, usability). Internal quality factors are important
to software engineers. They lead high quality design from the technical perspective
3.2 High Level Design Overview
25
26
27
Sequence:
28
29
30
31
32
33
34
35
36
Class Diagram:
37
38
The objective of the Pharma Management Information System is to provide the
abstract view of flowing use cases:
Supplier module
Products Details
Customer details
Purchase Order Details
Sales Order Details
Invoice Details
Delivery Details
Reports Details
The user interacts with the Pharma Management Information System using Oracle
D2K GUI screens.
2.3.3.1 Introduction
UML stands for Unified Modeling Language. It represents a unification of the concepts
and notations presented by the three amigos in their respective books. The goal is
for UML to become a common language for creating models of object oriented
computer software. In its current form UML is comprised of two major components:
a Meta-model and a notation. In the future, some form of method or process may
also be added to; or associated with, UML.
The Meta-model
The Notation
39
The UML notation is rich and full bodied. It is comprised of two major subdivisions.
There is a notation for modeling the static elements of a design such as classes,
attributes, and relationships.
There is also a notation for modeling the dynamic elements of a design such as
objects, messages, and finite state machines.
In this article we will present some of the aspects of the static modeling notation.
Static models are presented in diagrams called: Class Diagrams.
Class Diagrams:
The purpose of a class diagram is to depict the classes within a model. In an object-
oriented application, classes have attributes (member variables), operations
(member functions) and relation- ships with other classes. The UML class diagram
can depict all these things quite easily. The fundamental element of the class
diagram is an icon the represents a class.
A class icon is simply a rectangle divided into three compartments. The topmost
compartment contains the name of the class. The middle compartment contains a list
of attributes (member variables), and the bottom compartment contains a list of
operations (member functions). In many diagrams, the bottom two compartments
are omitted. Even when they are present, they typically do not show every attribute
and operations. The goal is to show only those attributes and operations that are
useful for the particular diagram.
A use case diagram shows the relationship among use cases within a system or other
Semantic entity and their actors.
Use case diagrams show actors and use cases together with their relationships. The
use cases represent functionality of a system or a classifier, like a subsystem or a
class, as manifested to external interactors with the system or the classifier.
A use case diagram is a graph of actors, a set of use cases, possibly some interfaces,
and the relationships between these elements. The relationships are associations
between the actors and the use cases, generalizations between the actors, and
generalizations, extends, and includes among the use cases. The use cases may
Optionally be enclosed by a rectangle that represents the boundary of the containing
System or classifier.
2.2.3.2 Notations
Use Case:
40
A Use Case is a kind of behavioral classifier, which represents a declaration of an
offered behavior. It specifies some behavior, possibly including variants such as
exceptional behavior and error handling, that the subject can perform by
communicating with one or more actors.
Association:
Actor:
Actor specifies a role played by human users, external hardware, or other subjects
that interacts with the subject.
Include:
Include is a directed relationship between two use cases, which implies that the
behavior of the included use case is inserted into the behavior of the including use
case.
Dependency:
A dependency is a relationship implying that a use case requires other another use
case for its specification or implementation.
41
Generalization:
A generalization relationship relates a more general use case and a more specific use
case.
Realization:
4 Sequence Diagram:
A sequence diagram is a form of interaction diagram, which shows objects as lifelines
running down the page, with their interactions over time represented as messages
drawn as arrows from the source lifeline to the target lifeline. Sequence diagrams are
good at showing, which objects communicate with which other objects; and what
messages trigger those communications. Sequence diagrams are not intended for
showing complex procedural logic.
Lifelines:
42
Messages:
Self Message:
43
4.1.1 Process Flow
Step 3:provide username and password by user than click submit button.
Step 4:Click on Supplier, to show Sub Title like New Supplier, Modify Supplier
details. Delete Supplier.
Step 8:Click on Products, to show Sub Title like New Products, Modify
Products details. Delete Product.
Step 12:Click on Customer, to show Sub Title like New Customer, Modify
Customer details. Delete Customer.
Step 16:Click on Purchase Order, to show Sub Title like New Purchase Order,
Modify Purchase Order details. Delete Purchase Order.
Step 20:Click on Sales Order, to show Sub Title like New Sales Order, Modify
Sales Order details. Delete Sales Order.
Step 21: Click on New Sales Order, to Enter information on Sales Order.
44
Step 22: Click on Modify Sales Order, to Update on Sales Order.
Step 24:Click on Invoice, to show Sub Title like New Invoice, Modify Invoice .
Delete Invoice.
Step 28:Click on Delivery, to show Sub Title like New Delivery Note, Modify
Delivery Note. Delete Delivery Note.
Step 29: Click on New Delivery Note, to Enter information on Delivery Note.
Step 32:Click on Reports, to show Sub Title like Supplier Report, Products
Report, Customer Report, Purchase Order Report, Sales Report, Invoice
Report, and Delivery Note Report.
Step 37: Click on, Sales Report, to view information on, Sales Report.
Step 39: Click on Delivery Note Report, to view information on Delivery Note
Report.
45
The interface to the system is accomplished through Oracle D2K GUI. The
interface should be designed for ease-of-use.
The end-user of the system should accomplish their tasks with minimal
navigations.
The interaction between the front-end and the back-end is accomplished
through JDBC.
46
E-R Diagram
Admin Company
manages is managed by
one to one has
relationship
works in
Users
one to many
relationship
a) Entry
Company Name
A.P.G.S.T No
47
C.S.T.No
House No
Street
City
State
Pin
Phone
Fax
Email
b) Task
The application should allow the user, Enter All field values than insert
values in database. After successful registration, the application should display
Success fully Registered.
c) Validations
a) Entry
48
Company Name
A.P.G.S.T No
C.S.T.No
House No
Street
City
State
Pin
Phone
Fax
Email
b)Task
The application should allow the user, just Modify field values than Update
values in database. the application should display Success fully Registered
Updated.
c) Validations
49
3) Delete Supplier Details
a) Entry
Supplier Code
b) Task
The application should allow the user, just Select Supplier Id than Delete values
in database
c) Validations
d) Entry
Supplier
Product Name
Dealer Price
M.R.p
Pack Style
Current Stock
Record level
Record Quantity
Description
e) Task
The application should allow the user, Enter All field values than insert
values in database. After successful registration, the application should display
Success fully Registered.
50
Application should facilitate the user to ‘Reset’ the above fields.
f) Validations
b) Entry
Supplier
Product Name
Dealer Price
M.R.p
Pack Style
Current Stock
Record level
Record Quantity
Description
b)Task
The application should allow the user, just Modify field values than Update
values in database. the application should display Success fully Registered
Updated.
c) Validations
51
The following validations for this module:
a) Entry
Product Code.
b) Task
The application should allow the user, just Select Product Code than Delete
values in database
c) Validations
52
4.1.3.3 Customer Details
g) Entry
Customer Name
A.P.G.S.T.no
Drug license no
Customer Type
Shop Name
House No
Street
City
State
Phone
Zone
h) Task
The application should allow the user, Enter All field values than insert
values in database. After successful registration, the application should display
Success fully Registered.
i) Validations
53
State should be entered.
Phone should be entered.
Phone should be entered only number.
Zone should be entered.
.
c) Entry
Customer Name
A.P.G.S.T.no
Drug license no
Customer Type
Shop Name
House No
Street
City
State
Phone
Zone
b)Task
The application should allow the user, just Modify field values than Update
values in database. the application should display Success fully Registered
Updated.
c) Validations
54
House No should be entered.
Street should be entered.
City should be entered.
State should be entered.
Phone should be entered.
Phone should be entered only number.
Zone should be entered.
a) Entry
b) Task
The application should allow the user, just Select Customer Code than Delete
values in database
c) Validations
j) Entry
Supplier Code
Product Code
Quantity
55
Transportation
k) Task
The application should allow the user, Enter All field values than insert
values in database. After successful registration, the application should display
Success fully Purchase Order inserted.
l) Validations
d) Entry
Supplier Code
Product Code
Quantity
Transportation
b) Task
The application should allow the user, just Modify field values than Update
values in database. the application should display Success fully Updated.
c) Validations
56
Supplier Code should be selected.
Product Id Should is selected.
Quantity should be entered.
Quantity should be entered.
Transportation should be entered.
a) Entry
b) Task
The application should allow the user, just Select Order Code than Delete values
in database
c) Validations
m) Entry
Customer Code
Product Code
Quantity
Transportation
57
n) Task
The application should allow the user, Enter All field values than insert
values in database. After successful registration, the application should display
Success fully Sales Order inserted.
o) Validations
e) Entry
Product Code
Quantity
Transportation
b) Task
The application should allow the user, just Modify field values than Update
values in database. the application should display Success fully Updated.
c) Validations
58
3) Delete Sales Order Details
a) Entry
b) Task
The application should allow the user, just Select Order Code than Delete values
in database
c) Validations
p) Entry
Order Code
Product id
Quantity
APGST_TAX
Bonus
Price
Batch No
Transport
q) Task
59
The application should allow the user, Enter All field values than insert
values in database. After successful registration, the application should display
Success fully Invoice Details inserted.
r) Validations
f) Entry
Invoice id
Order Code
Product id
Quantity
APGST_TAX
Bonus
Price
Batch No
Transport
b) Task
The application should allow the user, just Modify field values than Update
values in database. the application should display Success fully Updated.
c) Validations
60
The following validations for this module:
a) Entry
b) Task
The application should allow the user, just Select Invoice id than Delete values in
database
c) Validations
s) Entry
Order Code
61
Product id
Quantity
APGST_TAX
Bonus
Price
Batch No
Transport
t) Task
The application should allow the user, Enter All field values than insert
values in database. After successful registration, the application should display
Success fully Delivery Details inserted.
u) Validations
g) Entry
Invoice id
Order Code
Product id
Quantity
62
APGST_TAX
Bonus
Price
Batch No
Transport
b) Task
The application should allow the user, just Modify field values than Update
values in database. the application should display Success fully Updated.
c) Validations
a) Entry
b) Task
The application should allow the user, just Select Invoice id than Delete values in
database
c) Validations
63
The following validations for this module:
64
65
Database Tables:
TABLE-1: pharma_SUPPLIER
3 H_NO Varchar2(15)
4 STREET Varchar2(30)
5 CITY Varchar2(30)
6 STATE Varchar2(20)
66
TABLE-2: pharma_login
1 username Varchar2(20)
2 password Varchar2(20)
TABLE-3: pharma_PRODUCT
1 SUPP_ID Varchar2(20)
3 PRO_NAME Varchar2(15)
4 PACK_STYLE Varchar2(20)
8 RLEVEL Varchar2(20)
67
10 description Varchar2 (30)
TABLE-4: pharma_Customer
2 cust_name Varchar2(50)
3 cust_type Varchar2(15)
4 shop_name Varchar2(20)
5 H_NO Varchar2(30)
6 STREET Varchar2(30)
7 CITY Varchar2(30)
8 STATE Varchar2(20)
11 APGST Varchar2(30)
12 drugno Varchar2(30)
68
TABLE-5: pharma_ORDER_MASTER
2 ORDR_TYPE Varchar2(50)
3 SUPP_CUST_ID Varchar2(15)
4 ordr_DATE date
5 PRF_TRNS Varchar2(30)
TABLE-6: pharma_INVOICE_MASTER
1 ORDR_ID Varchar2(20)
3 INVOICE_TYPE Varchar2(15)
4 INVOICE_DATE date
5 APGST_TAX Number(2)
69
TABLE-7: pharma_INVOICE_ITEMS
2 PRD_ID Varchar2(50)
3 PRD_QTY Number(5)
TABLE-8: pharma_ORDER_ITEMS
2 PRD_ID Varchar2(50)
3 PRD_QTY Number(5)
70
TESTING
71
TESTING FUNDAMENTALS:
Testing is the major quality control measure employed using software
development. Its major function is to detect errors in the software. During testing,
the program to be tested is executed with a set of test cases and the output of the
program for the test cases and is evaluated to determine if the program is
performing as it is expected to do. The success of testing depends majorly on the
selection of test cases.
TESTING PROCESS:
Testing starts with a test plan. The test plan identifies all the testing related
activities that need to be performed along with the schedule and guidelines for the
testing. The plan also specifies the levels of testing that need to be done by
identifying the different testing units. For each unit specified in the plan, first the test
case are selected and specified then the test unit is executed with test cases and
reports are produced.
Testing starts with a test plan and terminates with acceptance testing.
Test Cases
72
1 Home Page:
1.1 Verify that the application is properly connected, on entering the Valid URL.
1.2 Verify that “Pharma Management” Home page should be displayed with
Register Now and Login hyperlinks and text messages.
1.4 Verify that on clicking hyperlink that particular hyperlink form should be
displayed.
2 Login Page:
2.1 Verify that on clicking <login> hyperlink, “Pharma Management” Login page
should be displayed with required text fields.
2.2 Verify that on clicking <Submit> button without entering anything in any one
of all fields, proper messages should be displayed.
2.3 Verify that on clicking <Submit> button after entering invalid data in any
one of all fields, proper messages should be displayed.
2.4 Verify that the <Register Now> hyperlink should be displayed.
2.5 Verify that on clicking <Submit> button after entering valid data Pharma
Management Home page should be displayed with required fields and
hyperlinks.
4.1 Verify that on clicking ‘Supplier Module’ hyperlink the Supplier Module form
should be displayed with New Supplier, Modify Supplier and Delete Supplier
hyperlinks and text should be displayed.
4.2 Verify that on clicking ‘New Supplier’ hyperlink the New Supplier Registration
form should be displayed.
4.3 Verify that on clicking ‘Modify Supplier’ hyperlink the Modify Supplier
Registration form should be displayed.
4.4 Verify that on clicking ‘Delete Supplier’ hyperlink the Delete Supplier form
should be displayed.
73
5.1 Verify that on clicking ‘New Supplier’ hyperlink the New Supplier Registration
form should be displayed.
5.2 Verify that in registration form the Company Name, A.P.G.S.T No, C.S.T No
should be present.
5.3 Verify that on clicking <Register> button without entering anything in any
one of all fields, proper messages should be displayed.
5.4 Verify that on clicking <Register> button after entering invalid data in any
one of all fields, proper messages should be displayed.
5.5 Verify that on clicking <Register> button after entering valid data Success
message should be displayed.
6.1 Verify that on clicking ‘Modify Supplier’ hyperlink the Modify Supplier form
should be displayed.
6.2 Verify that on selecting Supplier Code from the Combo Box that Supplier
details should be displayed.
6.3 Verify that after modifying the details and clicking the modify button the
modify message should be displayed.
7.1 Verify that on clicking ‘Delete Supplier’ hyperlink the Delete Supplier form
should be displayed.
7.2 Verify that on selecting Supplier Code from the Combo Box that Supplier
details should be displayed.
7.3 Verify that on clicking the Delete button the Delete message should be
displayed.
8.1 Verify that on clicking ‘Products Module’ hyperlink the Products Module form
should be displayed with New Products, Modify Products and Delete Products
hyperlinks and text should be displayed.
8.2 Verify that on clicking ‘New Products’ hyperlink the New Products Registration
form should be displayed.
8.3 Verify that on clicking ‘Modify Products’ hyperlink the Modify Products form
should be displayed.
74
8.4 Verify that on clicking ‘Delete Products’ hyperlink the Delete Products form
should be displayed.
9.1 Verify that on clicking ‘New Products’ hyperlink the New Products Registration
form should be displayed.
9.2 Verify that in registration form the Supplier ID, Name, Dealer Price, MRP, and
recorded level should be present.
9.3 Verify that on clicking <Register> button without entering anything in any
one of all fields, proper messages should be displayed.
9.4 Verify that on clicking <Register> button after entering invalid data in any
one of all fields, proper messages should be displayed.
9.5 Verify that on clicking <Register> button after entering valid data Success
message should be displayed.
9.6 Verify that on clicking <clear> button after entering any thing in the fields the
data must be cleared.
10.1 Verify that on clicking ‘Modify Products’ hyperlink the Modify Products form
should be displayed.
10.2 Verify that on selecting Products Code from the Combo Box that Product
details should be displayed.
10.3 Verify that after modifying the details and clicking the modify button the
modify message should be displayed.
11.1 Verify that on clicking ‘Delete Products’ hyperlink the Delete Products form
should be displayed.
11.2 Verify that on selecting Products Code from the Combo Box that Product
details should be displayed.
11.3 Verify that on clicking the Delete button the Delete message should be
displayed.
75
12.1 Verify that on clicking ‘Customer Module’ hyperlink the Customer Module form
should be displayed with New Customer, Modify Customer and Delete
Customer hyperlinks and text should be displayed.
12.2 Verify that on clicking ‘New Customer’ hyperlink the New Customer
Registration form should be displayed.
12.3 Verify that on clicking ‘Modify Customer’ hyperlink the Modify Customer form
should be displayed.
12.4 Verify that on clicking ‘Delete Customer’ hyperlink the Delete Customer form
should be displayed.
13.1 Verify that on clicking ‘New Customer’ hyperlink the New Customer
Registration form should be displayed.
13.2 Verify that in registration form the Customer Name, Customer Type,
A.P.G.S.T No, Drug License No should be present.
13.3 Verify that on clicking <Register> button without entering anything in any
one of all fields, proper messages should be displayed.
13.4 Verify that on clicking <Register> button after entering invalid data in any
one of all fields, proper messages should be displayed.
13.5 Verify that on clicking <Register> button after entering valid data Success
message should be displayed.
13.6 Verify that on clicking <clear> button after entering any thing in the fields the
data must be cleared.
14.1 Verify that on clicking ‘Modify Customer’ hyperlink the Modify Customer form
should be displayed.
14.2 Verify that on selecting Customer Code from the Combo Box that Customer
details should be displayed.
14.3 Verify that after modifying the details and clicking the modify button the
modify message should be displayed.
15.1 Verify that on clicking ‘Delete Customer’ hyperlink the Delete Customer form
should be displayed.
15.2 Verify that on selecting Customer Code from the Combo Box that Product
details should be displayed.
76
15.3 Verify that on clicking the Delete button the Delete message should be
displayed.
16.1 Verify that on clicking ‘Purchase Order’ hyperlink the Purchase Order form
should be displayed with New Purchase Order, Modify Purchase Order and
Delete Purchase Order hyperlinks and text should be displayed.
16.2 Verify that on clicking ‘New Purchase Order’ hyperlink the New Purchase
Order form should be displayed.
16.3 Verify that on clicking ‘Modify Purchase Order’ hyperlink the Modify Purchase
Order form should be displayed.
16.4 Verify that on clicking ‘Delete Purchase Order’ hyperlink the Delete Purchase
Order form should be displayed.
17.1 Verify that on clicking ‘New Purchase Order’ hyperlink the New Purchase
Order form should be displayed.
17.2 Verify that on selecting the supplier code from the combo box the product
code, quantity and transportation fields should be displayed.
17.3 Verify that on clicking <Order> button without entering anything in any one
of all fields, proper messages should be displayed.
17.4 Verify that on clicking <Order> button after entering invalid data in any
one of all fields, proper messages should be displayed.
17.5 Verify that on clicking <Order> button after entering valid data, Success
message with “purchase order registered successfully” should be displayed.
17.6 Verify that on clicking <clear> button after entering any thing in the fields the
data must be cleared.
18.1 Verify that on clicking ‘Modify Purchase Order’ hyperlink the Modify Purchase
Order form should be displayed.
18.2 Verify that on selecting Purchase Order id Code from the Combo Box that
Product ID, Quantity details should be displayed.
18.3 Verify that after modifying the Quantity and clicking the modify button the
modify message should be displayed.
77
19.1 Verify that on clicking ‘Delete Purchase Order’ hyperlink the Delete Purchase
Order form should be displayed.
19.2 Verify that on selecting Purchase Order id Code from the Combo Box that
Product details should be displayed.
19.3 Verify that on clicking the Delete button the Delete message should be
displayed.
20.1 Verify that on clicking ‘Sales Order’ hyperlink the Sales Order form should be
displayed with New Sales Order, Modify Sales Order and Delete Sales Order
hyperlinks and text should be displayed.
20.2 Verify that on clicking ‘New Sales Order’ hyperlink the New Sales Order form
should be displayed.
20.3 Verify that on clicking ‘Modify Sales Order’ hyperlink the Modify Sales Order
form should be displayed.
20.4 Verify that on clicking ‘Delete Sales Order’ hyperlink the Delete Sales Order
form should be displayed.
21.1 Verify that on clicking ‘New Sales Order’ hyperlink the New Sales Order form
should be displayed.
21.2 Verify that Customer Code, Product Code, Quantity and Transportation fields
should be displayed.
21.3 Verify that on clicking <Order> button without entering anything in any one
of all fields, proper messages should be displayed.
21.4 Verify that on clicking <Order> button after entering invalid data in any
one of all fields, proper messages should be displayed.
21.5 Verify that on clicking <Order> button after entering valid data, Success
message with “Sales order registered successfully” should be displayed.
21.6 Verify that on clicking <clear> button after entering any thing in the fields the
data must be cleared.
22.1 Verify that on clicking ‘Modify Sales Order’ hyperlink the Modify Sales Order
form should be displayed.
22.2 Verify that on selecting Sales Order id Code from the Combo Box that Product
ID, Quantity details should be displayed.
78
22.3 Verify that the Product ID should not be edited.
22.4 Verify that after modifying the Quantity and clicking the modify button the
modify message should be displayed.
23.1 Verify that on clicking ‘Delete Sales Order’ hyperlink the Delete Sales Order
form should be displayed.
23.2 Verify that on selecting Sales Order id Code from the Combo Box that Sales
order details should be displayed.
23.3 Verify that on clicking the Delete button the successful Delete message should
be displayed.
24 Invoice Form:
24.1 Verify that on clicking ‘Invoice’ hyperlink the Invoice form should be displayed
with New Invoice, Modify Invoice and Delete Invoice hyperlinks and text
should be displayed.
24.2 Verify that on clicking ‘New Invoice’ hyperlink the New Invoice form should be
displayed.
24.3 Verify that on clicking ‘Modify Invoice’ hyperlink the Modify Invoice form
should be displayed.
24.4 Verify that on clicking ‘Delete Invoice’ hyperlink the Delete Invoice form
should be displayed.
25.1 Verify that on clicking ‘New Invoice’ hyperlink the New Invoice form should be
displayed.
25.2 Verify that on selecting Purchase Order id Code from the Combo Box that
Product ID, Quantity, APGST tax, Bonus and Transport details should be
displayed.
25.3 Verify that on clicking <Register> button without entering anything in any
one of all fields, proper messages should be displayed.
25.4 Verify that on clicking <Register> button after entering invalid data in any
one of all fields, proper messages should be displayed.
25.5 Verify that on clicking <Register> button after entering valid data, Success
message should be displayed.
79
26.1 Verify that on clicking ‘Modify Invoice’ hyperlink the Modify Invoice form
should be displayed.
26.2 Verify that on selecting Invoice id Code from the Combo Box that Order ID,
Product ID and Quantity details should be displayed.
26.3 Verify that the Product ID and Order ID should not be edited.
26.4 Verify that after modifying the Quantity and clicking the modify button,
Invoice Note modified successfully message should be displayed.
27.1 Verify that on clicking ‘Delete Invoice’ hyperlink the Delete Invoice form
should be displayed.
27.2 Verify that on selecting Invoice id Code from the Combo Box that Invoice
order details should be displayed.
27.3 Verify that on clicking the Delete button the successful Delete message should
be displayed.
28 Delivery Form:
28.1 Verify that on clicking ‘Delivery’ hyperlink the Delivery form should be
displayed with New Delivery Note, Modify Delivery Note and Delete Delivery
Note hyperlinks and text should be displayed.
28.2 Verify that on clicking ‘New Delivery Note’ hyperlink the New Delivery Note
form should be displayed.
28.3 Verify that on clicking ‘Modify Delivery Note’ hyperlink the Modify Delivery
Note form should be displayed.
28.4 Verify that on clicking ‘Delete Delivery Note’ hyperlink the Delete Delivery
Note form should be displayed.
29.1 Verify that on clicking ‘New Delivery Note’ hyperlink the New Delivery Note
form should be displayed.
29.2 Verify that on selecting Delivery Order id Code from the Combo Box that
Product ID, Quantity, APGST tax, Bonus and Transport details should be
displayed.
29.3 Verify that on clicking <Register> button without entering anything in any
one of all fields, proper messages should be displayed.
29.4 Verify that on clicking <Register> button after entering invalid data in any
one of all fields, proper messages should be displayed.
29.5 Verify that on clicking <Register> button after entering valid data, Success
message should be displayed.
80
30 Modify Delivery Note Form:
30.1 Verify that on clicking ‘Modify Delivery Note’ hyperlink the Modify Delivery
Note form should be displayed.
30.2 Verify that on selecting Invoice id Code from the Combo Box that Order ID,
Product ID and Quantity details should be displayed.
30.3 Verify that the Product ID, Quantity and Order ID should not be edited.
30.4 Verify that after modifying the details and clicking the modify button,
successful message should be displayed.
31.1 Verify that on clicking ‘Delete Delivery Note’ hyperlink the Delete Delivery
Note should be displayed.
31.2 Verify that on selecting Invoice id Code from the Combo Box that Invoice
order details should be displayed.
31.3 Verify that on clicking the Delete button the successful Delete message should
be displayed.
32 Reports:
32.1 Verify that on clicking ‘Reports’ hyperlink the Reports Form should be
displayed.
32.2 Verify that in reports form Supplier Report, Supplier Products Report,
Customer Report, Purchase Order Report, Sales Order Report, Invoice Report,
Delivery Note Report, Normal Menu and Logout hyperlinks should be
displayed.
32.3 Verify on clicking any report hyperlink that particular hyperlink should be
displayed with details.
33 Logout:
Test Reports
1) Home Page:
81
Test Pass /
Description
Case ID Fail
Verify that the application is properly connected, on
1.1 entering the Valid URL. Pass
2) Login Page:
Test
Pass /
Case Description
Fail
ID
Verify that on clicking <login> hyperlink, “Pharma
2.1 Management” Login page should be displayed with Pass
required text fields.
Verify that on clicking <Submit> button without entering
2.2 anything in any one of all fields, proper messages should Pass
be displayed.
Verify that on clicking <Submit> button after entering
2.3 invalid data in any one of all fields, proper messages Pass
should be displayed.
Verify that the <Register Now> hyperlink should be
2.4 displayed. Pass
Test
Pass /
Case Description
Fail
ID
Verify that in the Home Supplier Mode, Products,
Customer, Purchase and Sales Order, Invoice, Delivery,
3.1 Reports and Logout hyperlinks and text should be Pass
present.
82
Verify that on clicking hyperlinks that particular hyperlink
3.2 form should be displayed. Pass
Test
Pass
Case Description
/ Fail
ID
Verify that on clicking ‘Supplier Module’ hyperlink the
Supplier Module form should be displayed with New
4.1 Supplier, Modify Supplier and Delete Supplier hyperlinks Pass
and text should be displayed.
Verify that on clicking ‘New Supplier’ hyperlink the New
4.2 Supplier Registration form should be displayed. Pass
Test
Pass /
Case Description
Fail
ID
Verify that on clicking ‘New Supplier’ hyperlink the New
5.1 Supplier Registration form should be displayed. Pass
83
5.5 Verify that on clicking <Register> button after entering Pass
valid data Success message should be displayed.
Test Pass /
Description
Case ID Fail
Verify that on clicking ‘Delete Supplier’ hyperlink the
7.1 Delete Supplier form should be displayed. Pass
Test
Pass
Case Description
/ Fail
ID
Verify that on clicking ‘Products Module’ hyperlink the
Products Module form should be displayed with New
8.1 Products, Modify Products and Delete Products hyperlinks Pass
and text should be displayed.
Verify that on clicking ‘New Products’ hyperlink the New
8.2 Products Registration form should be displayed. Pass
84
Verify that on clicking ‘Modify Products’ hyperlink the
8.3 Modify Products form should be displayed. Pass
Test
Pass /
Case Description
Fail
ID
Verify that on clicking ‘New Products’ hyperlink the New
9.1 Products Registration form should be displayed. Pass
9.6 Verify that on clicking <clear> button after entering any Pass
thing in the fields the data must be cleared.
85
11) Delete Products Form:
Test Pass /
Description
Case ID Fail
Verify that on clicking ‘Delete Products’ hyperlink the
11.1 Delete Products form should be displayed. Pass
86
messages should be displayed.
Test Pass /
Description
Case ID Fail
Verify that on clicking ‘Modify Customer’ hyperlink the
14.1 Modify Customer form should be displayed. Pass
Test Pass /
Description
Case ID Fail
Verify that on clicking ‘Delete Customer’ hyperlink the
15.1 Delete Customer form should be displayed. Pass
87
Test
Pass
Case Description
/ Fail
ID
Verify that on clicking ‘Purchase Order’ hyperlink the
Purchase Order form should be displayed with New
16.1 Purchase Order, Modify Purchase Order and Delete Pass
Purchase Order hyperlinks and text should be displayed.
Verify that on clicking ‘New Purchase Order’ hyperlink the
16.2 New Purchase Order form should be displayed. Pass
Test
Pass /
Case Description
Fail
ID
Verify that on clicking ‘New Purchase Order’ hyperlink
17.1 the New Purchase Order form should be displayed. Pass
17.6 Verify that on clicking <clear> button after entering any Pass
thing in the fields the data must be cleared.
88
Test Pass /
Description
Case ID Fail
Verify that on clicking ‘Modify Purchase Order’ hyperlink
18.1 the Modify Purchase Order form should be displayed. Pass
Test Pass /
Description
Case ID Fail
Verify that on clicking ‘Delete Purchase Order’
19.1 hyperlink the Delete Purchase Order form should be Pass
displayed.
Verify that on selecting Purchase Order id Code from the
19.2 Combo Box that Product details should be displayed. Pass
Test
Pass
Case Description
/ Fail
ID
Verify that on clicking ‘Sales Order’ hyperlink the Sales
Order form should be displayed with New Sales Order,
20.1 Modify Sales Order and Delete Sales Order hyperlinks and Pass
text should be displayed.
Verify that on clicking ‘New Sales Order’ hyperlink the New
20.2 Sales Order form should be displayed. Pass
89
21) New Sales Order Form:
Test
Pass /
Case Description
Fail
ID
Verify that on clicking ‘New Sales Order’ hyperlink the
21.1 New Sales Order form should be displayed. Pass
21.6 Verify that on clicking <clear> button after entering any Pass
thing in the fields the data must be cleared.
Test Pass /
Description
Case ID Fail
Verify that on clicking ‘Modify Sales Order’ hyperlink
22.1 the Modify Sales Order form should be displayed. Pass
90
23) Delete Sales Order Form:
Test Pass /
Description
Case ID Fail
Verify that on clicking ‘Delete Sales Order’ hyperlink
23.1 the Delete Sales Order form should be displayed. Pass
.
24) Invoice Form:
Test
Pass
Case Description
/ Fail
ID
Verify that on clicking ‘Invoice’ hyperlink the Invoice form
24.1 should be displayed with New Invoice, Modify Invoice and Pass
Delete Invoice hyperlinks and text should be displayed.
Verify that on clicking ‘New Invoice’ hyperlink the New
24.2 Invoice form should be displayed. Pass
Test
Pass /
Case Description
Fail
ID
Verify that on clicking ‘New Invoice’ hyperlink the New
25.1 Invoice form should be displayed. Pass
91
Verify that on clicking <Register> button after entering
25.4 invalid data in any one of all fields, proper messages Pass
should be displayed.
Test
Pass /
Case Description
Fail
ID
Verify that on clicking ‘Modify Invoice’ hyperlink the
26.1 Modify Invoice form should be displayed. Pass
Test Pass /
Description
Case ID Fail
Verify that on clicking ‘Delete Invoice’ hyperlink the
27.1 Delete Invoice form should be displayed. Pass
Test
Pass
Case Description
/ Fail
ID
92
Verify that on clicking ‘Delivery’ hyperlink the Delivery
form should be displayed with New Delivery Note, Modify
28.1 Delivery Note and Delete Delivery Note hyperlinks and Pass
text should be displayed.
Verify that on clicking ‘New Delivery Note’ hyperlink the
28.2 New Delivery Note form should be displayed. Pass
Test
Pass /
Case Description
Fail
ID
Verify that on clicking ‘New Delivery Note’ hyperlink the
29.1 New Delivery Note form should be displayed. Pass
Test Pass /
Description
Case ID Fail
Verify that on clicking ‘Modify Delivery Note’ hyperlink
30.1 the Modify Delivery Note form should be displayed. Pass
93
Verify that on selecting Invoice id Code from the Combo
30.2 Box that Order ID, Product ID and Quantity details should Pass
be displayed.
Verify that the Product ID, Quantity and Order ID
30.3 should not be edited. Pass
Test Pass /
Description
Case ID Fail
Verify that on clicking ‘Delete Delivery Note’ hyperlink
31.1 the Delete Delivery Note should be displayed. Pass
32) Reports:
Test
Pass
Case Description
/ Fail
ID
Verify that on clicking ‘Reports’ hyperlink the Reports Form
32.1 should be displayed. Pass
33) Logout:
94
Test
Pass /
Case Description
Fail
ID
Verify that on clicking ‘Logout hyperlink, “logout Form”
33.1 page should be displayed with success message and Pass
hyperlinks should be displayed.
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
***************newSo.jsp********************
139
apos=str.indexOf("@")
dotpos=str.lastIndexOf(".")
if (apos<1||dotpos-apos<2)
{
return false
}
else {return true}
}
function isAlpha(str)
{
for(i=0;i<str.length;i++)
if(!((str.charAt(i)>='a' && str.charAt(i)<='z')||(str.charAt(i)>='A' &&
str.charAt(i)<='Z' || str.charAt(i)==" ")))
return false;
return true;
}
function isDigit(str){
for(i=0;i<str.length;i++)
if(!((str.charAt(i) >= '0') && (str.charAt(i) <='9')))
return false;
return true;
}
function checkall()
{
var supid=document.register.supid.value;
var proid=document.register.proid.value;
var qty=document.register.qty.value;
var trans=document.register.trans.value;
if(document.register.supid.value=="S")
{
alert("Supplier Id should be entered!");
document.register.supid.focus();
return;
}
140
if(document.register.proid.value=="S")
{
alert("Product Id should be entered!");
document.register.proid.focus();
return;
}
if(document.register.qty.value=="")
{
alert("Quantity should be entered!");
document.register.qty.focus();
return;
}
if((!isDigit(qty)))
{
window.alert("Quantity should be number");
document.register.qty.focus();
return false;
}
if(document.register.trans.value=="")
{
alert("Transportation should be entered!");
document.register.trans.focus();
return;
}
var sta='<%=st%>';
141
if(sta!='null')
{
document.register.supid.value=sta;
}
else
{
document.register.supid.value="S";
}
}
function check()
{
document.register.submit();
}
</script>
</head>
<body bgcolor="#F1DCB6" onload="show();">
<%PharmaData td=new PharmaData();
ArrayList list=(ArrayList)td.getCustid();
Iterator it=list.iterator();
%>
<form name="register" action="">
<table align="center">
<tr><td colspan="4" align="center"><font size=4
color="blue">Sales Order<br></font></td></tr>
<tr><td><font size=4 color="blue">Customer Code</font></td>
<td><font size=4 color="blue"><b> :</b> </font>
<select name="supid" onchange="check()">
<option value="S">Select CustID</option>
<%while(it.hasNext()){ %>
<option value="<%=it.next() %>"><%=it.next() %></option>
<%} %>
</select></td>
<%
142
ArrayList clist=(ArrayList)td.getProid();
if(clist!=null)
{
Iterator cit=clist.iterator();
while(cit.hasNext())
{
// cit.next();
%>
<tr><td><font size=4 color="blue">Product Code</font></td>
<td><font size=4 color="blue"><b> :</b> </font>
<select name="proid" >
<option value="S">Select ProID</option>
<%while(cit.hasNext()){ %>
<option value="<%=cit.next() %>"><%=cit.next() %></option>
<%} %>
</select></td>
<%}} clist=null;
%>
</table>
</form>
</body>
</html>
143
*****************************modpo.jsp**********************
144
}
function validate_email(str)
{
apos=str.indexOf("@")
dotpos=str.lastIndexOf(".")
if (apos<1||dotpos-apos<2)
{
return false
}
else {return true}
}
function isAlpha(str)
{
for(i=0;i<str.length;i++)
if(!((str.charAt(i)>='a' && str.charAt(i)<='z')||(str.charAt(i)>='A' &&
str.charAt(i)<='Z' || str.charAt(i)==" ")))
return false;
return true;
}
function isDigit(str){
for(i=0;i<str.length;i++)
if(!((str.charAt(i) >= '0') && (str.charAt(i) <='9')))
return false;
return true;
}
function checkall()
{
var supid=document.register.supid.value;
var proid=document.register.proid.value;
var qty=document.register.qty.value;
if(document.register.supid.value=="S")
{
alert("supid should be Selected!");
document.register.supid.focus();
return;
}
145
if(document.register.proid.value=="S")
{
alert("Product id should be entered!");
document.register.proid.focus();
return;
}
if(document.register.qty.value=="")
{
alert("Quantity should be entered!");
document.register.qty.focus();
return;
}
if((!isDigit(qty)))
{
window.alert("Quantity should be number");
document.register.qty.focus();
return false;
}
var sta='<%=st%>';
var ty='<%=typ%>';
if(sta!='null')
{
document.register.supid.value=sta;
document.register.type.value=ty;
}
146
else
{
document.register.supid.value="S";
}
}
function check()
{
document.register.submit();
}
</script>
</head>
<body bgcolor="#F1DCB6" onload="show();">
<%PharmaData td=new PharmaData();
String type=request.getParameter("type");
ArrayList list=(ArrayList)td.getPOid(type);
Iterator it=list.iterator();
%>
<form name="register" action="">
<table align="center">
<tr><td colspan="4" align="center"><font size=4
color="blue">Modify <%=type %> Order <br></font></td></tr>
<input type="hidden" name="type" value="<%=typ %>"/>
<tr><td><font size=4 color="blue">Order Code</font></td>
<td><font size=4 color="blue"><b> :</b> </font>
<select name="supid" onchange="check()">
<option value="S">Select POId</option>
<%while(it.hasNext()){ %>
<option value="<%=it.next() %>"><%=it.next() %></option>
<%} %>
</select></td></tr>
<%
String cid=request.getParameter("supid");
if(cid==null||cid=="S")
{
}
147
else
{
System.out.println("supid"+cid);
ArrayList clist=(ArrayList)td.getPOdata(cid);
if(clist!=null)
{
Iterator cit=clist.iterator();
while(cit.hasNext())
{
String sid=(String)cit.next();
%>
<tr><td><font size=4 color="blue">Product
id</font></td><td><font size=4 color="blue"><b>
:</b> </font><input type="text" name="proid"
maxlength="20" value="<%=cit.next() %>" readonly title="Product id
not possible to modify"/></td></tr>
<tr><td><font size=4 color="blue">Quantity<font
color="red">*</font></font></td><td><font size=4
color="blue"><b> :</b> </font><input type="text"
name="qty" maxlength="20" value="<%=cit.next() %>"/></td></tr>
<tr><td colspan="4" align="center"><br><input type="button"
value="Modify" onclick="checkall()"/> </td></tr>
<%}} clist=null; }
%>
</table>
</form>
</body>
</html>
***************delpo.jsp*****************
148
String basePath = request.getScheme()+"://"+request.getServerName()
+":"+request.getServerPort()+path+"/";
%>
149
return false
}
else {return true}
}
function isAlpha(str)
{
for(i=0;i<str.length;i++)
if(!((str.charAt(i)>='a' && str.charAt(i)<='z')||(str.charAt(i)>='A' &&
str.charAt(i)<='Z' || str.charAt(i)==" ")))
return false;
return true;
}
function isDigit(str){
for(i=0;i<str.length;i++)
if(!((str.charAt(i) >= '0') && (str.charAt(i) <='9')))
return false;
return true;
}
function checkall()
{
var supid=document.register.supid.value;
if(document.register.supid.value=="S")
{
alert("supid should be Selected!");
document.register.supid.focus();
return;
}
150
{
var sta='<%=st%>';
var ty='<%=typ%>';
//alert("sta"+sta);
if(sta!='null')
{
document.register.supid.value=sta;
document.register.type.value=ty;
}
else
{
document.register.supid.value="S";
}
}
function check()
{
document.register.submit();
}
</script>
</head>
<body bgcolor="#F1DCB6" onload="show();">
<%PharmaData td=new PharmaData();
String type=request.getParameter("type");
ArrayList list=(ArrayList)td.getPOid(type);
Iterator it=list.iterator();
%>
<form name="register" action="">
<table align="center">
<tr><td colspan="4" align="center"><font size=4
color="blue">Delete <%=type %> Order <br></font></td></tr>
<input type="hidden" name="type" value="<%=typ %>"/>
<tr><td><font size=4 color="blue">Order Code</font></td>
<td><font size=4 color="blue"><b> :</b> </font>
<select name="supid" onchange="check()">
<option value="S">Select POId</option>
151
<%while(it.hasNext()){ %>
<option value="<%=it.next() %>"><%=it.next() %></option>
<%} %>
</select></td></tr>
<%
String cid=request.getParameter("supid");
if(cid==null||cid=="S")
{
}
else
{
System.out.println("supid"+cid);
ArrayList clist=(ArrayList)td.getPOdata(cid);
if(clist!=null)
{
Iterator cit=clist.iterator();
while(cit.hasNext())
{
String sid=(String)cit.next();
%>
<tr><td><font size=4 color="blue">Product
id</font></td><td><font size=4 color="blue"><b>
:</b> </font><%=cit.next() %></td></tr>
<tr><td><font size=4 color="blue">Quantity<font
color="red">*</font></font></td><td><font size=4
color="blue"><b> :</b> </font><%=cit.next()
%></td></tr>
<tr><td colspan="4" align="center"><br><input type="button"
value="Delete" onclick="checkall()"/> </td></tr>
<%
}} clist=null; }
%>
</table>
</form>
</body>
</html>
*****************SPReport.jsp**********************
152
<%@ page language="java" import="java.util.*,pharma.*"
pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()
+":"+request.getServerPort()+path+"/";
%>
</head>
<body bgcolor="#F1DCB6">
<%Reports rp=new Reports();
ArrayList list=(ArrayList)rp.getSupProductdata();
Iterator it=list.iterator();
%>
<form name="register" action="">
<table align="center" border="1">
<tr><td colspan="10" align="center"><font size=4
color="blue">Supplier Products Report<br></font></td></tr>
<tr>
<td><font size=4 color="blue">Supplier Id</font></td>
<td><font size=4 color="blue">Product Id</font></td>
153
<td><font size=4 color="blue">Product Name </font></td>
<td><font size=4 color="blue">PackStyle</font></td>
<td><font size=4 color="blue">DealerPrice</font></td>
<td><font size=4 color="blue">MRP</font></td>
<td><font size=4 color="blue">CurrentStock</font></td>
<td><font size=4 color="blue">Reorder Level</font></td>
<td><font size=4 color="blue">Reorder Quantity </font></td>
<td><font size=4 color="blue">Description </font></td>
</tr>
<%while(it.hasNext())
{ %>
<tr>
<td><%=it.next() %></td><td><%=it.next() %></td><td><%=it.next()
%></td><td><%=it.next() %></td><td><%=it.next() %></td>
<td><%=it.next() %></td><td><%=it.next() %></td><td><%=it.next()
%></td><td><%=it.next() %></td><td><%=it.next() %></td>
</tr>
<%} %>
</table>
</form>
</body>
</html>
**************Newpo.java******************
package pharma;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
154
/**
* The doGet method of the servlet. <br>
*
* This method is called when a form has its tag value method
equals to get.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String supid=request.getParameter("supid");
String proid=request.getParameter("proid");
String qty=request.getParameter("qty");
String trans=request.getParameter("trans");
String type=request.getParameter("type");
System.out.println("type>>"+type);
if(b==false)
{
System.out.println("b>in if>"+b);
out.println("<!DOCTYPE HTML
PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
out.println("<HTML>");
out.println(" <HEAD><TITLE>A
Servlet</TITLE></HEAD>");
out.println(" <BODY bgcolor=\"#F1DCB6\">");
155
if(type!=null)
{
if(type.equals("Purchase"))
out.print(" <br><br><center><font size=4
color=\"blue\">Purchase Order Registered Succesfully</font></center>
");
else
out.print(" <br><br><center><font size=4
color=\"blue\">Sales Order Registered Succesfully</font></center> ");
}
out.println(" </BODY>");
out.println("</HTML>");
}
else
{
System.out.println("b>in else>"+b);
out.println("<!DOCTYPE HTML
PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
out.println("<HTML>");
out.println(" <HEAD><TITLE>A
Servlet</TITLE></HEAD>");
out.println(" <BODY bgcolor=\"#F1DCB6\">");
out.print(" <br><br><center><font size=4
color=\"blue\"> Order Not Registered </font></center> ");
out.println(" </BODY>");
out.println("</HTML>");
}
out.flush();
out.close();
}
*******************Modpo.java****************
156
package pharma;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* The doGet method of the servlet. <br>
* This method is called when a form has its tag value method
equals to get.
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String supid=request.getParameter("supid");
String proid=request.getParameter("proid");
String qty=request.getParameter("qty");
PharmaData td=new PharmaData();
int b=td.modPO(supid, proid, qty);
System.out.println("b>>"+b);
if(b>0)
{
System.out.println("b>in if>"+b);
out.println("<!DOCTYPE HTML
PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
157
out.println("<HTML>");
out.println(" <HEAD><TITLE>A
Servlet</TITLE></HEAD>");
out.println(" <BODY bgcolor=\"#F1DCB6\">");
out.println(" </BODY>");
out.println("</HTML>");
}
else
{
System.out.println("b>in else>"+b);
out.println("<!DOCTYPE HTML
PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
out.println("<HTML>");
out.println(" <HEAD><TITLE>A
Servlet</TITLE></HEAD>");
out.println(" <BODY bgcolor=\"#F1DCB6\">");
out.print(" <br><br><center><font size=4
color=\"blue\">Purchase Order Quantity Not
Modified</font></center> ");
out.println(" </BODY>");
out.println("</HTML>");
}
out.flush();
out.close();
}
**********************DelPo.java**************
package pharma;
158
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* The doGet method of the servlet. <br>
* This method is called when a form has its tag value method
equals to get.
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String supid=request.getParameter("supid");
System.out.println("supid"+supid);
if(b>0)
{
int c=td.delPOF(supid);
if(c>0)
{
System.out.println("b>in if>"+b);
out.println("<!DOCTYPE HTML
PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
159
out.println("<HTML>");
out.println(" <HEAD><TITLE>A
Servlet</TITLE></HEAD>");
out.println(" <BODY bgcolor=\"#F1DCB6\">");
out.println(" </BODY>");
out.println("</HTML>");
}
else
{
System.out.println("b>in else>"+b);
out.println("<!DOCTYPE HTML
PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
out.println("<HTML>");
out.println(" <HEAD><TITLE>A
Servlet</TITLE></HEAD>");
out.println(" <BODY bgcolor=\"#F1DCB6\">");
out.print(" <br><br><center><font size=4
color=\"blue\"> Order Quantity Not Deleted</font></center> ");
out.println(" </BODY>");
out.println("</HTML>");
}
out.flush();
out.close();
}
***************DBConnection.java****************
160
package pharma;
import java.sql.*;
*********************web.xml******************
161
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<description>This is the description of my J2EE
component</description>
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>LoginAction</servlet-name>
<servlet-class>pharma.LoginAction</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>NewSupplier</servlet-name>
<servlet-class>pharma.NewSupplier</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>ModSuplier</servlet-name>
<servlet-class>pharma.ModSuplier</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>DelSuplier</servlet-name>
<servlet-class>pharma.DelSuplier</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
162
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>NewProduct</servlet-name>
<servlet-class>pharma.NewProduct</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>ModProduct</servlet-name>
<servlet-class>pharma.ModProduct</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>DelProduct</servlet-name>
<servlet-class>pharma.DelProduct</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>NewCustomer</servlet-name>
<servlet-class>pharma.NewCustomer</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>ModCustomer</servlet-name>
<servlet-class>pharma.ModCustomer</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
163
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>DelCustomer</servlet-name>
<servlet-class>pharma.DelCustomer</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>NewPO</servlet-name>
<servlet-class>pharma.NewPO</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>ModPO</servlet-name>
<servlet-class>pharma.ModPO</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>DelPO</servlet-name>
<servlet-class>pharma.DelPO</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>NewInv</servlet-name>
<servlet-class>pharma.NewInv</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
164
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>ModInv</servlet-name>
<servlet-class>pharma.ModInv</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>DelInv</servlet-name>
<servlet-class>pharma.DelInv</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE
component</description>
<display-name>This is the display name of my J2EE
component</display-name>
<servlet-name>UserRegistration</servlet-name>
<servlet-class>pharma.UserRegistration</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>LoginAction</servlet-name>
<url-pattern>/LoginAction</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>NewSupplier</servlet-name>
<url-pattern>/NewSupplier</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ModSuplier</servlet-name>
<url-pattern>/ModSuplier</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DelSuplier</servlet-name>
<url-pattern>/DelSuplier</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>NewProduct</servlet-name>
165
<url-pattern>/NewProduct</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ModProduct</servlet-name>
<url-pattern>/ModProduct</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DelProduct</servlet-name>
<url-pattern>/DelProduct</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>NewCustomer</servlet-name>
<url-pattern>/NewCustomer</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ModCustomer</servlet-name>
<url-pattern>/ModCustomer</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DelCustomer</servlet-name>
<url-pattern>/DelCustomer</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>NewPO</servlet-name>
<url-pattern>/NewPO</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ModPO</servlet-name>
<url-pattern>/ModPO</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DelPO</servlet-name>
<url-pattern>/DelPO</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>NewInv</servlet-name>
<url-pattern>/NewInv</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ModInv</servlet-name>
166
<url-pattern>/ModInv</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DelInv</servlet-name>
<url-pattern>/DelInv</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>UserRegistration</servlet-name>
<url-pattern>/UserRegistration</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>home.jsp</welcome-file>
</welcome-file-list>
</web-app>
System Maintenance
Maintenance:
167
The key to reducing need for maintenance, while working, if possible to do essential
tasks:
1. More accurately defining user requirement during system development.
2. Assembling better systems documentation.
3. Using more effective methods for designing, processing, login and
communicating information with project team members.
4. Making better use of existing tools and techniques.
5. Managing system-engineering process effectively.
All the above supported documents are maintained in module-wise back up.
III. Technical support in given by customer care department at developers end for
better understanding of application to the users.
CONCLUSION
The project has been appreciated by all the users in the organization.
168
It is easy to use, since it uses the GUI provided in the user dialog.
User friendly screens are provided.
The usage of software increases the efficiency, decreases the effort.
It has been efficiently employed as a Content management mechanism.
It has been thoroughly tested and implemented.
BIBLIOGRAPHY
SOFTWARE ENGINEERING
By Roger.S. Pressman
http://www.oracle.com/tools/oracle_forms.html
http://www.police.govt.nz/service/road/cviu.html
169