Vous êtes sur la page 1sur 78

1.

INTRODUCTION
1.1 COMPANY PROFILE
Accent is an embedded consultancy and software development firm headquartered in chennai
with presence in Bangalore and Trichy. Our clientele include ECI! "ortis! Alstom! Elgi Equipments!
C#AC! "ortis! IIT$%adras& to name a few.

Accent has been providing a range of quality products and services targeting industrial
automation! Biomedical! Biometrics! #ata Acquisition and Control. 'e leverage our technological
e(pertise in )eal Time! Embedded and *C hosted +ardware and ,oftware development combined
with our application domain -nowledge to provide customi.ed services.

"or the last three years Accent has been wor-ing as a bridge to improve /Industry Institute
Interaction0. Accent represents the leading companies li-e 1ational Instruments! Atmel to deliver their
technologies in colleges by setting up /Centre of E(cellence0 to bridge the technolog gap. ,tudents
benefit by getting hands one e(perience in current technology with helps in placement. College
benefits by providing better value addition to students and companies benefits by creating -nowledge
base for system integrators.
OUR PARTNERS
Accent is the preferred systems integrated and authori.ed training partner for national
instruments a leading data acquisition company. 1ational instruments are transforming the way
engineers and scientists design! prototype and deploy systems for measurement! automation and
embedded applications. Accent trains student in ab view so that the student can ta-e his /CA#0
certification valid internationally.
2
1.2 OBJECTIVE
/PHARMACY MANAGEMENT SYSTEM0 is the process! which is primarily concerned
with the management in the medical shop.
The main ob3ective of the pro3ect wor- is the development of a software pac-age in 3ava
which will automate all the shop details such as product! purchase! sales! deadline and stoc-.
The pac-age is fully menu$driven! interactive! user$friendly and attractive. The function such
as data entry! updating! retrieval and deletion can be made effectively. ,pecial care has been
provided to ensure data integrity and security.
The ma3or benefits of the pac-age include4
*urchase #etails
,toc- #etails
,ales #etails
#rugs #eadline #etails
If they have to be tightening the screens a bit! you5ll need to depend on of the software. But
many of them are licensed or shareware. Though it may be as li-e! there are also some downsides.
"or instance! user may be allowed to delete the files as they wish! there are no restrictions for
accessing control panel! and all other control panel components.
Thus! there arises a need for developing a newer system! which is capable of doing all these
functionalities and has been developed as a system entitled /*harmacy %anagement ,ystem0
6
2.SYSTEM ANALYSIS
2.1 EXISTING SYSTEM
The study of the system deals with needed to carry out preliminary investigation. The study
proposal should be produced by user department and the system study can be performed only on the
e(isting system.
,ince it gives the structure and function of the system. The methods used in the system study
were interviews! observation and discussions.
Interview are used to obtain the information regarding the e(isting system performance!
design of the screen! validation$chec-ing changes in the old system and the interviews were
conducted with user department.
Observations are used to correct the system to identify the coding schemes used! the
2.1.1 Drawbac!
There is a chance for loss of record due to mishandling.
There is a possibility for error while updating details.
)eference to the previous details is tedious.
The process of transaction was found to be very slow.
7
2.2 PROPOSED SYSTEM
The basic for the proposed system is the recognition of the need for improving the e(isting
system or procedure. The proposed system aims at overcoming the drawbac-s of the e(isting
systems.
The proposed system is coded and designed using the swing concept. The concept of 3ava
helps in providing the better security and faster access to data stored in the database! of the proposed
system.
F"a#$r"! %& 'r%'%!"( !)!#"*
Completely menu$driven and user friendly.
*rovides faster and efficient information processing.
,upports efficient data management.
+ighly fle(ible.
8alid and secure.
*rovides timely information.
Thus the proposed system maintains a huge database! which records all the details pertaining
to the agency and also -eep trac- of the details which are necessary for the organi.ation. The basis
of the system lies in capturing and analy.ing the information at various levels and effective decision
ma-ing.
9
2.+ FEASIBILITY STUDY
"easibility study is a process to chec- possibilities of system development. It is a method to
chec- various different requirements and availability of financial : technical resources.
2.+.1 Ec%,%*-ca. F"a!-b-.-#)
In economical feasibility! analysis of the cost of the system is carried out. The system
should be only developed if it is going to give returned the current manual system user can get the
price only by purchasing the newspapers. In addition if user wants to see archives of particular
equity then user has to refer to all the old newspapers. "or research reports user has to buy another
maga.ine. ,o Instead of buying no of maga.ines user has to 3ust go online and with a single clic-
user can get whatever information user wants. ,o pro3ect of online share news passes the test of
economical feasibility.
2.+.2. O'"ra#-%,a. F"a!-b-.-#)
Once the system is designed there must be trained and e(pert operator. If there are not
trained they should given training according to the needs of the system. "rom the user5s
perspective our system fully operational feasible as it 3ust requires some -nowledge of computer.
Operators only need to add daily prices of various equities and there are enough validations
available so operator does not require any special technical -nowledge. ,o system also passes the
test of operational feasibility.
2.+.+. T"c/,-ca. F"a!-b-.-#)
It is basically used to see e(isting computer! hardware and software etc! whether it is
sufficient or additional equipments are required. %inimum ,ystem )equirement is such that it can
be affordable by of the user who is having computer.
;
+.SYSTEM SPECIFICATION
+.1 HARD0ARE RE1UIREMENTS
*rocessor 4 *entium I8
)A% 4 26< %B
+ard dis- 4 2= >B
%onitor 4 2;5 8>A Color
?eyboard 4 ,tandard 2=< -eyboard
%ouse 4 ogitech mouse
+.2 SOFT0ARE RE1UIREMENTS
Operating ,ystem 4 'indows @*
Environment 4 A#? 2.B
"ront End 4 Aava
Bac- End 4 %C,D ,erver;.=
B
2.SOFT0ARE DESCRIPTION
2.1 FRONT END
I,#r%($c#-%, %& Ja3a
Aava is a programming language originally developed by Aames >osling at ,un
%icrosystems Ewhich is now a subsidiary of Oracle CorporationF and released in 2GG; as a core
component of ,un %icrosystemsH Aava platform. The language derives much of its synta( from C
and CII but has a simpler ob3ect model and fewer low$level facilities. Aava applications are
typically compiled to byte code Eclass fileF that can run on any Aava 8irtual %achine EA8%F
regardless of computer architecture. Aava is general$purpose! concurrent! class$based! and ob3ect$
oriented! and is specifically designed to have as few implementation dependencies as possible. It is
intended to let application developers Jwrite once! run anywhereJ. Aava is considered by many as
one of the most influential programming languages of the 6=th century! and widely used from
application software to web application.
The original and reference implementation Aava compilers! virtual machines! and class
libraries were developed by ,un from 2GG;. As of %ay 6==K! in compliance with the specifications
of the Aava Community *rocess! ,un relicensed most of their Aava technologies under the >1L
>eneral *ublic icense. Others have also developed alternative implementations of these ,un
technologies! such as the >1L Compiler for Aava and >1L Class path.
K
Ja3a P.a#&%r*
One characteristic of Aava is portability! which means that computer programs written in the
Aava language must run similarly on any supported hardwareMoperating$system platform. This is
achieved by compiling the Aava language code to an intermediate representation called Aava byte
code! instead of directly to platform$specific machine code.
Aava byte code instructions are analogous to machine code! but are intended to be interpreted
by a virtual machine E8%F written specifically for the host hardware.
A ma3or benefit of using byte code is porting. +owever! the overhead of interpretation means
that interpreted programs almost always run more slowly than programs compiled to native
e(ecutables would! and Aava suffered a reputation for poor performance. This gap has been
narrowed by a number of optimi.ation techniques introduced in the more recent A8%
implementations.
I*'."*",#a#-%,!
,un %icrosystems officially licenses the Aava ,tandard Edition platform for inu(! %ac O,
@ and ,olaris. Although in the past ,un has licensed Aava to %icrosoft! the license has e(pired and
has not been renewed. Through a networ- of third$party vendors and licensees! alternative Aava
environments are available for these and other platforms.
,unHs trademar- license for usage of the Aava brand insists that all implementations be
JcompatibleJ. This resulted in a legal dispute with %icrosoft after ,un claimed that the %icrosoft
implementation did not support )%I or A1I and had added platform$specific features of their own.
,un sued in 2GGK! and in 6==2 won a settlement of N6= million as well as a court order enforcing the
terms of the license from ,un.O67P As a result! %icrosoft no longer ships Aava with 'indows! and in
recent versions of 'indows! Internet E(plorer cannot support Aava applets without a third$party.
<
,un! and others! have made available free Aava run$time systems for those and other versions
of 'indows.
*latform$independent Aava is essential to the Aava EE strategy! and an even more rigorous
validation is required to certify an implementation. This environment enables portable server$side
applications! such as 'eb services! Aava ,ervlets! and Enterprise AavaBeans! as well as with
embedded systems based on O,>i! using Embedded Aava environments. Through the new >lass"ish
pro3ect! ,un is wor-ing to create a fully functional! unified open source implementation of the Aava
EE technologies.
,un also distributes a superset of the A)E called the Aava #evelopment ?it Ecommonly
-nown as the A#?F! which includes development tools such as the Aava compiler! Aavadoc! Aar and
debugger.
P"r&%r*a,c"
*rograms written in Aava have a reputation for being slower and requiring more memory
than those written in some other languages. +owever! Aava programsH e(ecution speed improved
significantly with the introduction of Aust$in$time compilation in 2GGKM2GG< for Aava 2.2! the
addition of language features supporting better code analysis Esuch as inner classes! ,tringBuffer
class! optional assertions! etc.F! and optimi.ations in the Aava 8irtual %achine itself! such as +ot,pot
becoming the default for ,unHs A8% in 6===.
To boost even further the speed performances that can be achieved using the Aava language
,ystroni( made A,ti a microcontroller based on the aAile ,ystems line of embedded Aava processors.
G
A$#%*a#-c M"*%r) Ma,a4"*",#
Aava uses an automatic garbage collector to manage memory in the ob3ect lifecycle. The
programmer determines when ob3ects are created! and the Aava runtime is responsible for recovering
the memory once ob3ects are no longer in use. Once no references to an ob3ect remain! the
unreachable memory becomes eligible to be freed automatically by the garbage collector. ,omething
similar to a memory lea- may still occur if a programmerHs code holds a reference to an ob3ect that is
no longer needed! typically when ob3ects that are no longer needed are stored in containers that are
still in use. If methods for a none(istent ob3ect are called! a Jnull pointer e(ceptionJ is thrown.
One of the ideas behind AavaHs automatic memory management model is that programmers
be spared the burden of having to perform manual memory management. In some languages
memory for the creation of ob3ects is implicitly allocated on the stac-! or e(plicitly allocated and
deallocated from the heap. Either way! the responsibility of managing memory resides with the
programmer. If the program does not deallocate an ob3ect! a memory lea- occurs. If the program
attempts to access or deallocate memory that has already been deallocated.
The result is undefined and difficult to predict! and the program is li-ely to become unstable
andMor crash. This can be partially remedied by the use of smart pointers! but these add overhead and
comple(ity. 1ote that garbage collection does not prevent HlogicalH memory lea-s! i.e. those where
the memory is still referenced but never used.
>arbage collection may happen at any time. Ideally! it will occur when a program is idle. It is
guaranteed to be triggered if there is insufficient free memory on the heap to allocate a new ob3ectQ
this can cause a program to stall momentarily. E(plicit memory management is not possible in Aava.
2=
Aava does not support CMCII style pointer arithmetic! where ob3ect addresses and unsigned
integers Eusually long integersF can be used interchangeably. This allows the garbage collector to
relocate referenced ob3ects! and ensures type safety and security. As in CII and some other ob3ect$
oriented languages! variables of AavaHs primitive data types are not ob3ects. 8alues of primitive types
are either stored directly in fields Efor ob3ectsF or on the stac- Efor methodsF rather than on the heap!
as commonly true for ob3ects Ebut see Escape analysisF. This was a conscious decision by AavaHs
designers for performance reasons. Because of this! Aava was not considered to be a pure ob3ect$
oriented programming language. +owever! as of Aava ;.=! auto bo(ing enables programmers to
proceed as if primitive types are instances of their wrapper classes.
Pr-*ar) G%a.!
There were five primary goals in the creation of the Aava language4
2. It should use the ob3ect$oriented programming methodology.
6. It should allow the same program to be e(ecuted on multiple operating systems.
7. It should contain built$in support for using computer networ-s.
9. It should be designed to e(ecute code from remote sources securely.
;. It should be easy to use by selecting what was considered the good parts of other
ob3ect$oriented languages.
To achieve the goals of networ-ing support and remote code e(ecution! Aava programmers
sometimes find it necessary to use e(tensions such as CO)BA! Internet Communications Engine.
2.2 FEATURES
22
Ja3a a''."#
A Aava applet is an applet delivered in the form of Aava byte code. Aava applets can run in a
'eb browser using a Aava 8irtual %achine EA8%F! or in ,unHs Applet 8iewer! a stand$alone tool for
testing applets. Aava applets were introduced in the first version of the Aava language in 2GG;. Aava
applets are usually written in the Aava programming language.
Applets are used to provide interactive features to web applications that cannot be provided
by +T%. ,ince AavaHs bytecode is platform independent! browsers for many platforms! including
'indows! L1I@! %ac O, and inu(! can e(ecute Aava applets. This has the advantage of running a
Aava applet in offline mode without the need for Internet browser software. Aava applets are e(ecuted
in a sandbo( by most web browsers! preventing them from accessing local data. The code of the
applet is downloaded from a web server and the browser either embeds the applet into a web page or
opens a new window showing the appletHs user interface.
Ja3a S"r3."#
The Aava ,ervlet A*I allows a software developer to add dynamic content to a 'eb server
using the Aava platform. The generated content is commonly +T%! but may be other data such as
@%. ,ervlets are the Aava counterpart to non$Aava dynamic 'eb content technologies such as C>I
and A,*.1ET. ,ervlets can maintain state across many server transactions by using +TT* coo-ies!
session variables or L) rewriting.
Ja3a S"r3"r Pa4"!
Aava ,erver *ages EA,*F is a Aava technology that allows software developers to dynamically
generate +T%! @% or other types of documents in response to a 'eb client request. The
technology allows Aava code and certain pre$defined actions to be embedded into static content.
JAava ,erver *agesJ is a technology released by ,un.
The A,* synta( adds additional @%$li-e tags! called A,* actions! to be used to invo-e built$
in functionality. Additionally! the technology allows for the creation of A,* tag libraries that act as
26
e(tensions to the standard +T% or @% tags. Tag libraries provide a platform independent way of
e(tending the capabilities of a 'eb server.
A,*s are compiled into Aava ,ervlets by a A,* compiler. A A,* compiler may generate a
,ervlet in Aava code that is then compiled by the Aava compiler! or it may generate byte code for the
,ervlet directly.
Ja3a S"r3"r Fac"!
It simplifies development by providing a component$centric approach to developing Aava
'eb user interfaces. Aava ,erver "aces also appeals to a diverse audience of AavaM'eb developers.
/Corporate developers0 and 'eb designers will find that A," development can be as simple
as dragging and dropping user interface ELIF components onto a page! while Jsystems developersJ
will find that the rich and robust A," A*I offers them unsurpassed power and programming
fle(ibility. A," also ensures that applications are well designed with greater maintainability by
integrating the well established %odel$8iew$Controller E%8CF design pattern into itHs architecture.
"inally! since A," is a Aava standard developed through Aava Community *rocess EAC*F!
development tools vendors are fully empowered to provide easy to use! visual! and productive
develop environments for Aava ,erver "aces.
P.a#&%r* I,("'",(",c"
One characteristic! platform independence! means that programs written in the Aava language
must run similarly on any supported hardwareMoperating$system platform. One should be able to
write a program once! compile it once! and run it anywhere.
B)#" c%("
27
%ost Aava compilers achieve this by compiling the Aava language code JhalfwayJ to byte
code Especifically Aava byte codeFRsimplified machine instructions specific to the Aava platform.
The code is then run on a virtual machine E8%F! a program written in native code on the host
hardware that interprets and e(ecutes generic Aava byte code. In some A8% versions! byte code can
also be compiled to native code! resulting in faster e(ecution. "urther! standardi.ed libraries are
provided to allow access to features of the host machines Esuch as graphics! threading and
networ-ingF in unified ways.
A$#%*a#-c Garba4" C%.."c#-%,
One of the ideas behind AavaHs automatic memory management model is that programmers
be spared the burden of having to perform manual memory management. In some languages the
programmer allocates memory for the creation of ob3ects stored on the heap and the responsibility of
later deallocating that memory thus resides with the programmer. If the programmer forgets to
deallocating memory or writes code that fails to do so! a memory lea- occurs and the program can
consume an arbitrarily large amount of memory. Additionally! if the program attempts to deallocate
the region of memory more than once! the result is undefined and the program may become unstable
and may crash. "inally! in non$garbage collected environments! there is a certain degree of overhead
and comple(ity of user$code to trac- and finali.e allocations.
In Aava! this potential problem is avoided by automatic garbage collection. The programmer
determines when ob3ects are created! and the Aava runtime is responsible for managing the ob3ectHs
lifecycle. The program or other ob3ects can reference an ob3ect by holding a reference to it Ewhich!
from a low$level point of view! is its address on the heapF. 'hen no references to an ob3ect remain!
the Aava garbage collector automatically deletes the unreachable ob3ect! freeing memory and
preventing a memory lea-. %emory lea-s may still occur if a programmerHs code holds a reference
to an ob3ect that is no longer neededRin other words! they can still occur but at higher conceptual
levels.
5.PROJECT DESCRIPTION
29
5.1 PROBLEM DEFINITION
In this /*+A)%ACC %A1A>E%E1T ,C,TE%0 system should be perform under the
process of inventory controls. The process having the login for the administrator to perform the
process. Each and every admin having separate username and password for login purpose. The front
page having the few options.
The administrator want to create new account means select the menu item and perform it. If
the user want to see the stoc-! purchase and other related details means select the menu options.
In this is based on the Information rules li-e never before and the Internet is the enabler of
today5s informationQ it5s li-e the nervous system of a world in the information age. It is seething
with information of all types! in many languages! at many levels! serving the needs of diverse
populations! driving business! dispensing entertainment! creating a never$before$imagined
communication channels.
Administrator may be able to choose to add a limited access user account for general users
but that may not be sufficient where people may wor- more than time slot. Thus! there arises a need
for developing a newer system! which is capable of doing all these functionalities and has been
developed as a system entitled /*harmacy %anagement ,ystem0.
2;
5.2 OVERVIE0 OF THE PROJECT
The main advantage of the pro3ect is to avoid the time coming process. Because the process
should be having the clear user friendly performance. There is an initial page containing login page.
The administrator having different user name and password. Then the entry process having some
selection options.
The initial selection option used to perform the new user creation process. Then the user or
admin needs to view the purchase details select the purchase details option. The same time stoc-
details should be very useful to avoiding the time consuming process.
The stoc- details should be performing it correctly means that can be helpful to perform
the purchase and order details. Because if the stoc- details are having the lin-ing process in
purchase and order.
The purchase and sales details are having the reduce and adding process. The stoc- details
process should be used to reduce the sales products in the list. It will help to ordering the products.
Then the final one is record process. It will mainly used for submitting the resultant process details.
It is difficult to maintain a pc that is used many different users S particularly a pc at a Internet
cafT or in a firm where Internet is share through local Intranet or else where. *eople can easily mess
with important system filesQ download files! install unneeded software! access e(ceeding their time
limit etc. Administrator may be able to choose to add a limited access user account for general users
but that may not be sufficient where people may wor- more than time slot.
2B
5.+ MODULE DESCRIPTION
5.+.1 M%($."!
/*+A)%ACC %A1A>E%E1T ,C,TE%0 consists of following modules.
*urchase #etails
,toc- #etails
,ales #etails
#rugs #eadline #etails
P$rc/a!" D"#a-.!
*urchase detail is a module used to update the details of the purchase detailsQ it has the
quantity! and their required quality.
S#%c D"#a-.!
,toc- detail is a module used to update the stoc- available in the organi.ation that should be
maintained for purchase detailed options. According to this stoc- order may be varied.
Sa."! D"#a-.!
,ales detail is a module used to store the details of the salesQ it should be conveyed to the
required sold details are with reference to the given data such as name! number.
Dr$4! D"a(.-," D"#a-.!
#rugs deadline detail is a module used to update the #rugs #eadline detailsQ this will let the
user to -now the e(piry date of the medicines.

2K
5.2 DATA FLO0 DIAGRAM
L"3". 6
F-4 5.2.1 Da#a F.%w D-a4ra* &%r L%4-,
L"3". 1
F-4 5.2.2 Da#a F.%w D-a4ra* &%r Ma-,
2<
Admin
Lser
ogin
*urchase
#etails
,toc-
#etails
,ales
#etails
*urdetails ,toc#etails ,al#etails
R"'%r#
)eport
5.5 E7R DIAGRAM
F-4 5.5.1 E7R D-a4ra* &%r Ma-,
2G
*urchase #etails
1ame Address
,ales #etails
*roduct
Duantity
#epletio
n
)e$
Apearance
,toc-
#etails
#rugs #eadline
#etails
*roduct Duantity
5.8 DATABASE DESIGN
5.8.1 L%4-,
Tab." Na*"9 L%4-,
FIELD NAME TYPE SI:E DESCRIPTION
Lsr1ame 8archar 2; Lser 1ame
*wd 8archar 2; *assword
5.8.2 P$rc/a!" D"#a-.!
Tab." Na*"9 P$rc/a!"
FIELD NAME TYPE SI:E DESCRIPTION
%edId Int 7 %edicine Id
%edi1ame 8archar 2; %edicine 1ame
Dty Int 7 Duantity
#ate 8archar 2; #ate
E(p#ate 8archar 2; E(piry #ate
*rice ong Int < *rice
TotalAmt ong Int < Total Amount
5.8.+ S#%c D"#a-.!
6=
Tab." Na*"9 S#%c
FIELD NAME TYPE SI:E DESCRIPTION
%edId Int 7 %edicine Id
%edi1ame 8archar 2; %edicine 1ame
Dty Int 7 Duantity
5.8.2 Sa."! D"#a-.!
Tab." Na*"9 Sa."!
FIELD NAME TYPE SI:E DESCRIPTION
#ate 8archar 2; #ate
%edId Int 7 %edicine Id
OrdId Int 7 Order Id
%ed1ame 8archar 2; %edicine 1ame
Dty Int 7 Duantity
E(p#ate 8archar 2; E(piry #ate
*rice ong Int < *rice
TotalAmt ong Int < Total Amount
5.8.5 Dr$4! D"a(.-," D"#a-.!
62
Tab." Na*"9 D"a(.-,"
FIELD NAME TYPE SI:E DESCRIPTION
%edId Int 7 %edicine Id
%ed1ame 8archar 2; %edicine 1ame
Duantity Int 2; Duantity
E(p#ate 8archar 2; E(piry #ate
66
5.; INPUT DESIGN
Input design is the process of converting user$originated inputs to a computer understandable
format. Input design is one of the most e(pensive phases of the operation of computeri.ed system
and is often the ma3or problem of a system. A large number of problems with a system can usually
be trac-ed bac-s to fault input design and method. Every moment of input design should be
analy.ed and designed with utmost care.
Input data of a system may not be necessarily is raw data captured in the system from
scratch. These can also be the output of another system or subsystem. The design of input covers all
the phases of input from the creation of initial data to actual entering of the data to the system for
processing. The design of inputs involves identifying the data needed! specifying the characteristics
of each data item! capturing and preparing data for computer processing and ensuring correctness of
data.
Input design is the process of converting user$originated inputs to a computer$based format.
Input design is one of the most e(pensive phases of the operation of computeri.ed system and is
often the ma3or problem of a system.
Any ambiguity in input leads to a total fault in output. The goal of designing the input data is
to ma-e data entry as easy and error free as possible. In the pro3ect! the schedule selection page is
made with several easy to use options.
F"a#$r"!
%inimi.e the data entry error
Information shows in the label fields are very efficient
1ecessary information will guide the user to non computeri.ed user also.
67
C%(" D"!-4,
The code design should be such that with less amount of coding we can achieve more results.
The speed of the system will be more if the coding is less. 'hether the data in the system is usable
and readable by the system is depending on the coding.
#esigning the code depends on the programming language chosen and mostly they are not
specified while outlining the design of the system. The system uses 3ava to develop its code. The
goal of coding is to translate the design of the system in to code in a given programming language.
The aim of the code design is to implement the system in best possible manner.
In the pro3ect! the coding is being done such that proper validations are made to get the
perfect input. 1o error inputs are accepted. In addition care is ta-en such that the data integrity and
referential integrity is not violated in the database.
Chec-ing the username and password! non$acceptance of empty username and password is
made properly. In addition! coding is designed such that concurrency avoidance of accessing the
database! limited user access to the table is made perfect.

5.< OUTPUT DESIGN
The output data design is made in such a way that it is easily understandable to the data entry
operators by using the meaningful and appropriate messages.
'hen designing output! system analyst accomplishes the following
#etermine the information to present.
#ecide whether to display or view the information and select the output medium.
Arrange the present information format.
#ecide how to distribute the output intended receipts.

69
8.SYSTEM TESTING
8.1 UNIT TESTING
Instead of testing the system as a whole unit testing focuses on the modules that ma-e up the
system. Each module is ta-en up individually and tested for correctness in coding and logic. Error
resulting from interaction of modules is initially avoided.
The advantages of unit testing are
,i.e of module is quite small that errors can easily are located.
Confusing interactions pf multiple errors in wide different parts of the
software eliminated.
%odules level testing can be e(haustive.
8.2 ACCEPTANCE TESTING
Acceptance testing is a final stage of testing that is performed on a system prior to the system
being delivered to a live environment. ,ystems sub3ected to acceptance testing might include such
deliverables as a software system or a mechanical hardware system. Acceptance tests are generally
performed as Jblac- bo(J tests. Blac- bo( testing means that the tester uses specified inputs into the
system and verifies that the resulting outputs are correct! without -nowledge of the systemHs internal
wor-ings.
Acceptance testing is often made up of many individual Jtest casesJ! which are individually
documented test scenarios. Each test case that forms part of the overall acceptance test will usually
document what the input to the system consists of! and what the e(pected output should be. If the
actual output is as e(pected! the test case is said to return a successful or positive result.
6;
8.+ TEST CASES
A test case in software engineering is a set of conditions or variables under which a tester
will determine whether an application or software system is wor-ing correctly.
A specific e(ecutable test that e(amines all aspects including inputs and outputs of a system
and then provides a detailed description of the steps that should be ta-en! the results that should be
achieved! and other elements that should be identified. ,teps e(plained in a test case include all
details even if it they are assumed to be common -nowledge. Test cases are used as a technical
e(planation and reference guide for systems.
The advantages of test cases are
?eep record of the test performed on application so that it can be reused.
)eview of test cases to chec- for the correct testing of application based
on the input data! conditions! actual result of test.
>ives an idea of how much testing is covered and time required to test the
remaining functionalities.
If out of time then can pic- the ma3or functionality test cases to
perform testing at faster phase.
6B
;.SYSTEM IMPLEMENTATION
Implementation is the most crucial stage in achieving a successful system and giving the
user5s confidence that the new system is wor-able and effective. Implementation of a modified
application to replace an e(isting one. This type of conversation is relatively easy to handle! provide
there are no ma3or changes in the system.
Each program is tested individually at the time of development using the data and has
verified that this program lin-ed together in the way specified in the programs specification! the
computer system and its environment is tested to the satisfaction of the user. The system that has
been developed is accepted and proved to be satisfactory for the user. And so the system is going to
be implemented very soon. A simple operating procedure is included so that the user can understand
the different functions clearly and quic-ly.
Initially as a first step the e(ecutable form of the application is to be created and loaded in
the common server machine which is accessible to all the user and the server is to be connected to a
networ-. The final stage is to document the entire system which provides components and the
operating procedures of the system.
6K
<.CONCLUSION = FUTURE ENHANCEMENTS
<.1 CONCLUSION
The pro3ect wor- entitled /*+A)%ACC %A1A>E%E1T ,C,TE%0 in hardware
,hop describes so far has designed! tested and document completely. The pac-age has been
developed to overcome the problems with the e(isting system. The software produced is so useful
that the system efficiency provides the required information at a time! regarding the admission
system.
The software is so attractive and user friendly. It is high interactive too. It is trying at most to
avoid typing by the user. The pac-age automates the admission department. The software appears
more fle(ible! since it is completely menu$driven. It maintains data consistency. The system reduces
wor- loaded and produces adequate and timely information as and when needed.
<.2 FUTURE ENHANCEMENTS
This phase is mainly used in demonstrates the methods that are used in maintains the
proposed system. It should be -ept in mind that the developed system should be easy to maintain
there by giving the user some conditions that they maintain the system to serve.
After computeri.ed it is very easy to maintain the above difficulties it is very helpful to the
according to maintain the process in effective manner.
,cope of the future enhancement is the pro3ect implemented an online. Then to search the
information is return at the same time. The pro3ect can be outsourcing to any technology.
6<
>.APPENDICES
>.1 SOURCE CODE
L%4-,.?a3a
import 3ava(.swing.UQ
import 3ava.awt.UQ
import 3ava.awt.event.UQ
import 3ava.sql.UQ
public class login e(tends A"rame implements Actionistener
V
A*anel butpanWnew A*anelEFQ
A*anel logpanWnew A*anelEFQ
A*anel selpanWnew A*anelEFQ
Aabel unWnew AabelEJogin$I#JFQ
ATe(t"ield usrWnew ATe(t"ieldE2=FQ
Aabel pdWnew AabelEJ*asswordJFQ
A*assword"ield pwdWnew A*assword"ieldE2=FQ
AButton resetWnew AButtonEJ)E,ETJFQ
AButton e(tWnew AButtonEJE@ITJFQ
AButton registWnew AButtonEJO?JFQ
AButton logWnew AButtonEJJFQ
ImageIcon imWnew ImageIconEJpills.3pgJFQ
Aabel 3bWnew AabelEimFQ
Button>roup bgWnew Button>roupEFQ
Connection clogQ
,tatement stQ
*rocess pQ
6G
int flagW=Q
int iW=Q
public static void mainE,tring argsOPF
V
new loginEFQ
X
public loginEF
V
getContent*aneEF.addE3bFQ
getContent*aneEF.addEbutpan!Borderayout.,OLT+FQ
getContent*aneEF.addElogpan!Borderayout.1O)T+FQ
getContent*aneEF.addEselpan!Borderayout.'E,TFQ
logpan.addEunFQ
logpan.addEusrFQ
logpan.addEpdFQ
logpan.addEpwdFQ
logpan.addEpdFQ
butpan.addEresetFQ
butpan.addEe(tFQ
butpan.addEregistFQ
set8isibleEtrueFQ
set,i.eE9==!9==FQ
set#efaultCloseOperationEE@ITYO1YCO,EFQ
pac-EFQ
reset.addActionistenerEthisFQ
e(t.addActionistenerEthisFQ
regist.addActionistenerEthisFQ
X
public void action*erformedEActionEvent aeF
V
7=
Ob3ect sourceWae.get,ourceEFQ
ifEsourceWWresetF
V
usr.setTe(tEJJFQ
pwd.setTe(tEJJFQ
X
else ifEsourceWWe(tF
V
,ystem.e(itE=FQ
X
else ifEsourceWWregistF
V
try
V
Class.for1ameEJcom.mysql.3dbc.#riverJFQ
clogW#river%anager.getConnectionEJ3dbc4mysql4MMlocalhostMpharJ!JrootJ!JrootJFQ
stWclog.create,tatementEFQ
)esult,et rsog2W st.e(ecuteDueryE
Jselect U from login where usernameWHJIusr.getTe(tEFIJHJFQ
whileErsog2.ne(tEFF
V
boolean b2Wrsog2.get,tringE2F.equalsEE,tringFusr.getTe(tEFFQ
boolean b6Wrsog2.get,tringE6F.equalsEE,tringFpwd.getTe(tEFFQ
ifEb2 :: b6F
V
try
V
MMset8isibleEfalseFQ
)untime rtmW)untime.get)untimeEFQ
pWrtm.e(ecEJ3ava *harmacyJFQ
72
X
catchEE(ception eeF
V
X
X
else
V
AOption*ane.show%essage#ialogEnull!JInvalid EntryJFQ
X
X
X
catchEE(ception e(cpF
V
AOption*ane.show%essage#ialogEnull!e(cpFQ
,ystem.e(itE=FQ
X
X
X
X
P/ar*ac).?a3a
import 3ava.awt.UQ
import 3ava(.swing.UQ
import 3ava.awt.event.UQ
public class *harmacy e(tends A"rame implements Actionistener V
*rocess *Q
public *harmacyEF V
initComponentsEFQ
76
X
private void initComponentsEF V
panel2 W new A*anelEFQ
label2 W new AabelEFQ
button2 W new AButtonEFQ
button6 W new AButtonEFQ
button7 W new AButtonEFQ
button9 W new AButtonEFQ
button; W new AButtonEFQ
label6 W new AabelEFQ
button2.addActionistenerEthisFQ
button6.addActionistenerEthisFQ
button7.addActionistenerEthisFQ
button9.addActionistenerEthisFQ
button;.addActionistenerEthisFQ
MMWWWWWWWW this WWWWWWWW
setTitleEJ*+A)%ACC %A1A>E%E1T ,C,TE%$%E1L *A>EJFQ
Container content*ane W getContent*aneEFQ
content*ane.setayoutEnullFQ
MMWWWWWWWW panel2 WWWWWWWW
V
MM A"orm#esigner evaluation mar-
panel2.setBorderEnew 3ava(.swing.border.CompoundBorderE
new 3ava(.swing.border.TitledBorderEnew
3ava(.swing.border.EmptyBorderE=! =! =! =F!
JJ! 3ava(.swing.border.TitledBorder.CE1TE)!
77
3ava(.swing.border.TitledBorder.BOTTO%! new
3ava.awt."ontEJ#ialogJ! 3ava.awt."ont.BO#! 26F!
3ava.awt.Color.redF! panel2.getBorderEFFFQ
panel2.add*ropertyChangeistenerEnew 3ava.beans.*ropertyChangeistenerEFVpublic void
propertyChangeE3ava.beans.*ropertyChangeEvent eF
VifEJborderJ.equalsEe.get*roperty1ameEFFFthrow new )untimeE(ceptionEFQXXFQ
panel2.setayoutEnullFQ
MM$$$$ label2 $$$$
label2.setTe(tEJ*+A)%ACC %A1A>E%E1T ,C,TE%JFQ
label2.set"oregroundEnew ColorE=! =! 2=6FFQ
label2.set"ontEnew "ontEJ#ialogJ! "ont.BO#! 2BFFQ
panel2.addElabel2FQ
label2.setBoundsEnew )ectangleEnew *ointE6<=! 6=F!
label2.get*referred,i.eEFFFQ
MM$$$$ button2 $$$$
button2.setTe(tEJ*L)C+A,E #ETAI,JFQ
panel2.addEbutton2FQ
button2.setBoundsE6<=! <;! 29;! button2.get*referred,i.eEF.heightFQ
MM$$$$ button6 $$$$
button6.setTe(tEJ,TOC?,JFQ
panel2.addEbutton6FQ
button6.setBoundsE6<=! 27;! 2;=! button6.get*referred,i.eEF.heightFQ
MM$$$$ button7 $$$$
button7.setTe(tEJ,AE, )ECO)#,JFQ
panel2.addEbutton7FQ
button7.setBoundsE6<=! 2<;! 2;=! button7.get*referred,i.eEF.heightFQ
79
MM$$$$ button9 $$$$
button9.setTe(tEJ#)L>, #EA#I1E,JFQ
panel2.addEbutton9FQ
button9.setBoundsE6<=! 69=! 2;=! button9.get*referred,i.eEF.heightFQ
MM$$$$ button; $$$$
button;.setTe(tEJ E@IT JFQ
panel2.addEbutton;FQ
button;.setBoundsEnew )ectangleEnew *ointE6<=! 6<;F!
button;.get*referred,i.eEFFFQ
MM$$$$ label6 $$$$
MMlabel6.setIconEnew ImageIconEJpills.A*>JFFQ
panel2.addElabel6FQ
label6.setBoundsEnew )ectangleEnew *ointE;;! 2=;F!
label6.get*referred,i.eEFFFQ
V MM compute preferred si.e
#imension preferred,i.e W new #imensionEFQ
forEint i W =Q i Z panel2.getComponentCountEFQ iIIF V
)ectangle bounds W panel2.getComponentEiF.getBoundsEFQ
preferred,i.e.width W %ath.ma(Ebounds.( I bounds.width!
preferred,i.e.widthFQ
preferred,i.e.height W %ath.ma(Ebounds.y I bounds.height!
preferred,i.e.heightFQ
X
Insets insets W panel2.getInsetsEFQ
preferred,i.e.width IW insets.rightQ
preferred,i.e.height IW insets.bottomQ
panel2.set%inimum,i.eEpreferred,i.eFQ
panel2.set*referred,i.eEpreferred,i.eFQ
7;
X
X
content*ane.addEpanel2FQ
panel2.setBoundsE;! 2=! B<;! 7<=FQ
V MM compute preferred si.e
#imension preferred,i.e W new #imensionEFQ
forEint i W =Q i Z content*ane.getComponentCountEFQ iIIF V
)ectangle bounds W content*ane.getComponentEiF.getBoundsEFQ
preferred,i.e.width W %ath.ma(Ebounds.( I bounds.width!
preferred,i.e.widthFQ
preferred,i.e.height W %ath.ma(Ebounds.y I bounds.height!
preferred,i.e.heightFQ
X
Insets insets W content*ane.getInsetsEFQ
preferred,i.e.width IW insets.rightQ
preferred,i.e.height IW insets.bottomQ
content*ane.set%inimum,i.eEpreferred,i.eFQ
content*ane.set*referred,i.eEpreferred,i.eFQ
X
set8isibleEtrueFQ
pac-EFQ
setocation)elativeToEgetOwnerEFFQ
MM A"orm#esigner $ End of component initiali.ation MM>E1$E1#4initComponents
X
private A*anel panel2Q
private Aabel label2Q
private AButton button2Q
private AButton button6Q
private AButton button7Q
7B
private AButton button9Q
private AButton button;Q
private Aabel label6Q
MM A"orm#esigner $ End of variables declaration MM>E1$E1#4variables
public static void mainE,tring argsOPF
V
new *harmacyEFQ
X
public void action*erformedEActionEvent aeF
V
Ob3ect ob3Wae.get,ourceEFQ
ifEob3WWbutton2F
V
try
V
)untime rtmW)untime.get)untimeEFQ
*Wrtm.e(ecEJ3ava *%,,wingJFQ
X
catchEE(ception e(pF
V
AOption*ane.show%essage#ialogEnull!e(pFQ
X
X
else ifEob3WWbutton6F
V try
V
)untime rtmW)untime.get)untimeEFQ
*Wrtm.e(ecEJ3ava *%,,wing2JFQ
X
7K
catchEE(ception e(pF
V
AOption*ane.show%essage#ialogEnull!e(pFQ
X
X
else ifEob3WWbutton7F
V
try
V
)untime rtmW)untime.get)untimeEFQ
*Wrtm.e(ecEJ3ava *%,wing6JFQ
X
catchEE(ception e(pF
V
AOption*ane.show%essage#ialogEnull!e(pFQ
X
X
else ifEob3WWbutton9F
V
try
V
)untime rtmW)untime.get)untimeEFQ
*Wrtm.e(ecEJ3ava *%,,wing7JFQ
X
catchEE(ception e(pF
V
AOption*ane.show%essage#ialogEnull!e(pFQ
X
X
7<
else ifEob3WWbutton;F
V,ystem.e(itE=FQ
X
X
X
P/ar*ac).?a3a
import 3ava.awt.UQ
import 3ava(.swing.UQ
import 3ava.awt.event.UQ
public class *harmacy e(tends A"rame implements Actionistener V
*rocess *Q
public *harmacyEF V
initComponentsEFQ
X
private void initComponentsEF V
panel2 W new A*anelEFQ
label2 W new AabelEFQ
button2 W new AButtonEFQ
button6 W new AButtonEFQ
button7 W new AButtonEFQ
button9 W new AButtonEFQ
button; W new AButtonEFQ
label6 W new AabelEFQ
button2.addActionistenerEthisFQ
button6.addActionistenerEthisFQ
button7.addActionistenerEthisFQ
7G
button9.addActionistenerEthisFQ
button;.addActionistenerEthisFQ
MMWWWWWWWW this WWWWWWWW
setTitleEJ*+A)%ACC %A1A>E%E1T ,C,TE%$%E1L *A>EJFQ
Container content*ane W getContent*aneEFQ
content*ane.setayoutEnullFQ
MMWWWWWWWW panel2 WWWWWWWW
V
MM A"orm#esigner evaluation mar-
panel2.setBorderEnew 3ava(.swing.border.CompoundBorderE
new 3ava(.swing.border.TitledBorderEnew
3ava(.swing.border.EmptyBorderE=! =! =! =F!
JJ! 3ava(.swing.border.TitledBorder.CE1TE)!
3ava(.swing.border.TitledBorder.BOTTO%! new
3ava.awt."ontEJ#ialogJ! 3ava.awt."ont.BO#! 26F!
3ava.awt.Color.redF! panel2.getBorderEFFFQ
panel2.add*ropertyChangeistenerEnew 3ava.beans.*ropertyChangeistenerEFVpublic void
propertyChangeE3ava.beans.*ropertyChangeEvent eF
VifEJborderJ.equalsEe.get*roperty1ameEFFFthrow new )untimeE(ceptionEFQXXFQ
panel2.setayoutEnullFQ
MM$$$$ label2 $$$$
label2.setTe(tEJ*+A)%ACC %A1A>E%E1T ,C,TE%JFQ
label2.set"oregroundEnew ColorE=! =! 2=6FFQ
label2.set"ontEnew "ontEJ#ialogJ! "ont.BO#! 2BFFQ
panel2.addElabel2FQ
9=
label2.setBoundsEnew )ectangleEnew *ointE6<=! 6=F!
label2.get*referred,i.eEFFFQ
MM$$$$ button2 $$$$
button2.setTe(tEJ*L)C+A,E #ETAI,JFQ
panel2.addEbutton2FQ
button2.setBoundsE6<=! <;! 29;! button2.get*referred,i.eEF.heightFQ
MM$$$$ button6 $$$$
button6.setTe(tEJ,TOC?,JFQ
panel2.addEbutton6FQ
button6.setBoundsE6<=! 27;! 2;=! button6.get*referred,i.eEF.heightFQ
MM$$$$ button7 $$$$
button7.setTe(tEJ,AE, )ECO)#,JFQ
panel2.addEbutton7FQ
button7.setBoundsE6<=! 2<;! 2;=! button7.get*referred,i.eEF.heightFQ
MM$$$$ button9 $$$$
button9.setTe(tEJ#)L>, #EA#I1E,JFQ
panel2.addEbutton9FQ
button9.setBoundsE6<=! 69=! 2;=! button9.get*referred,i.eEF.heightFQ
MM$$$$ button; $$$$
button;.setTe(tEJ E@IT JFQ
panel2.addEbutton;FQ
button;.setBoundsEnew )ectangleEnew *ointE6<=! 6<;F!
button;.get*referred,i.eEFFFQ
MM$$$$ label6 $$$$
MMlabel6.setIconEnew ImageIconEJpills.A*>JFFQ
panel2.addElabel6FQ
92
label6.setBoundsEnew )ectangleEnew *ointE;;! 2=;F!
label6.get*referred,i.eEFFFQ
V MM compute preferred si.e
#imension preferred,i.e W new #imensionEFQ
forEint i W =Q i Z panel2.getComponentCountEFQ iIIF V
)ectangle bounds W panel2.getComponentEiF.getBoundsEFQ
preferred,i.e.width W %ath.ma(Ebounds.( I bounds.width!
preferred,i.e.widthFQ
preferred,i.e.height W %ath.ma(Ebounds.y I bounds.height!
preferred,i.e.heightFQ
X
Insets insets W panel2.getInsetsEFQ
preferred,i.e.width IW insets.rightQ
preferred,i.e.height IW insets.bottomQ
panel2.set%inimum,i.eEpreferred,i.eFQ
panel2.set*referred,i.eEpreferred,i.eFQ
X
X
content*ane.addEpanel2FQ
panel2.setBoundsE;! 2=! B<;! 7<=FQ
V MM compute preferred si.e
#imension preferred,i.e W new #imensionEFQ
forEint i W =Q i Z content*ane.getComponentCountEFQ iIIF V
)ectangle bounds W content*ane.getComponentEiF.getBoundsEFQ
preferred,i.e.width W %ath.ma(Ebounds.( I bounds.width!
preferred,i.e.widthFQ
preferred,i.e.height W %ath.ma(Ebounds.y I bounds.height!
preferred,i.e.heightFQ
X
Insets insets W content*ane.getInsetsEFQ
96
preferred,i.e.width IW insets.rightQ
preferred,i.e.height IW insets.bottomQ
content*ane.set%inimum,i.eEpreferred,i.eFQ
content*ane.set*referred,i.eEpreferred,i.eFQ
X
set8isibleEtrueFQ
pac-EFQ
setocation)elativeToEgetOwnerEFFQ
MM A"orm#esigner $ End of component initiali.ation MM>E1$E1#4initComponents
X
private A*anel panel2Q
private Aabel label2Q
private AButton button2Q
private AButton button6Q
private AButton button7Q
private AButton button9Q
private AButton button;Q
private Aabel label6Q
MM A"orm#esigner $ End of variables declaration MM>E1$E1#4variables
public static void mainE,tring argsOPF
V
new *harmacyEFQ
X
public void action*erformedEActionEvent aeF
V
Ob3ect ob3Wae.get,ourceEFQ
ifEob3WWbutton2F
V
97
try
V
)untime rtmW)untime.get)untimeEFQ
*Wrtm.e(ecEJ3ava *%,,wingJFQ
X
catchEE(ception e(pF
V
AOption*ane.show%essage#ialogEnull!e(pFQ
X
X
else ifEob3WWbutton6F
V try
V
)untime rtmW)untime.get)untimeEFQ
*Wrtm.e(ecEJ3ava *%,,wing2JFQ
X
catchEE(ception e(pF
V
AOption*ane.show%essage#ialogEnull!e(pFQ
X
X
else ifEob3WWbutton7F
V
try
V
)untime rtmW)untime.get)untimeEFQ
*Wrtm.e(ecEJ3ava *%,wing6JFQ
X
catchEE(ception e(pF
V
99
AOption*ane.show%essage#ialogEnull!e(pFQ
X
X
else ifEob3WWbutton9F
V
try
V
)untime rtmW)untime.get)untimeEFQ
*Wrtm.e(ecEJ3ava *%,,wing7JFQ
X
catchEE(ception e(pF
V
AOption*ane.show%essage#ialogEnull!e(pFQ
X
X
else ifEob3WWbutton;F
V,ystem.e(itE=FQ
X
X
X
*urchase.3ava
MM,wing *ac-ages
9;
import 3ava(.swing.UQ
import 3ava.awt.event.UQ
import 3ava.awt.UQ
import 3ava(.swing.table.UQ
MM#ataBase *ac-ages
import 3ava.net.UQ
import 3ava.io.UQ
import 3ava.sql.UQ
import 3ava.sql.#ateQ
MM%ain Class
class *%,,wing e(tends A"rame implements Actionistener
V
private ,tatement stQ
private Connection conQ
MMist of abels
private Aabel lblOld%edicineI#Q
private Aabel lbl%edicineI#Q
private Aabel lbl%ediTitleQ
private Aabel lblDtyQ
private Aabel lbl*riceQ
private Aabel lblamountQ
private Aabel lblpdateQ
private Aabel lbldateQ
private Aabel lbledateQ
private Aabel lblsnameQ
9B
MMist of Te(t"ields
private ATe(t"ield t(tOld%edicineI#Q
private ATe(t"ield t(t%edicineI#Q
private ATe(t"ield t(t%ediTitleQ
private ATe(t"ield t(tDtyQ
private ATe(t"ield t(t*riceQ
private ATe(t"ield t(tamountQ
private ATe(t"ield t(tpdateQ
private ATe(t"ield t(tdateQ
private ATe(t"ield t(tedateQ
private ATe(t"ield t(tsnameQ
MMist of Buttons
private AButton btn,aveAddQ
private AButton btn,aveEditQ
private AButton btn,ave#eleteQ
private AButton btnAddQ
private AButton btnEditQ
private AButton btn#eleteQ
private AButton btnE(itQ
private AButton btn)efreshQ
private AButton btn,earchQ
private AButton btn,earch%edQ
private AButton btnCancelQ
private AButton btn#eadlineQ
private AButton btnfindQ
9K
MMist of *anel
private A*anel btnpanelQ
private A*anel panelQ
private ATable tableQ
MMTable
private #efaultTable%odel tmodelQ
MMContainer
private Container cpaneQ
*%,,wingEF
V
X
*%,,wingEint choiceF
V
switchEchoiceF
V
case 24
MMInitial 'indow
setTitleEJ*+A)%ACC %A1A>E%E1T ,C,TE%JFQ
setBoundsE7;=! 6;=! K;=!7==FQ
set)esi.ableEtrueFQ
9<
MMcotainer
cpane W getContent*aneEFQ
MMcomponents
tmodel W new #efaultTable%odelEFQ
table W new ATableEtmodelFQ
,etCol+eaderEFQ
btnpanel W new A*anelEnew >ridayoutE2! ;! ;! =FFQ
btnAdd W new AButton EJAddJFQ
btnEdit W new AButton EJEditJFQ
btn#elete W new AButton EJ#eleteJFQ
btn)efresh W new AButton EJ)efreshJFQ
btn,earchWnew AButtonEJ,earchJFQ
btn#eadlineWnew AButtonEJ#eadlineJFQ
btnE(it W new AButton EJE(itJFQ
btnAdd.addActionistenerEthisFQ
btnEdit.addActionistenerEthisFQ
btn#elete.addActionistenerEthisFQ
btn)efresh.addActionistenerEthisFQ
btn,earch.addActionistenerEthisFQ
btn#eadline.addActionistenerEthisFQ
btnE(it.addActionistenerEthisFQ
MM#ate dWnew 3ava.sql.#ateE,ystem.currentTime%illisEFFQ
MMt(tpdate.setTe(tEd.to,tringEFFQ
btnpanel.addEbtnAddFQ
9G
btnpanel.addEbtnEditFQ
btnpanel.addEbtn#eleteFQ
btnpanel.addEbtn)efreshFQ
btnpanel.addEbtn,earchFQ
btnpanel.addEbtn#eadlineFQ
btnpanel.addEbtnE(itFQ
cpane.addEnew A,croll*aneEtableFFQ
cpane.addEbtnpanel! Borderayout.,OLT+FQ
brea-Q
case 64
MMAppending 'indow
setTitleEJAddition of data...JFQ
MMsetBoundsE6K;! K;! 9==! ;==FQ
setBoundsE7;=! 7;=! 9==! 9==FQ
set)esi.ableEfalseFQ
MMcotainer
cpane W getContent*aneEFQ
cpane.setayoutEnew "lowayoutEFFQ
MMComponents
panel W new A*anelEnew >ridayoutE2=! 2! 2;! 2=FFQ
lbl%edicineI# W new AabelEJ %ediI# JFQ
lbl%ediTitle W new AabelEJ %ediTitle JFQ
lblDty W new AabelEJ Dty JFQ
lbl*rice W new AabelEJ *rice JFQ
;=
lblpdate W new AabelEJpurchased date JFQ
lbldate W new AabelEJ%an date JFQ
lbledate W new AabelEJE(p date JFQ
lblsname W new AabelEJ,upplier JFQ
t(t%edicineI# W new ATe(t"ieldE2;FQ
t(t%ediTitle W new ATe(t"ieldE2;FQ
t(tDty W new ATe(t"ieldE2;FQ
t(t*rice W new ATe(t"ieldE2;FQ
t(tpdate W new ATe(t"ieldEFQ
t(tdate W new ATe(t"ieldE2;FQ
t(tedate W new ATe(t"ieldE2;FQ
t(tsname W new ATe(t"ieldE2;FQ
#ate dWnew 3ava.sql.#ateE,ystem.currentTime%illisEFFQ
t(tpdate.setTe(tEd.to,tringEFFQ
,ystem.out.printlnEJUUUUUUUJId.to,tringEFFQ
panel.addElbl%edicineI#FQ
panel.addEt(t%edicineI#FQ
panel.addElbl%ediTitleFQ
panel.addEt(t%ediTitleFQ
panel.addElblDtyFQ
panel.addEt(tDtyFQ
panel.addElbl*riceFQ
panel.addEt(t*riceFQ
panel.addElblpdateFQ
panel.addEt(tpdateFQ
panel.addElbldateFQ
;2
panel.addEt(tdateFQ
panel.addElbledateFQ
panel.addEt(tedateFQ
panel.addElblsnameFQ
panel.addEt(tsnameFQ
btnpanel W new A*anelEnew >ridayoutE7! 6! 2! ;FFQ
btn,aveAdd W new AButton EJ,aveJFQ
btnCancel W new AButton EJCancelJFQ
btn,aveAdd.addActionistenerEthisFQ
btnCancel.addActionistenerEthisFQ
btnpanel.addEbtn,aveAddFQ
btnpanel.addEbtnCancelFQ
cpane.addEpanelFQ
cpane.addEbtnpanel! Borderayout.EA,TFQ
brea-Q
case 74
MMEditing window
setTitleEJLpdation of data...JFQ
setBoundsE7;=! 7;=! 9==! 9==FQ
set)esi.ableEfalseFQ
MMcotainer
cpane W getContent*aneEFQ
cpane.setayoutEnew "lowayoutEFFQ
;6
MMComponents
panel W new A*anelEnew >ridayoutE2=! 2! ;! 2=FFQ
lblOld%edicineI# W new AabelEJ Old%edicineI# JFQ
t(tOld%edicineI# W new ATe(t"ieldE2;FQ
lbl%edicineI# W new AabelEJ 1ew%ediI# JFQ
lbl%ediTitle W new AabelEJ %ediTitle JFQ
lblDty W new AabelEJ Dty JFQ
lbl*rice W new AabelEJ *rice JFQ
lblpdate W new AabelEJ*ur #ate JFQ
lbldate W new AabelEJ%an #ate JFQ
lbledate W new AabelEJE(p #ate JFQ
lblsname W new AabelEJ,upplier JFQ
t(t%edicineI# W new ATe(t"ieldE2;FQ
t(t%ediTitle W new ATe(t"ieldE2;FQ
t(tDty W new ATe(t"ieldE2;FQ
t(t*rice W new ATe(t"ieldE2;FQ
t(tpdate W new ATe(t"ieldEFQ
t(tdate W new ATe(t"ieldE2;FQ
t(tedate W new ATe(t"ieldE2;FQ
t(tsname W new ATe(t"ieldE2;FQ
#ate d6Wnew 3ava.sql.#ateE,ystem.currentTime%illisEFFQ
t(tpdate.setTe(tEd6.to,tringEFFQ
panel.addElblOld%edicineI#FQ
;7
panel.addEt(tOld%edicineI#FQ
panel.addElbl%edicineI#FQ
panel.addEt(t%edicineI#FQ
panel.addElbl%ediTitleFQ
panel.addEt(t%ediTitleFQ
panel.addElblDtyFQ
panel.addEt(tDtyFQ
panel.addElbl*riceFQ
panel.addEt(t*riceFQ
panel.addElblpdateFQ
panel.addEt(tpdateFQ
panel.addElbldateFQ
panel.addEt(tdateFQ
panel.addElbledateFQ
panel.addEt(tedateFQ
panel.addElblsnameFQ
panel.addEt(tsnameFQ
btnpanel W new A*anelEnew >ridayoutE6! 2! 2=! ;FFQ
btn,aveEdit W new AButton EJ,aveJFQ
btnCancel W new AButton EJCancelJFQ
btn,aveEdit.addActionistenerEthisFQ
btnCancel.addActionistenerEthisFQ
btnpanel.addEbtn,aveEditFQ
btnpanel.addEbtnCancelFQ
cpane.addEpanelFQ
cpane.addEbtnpanel! Borderayout.EA,TFQ
brea-Q
;9
case 94
MM#eleting window
setTitleEJ)emoval of data...JFQ
setBoundsE7==! 7==! 7==! 26;FQ
set)esi.ableEfalseFQ
MMcotainer
cpane W getContent*aneEFQ
cpane.setayoutEnew "lowayoutEFFQ
MMComponents
panel W new A*anelEnew >ridayoutE6! 2! ;! =FFQ
lbl%edicineI# W new AabelEJ%edicineI# to be deleted4 JFQ
t(t%edicineI# W new ATe(t"ieldE2;FQ
panel.addElbl%edicineI#FQ
panel.addEt(t%edicineI#FQ
btnpanel W new A*anelEnew >ridayoutE6! 2! 2=! ;FFQ
btn,ave#elete W new AButton EJ#eleteJFQ
btnCancel W new AButton EJCancelJFQ
btn,ave#elete.addActionistenerEthisFQ
btnCancel.addActionistenerEthisFQ
btnpanel.addEbtn,ave#eleteFQ
btnpanel.addEbtnCancelFQ
cpane.addEpanelFQ
;;
cpane.addEbtnpanel! Borderayout.EA,TFQ
brea-Q
case ;4
MMsearching window
setTitleEJsearching of data...JFQ
setBoundsE6K;! 6K;! 9==! 6==FQ
set)esi.ableEfalseFQ
MMcotainer
cpane W getContent*aneEFQ
cpane.setayoutEnew "lowayoutEFFQ
MMComponents
panel W new A*anelEnew >ridayoutE6! 2! ;! =FFQ
lbl%ediTitle W new AabelEJ%edicine 1ame to be search4 JFQ
t(t%ediTitle W new ATe(t"ieldE2;FQ
panel.addElbl%ediTitleFQ
panel.addEt(t%ediTitleFQ
btnpanel W new A*anelEnew >ridayoutE6! 2! 2=! ;FFQ
btn,earch%ed W new AButton EJ,earchJFQ
btnCancel W new AButton EJCancelJFQ
btn,earch%ed.addActionistenerEthisFQ
btnCancel.addActionistenerEthisFQ
btnpanel.addEbtn,earch%edFQ
;B
btnpanel.addEbtnCancelFQ
cpane.addEpanelFQ
cpane.addEbtnpanel! Borderayout.EA,TFQ
brea-Q
case B4
MMdeadline window
setTitleEJTodays #eadline medicines...JFQ
setBoundsE6K;! 6K;! 9==! 6==FQ
set)esi.ableEfalseFQ
MMcotainer
cpane W getContent*aneEFQ
cpane.setayoutEnew "lowayoutEFFQ
MMComponents
panel W new A*anelEnew >ridayoutE6! 2! ;! =FFQ
lbledate W new AabelEJTodayHs date to find e(piry medicines4 JFQ
t(tedate W new ATe(t"ieldEFQ
#ate d2Wnew 3ava.sql.#ateE,ystem.currentTime%illisEFFQ
t(tedate.setTe(tEd2.to,tringEFFQ
panel.addElbledateFQ
panel.addEt(tedateFQ
;K
btnpanel W new A*anelEnew >ridayoutE6! 2! 2=! ;FFQ
btnfind W new AButton EJ"indJFQ
btnCancel W new AButton EJCancelJFQ
btnfind.addActionistenerEthisFQ
btnCancel.addActionistenerEthisFQ
btnpanel.addEbtnfindFQ
btnpanel.addEbtnCancelFQ
cpane.addEpanelFQ
cpane.addEbtnpanel! Borderayout.EA,TFQ
brea-Q
X
MM'indow *roperties
set#efaultCloseOperationE+I#EYO1YCO,EFQ
set8isibleEtrueFQ
MMconection to #ataBase
ConnectTo#atabaseEFQ
X
public void action*erformed EActionEvent aeF
V
if Eae.get,ourceEF WW btnAddF
V
new *%,,wingE6FQ
X
;<
else if Eae.get,ourceEF WW btnEditF
V
new *%,,wingE7FQ
X
else if Eae.get,ourceEF WW btn#eleteF
V
new *%,,wingE9FQ
X
else if Eae.get,ourceEF WW btn,earchF
V
new *%,,wingE;FQ
X
else if Eae.get,ourceEF WW btn#eadlineF
V
new *%,,wingEBFQ
X
else if Eae.get,ourceEF WW btnE(itF
V
,ystem.e(itE=FQ
X
else if Eae.get,ourceEF WW btnCancelF
V
set8isibleEfalseFQ
X
else ifEae.get,ourceEF WW btn,aveAddF
V
,tring midWt(t%edicineI#.getTe(tEFQ
,tring mtiWt(t%ediTitle.getTe(tEFQ
double qtyW#ouble.parse#oubleEt(tDty.getTe(tEFFQ
;G
double priW#ouble.parse#oubleEt(t*rice.getTe(tEFFQ
double totWEqtyUpriFQ
,tring pdteWt(tpdate.getTe(tEFQ
,tring dteWt(tdate.getTe(tEFQ
,tring edteWt(tedate.getTe(tEFQ
,tring snWt(tsname.getTe(tEFQ
Add#ataEmid!mti!qty!pri!tot!pdte!dte!edte!snFQ
t(t%edicineI#.setTe(tEJJFQ
t(t%ediTitle.setTe(tEJJFQ
t(tDty.setTe(tEJJFQ
t(t*rice.setTe(tEJJFQ
t(tdate.setTe(tEJJFQ
t(tedate.setTe(tEJJFQ
t(tsname.setTe(tEJJFQ
X
else ifEae.get,ourceEF WW btn,aveEditF
V
,tring midWt(t%edicineI#.getTe(tEFQ
,tring mtiWt(t%ediTitle.getTe(tEFQ
double qtyW#ouble.parse#oubleEt(tDty.getTe(tEFFQ
double priW#ouble.parse#oubleEt(t*rice.getTe(tEFFQ
double totWEqtyUpriFQ
,tring pdteWt(tpdate.getTe(tEFQ
,tring dteWt(tdate.getTe(tEFQ
,tring edteWt(tedate.getTe(tEFQ
,tring snWt(tsname.getTe(tEFQ
,tring omidWt(tOld%edicineI#.getTe(tEFQ
Edit#ataEmid!mti!qty!pri!tot!pdte!dte!edte!sn!omidFQ
B=
t(tOld%edicineI#.setTe(tEJJFQ
t(t%edicineI#.setTe(tEJJFQ
t(t%ediTitle.setTe(tEJJFQ
t(tDty.setTe(tEJJFQ
t(t*rice.setTe(tEJJFQ
#ate dWnew 3ava.sql.#ateE,ystem.currentTime%illisEFFQ
t(tpdate.setTe(tEd.to,tringEFFQ
t(tdate.setTe(tEJJFQ
t(tedate.setTe(tEJJFQ
t(tsname.setTe(tEJJFQ
X
else ifEae.get,ourceEF WW btn,earch%edF
V
)etrieve#ata2Et(t%ediTitle.getTe(tEFFQ
X
else ifEae.get,ourceEF WW btnfindF
V
)etrieve#ata6Et(tedate.getTe(tEFFQ
#ate d2Wnew 3ava.sql.#ateE,ystem.currentTime%illisEFFQ
t(tedate.setTe(tEd2.to,tringEFFQ
X
else ifEae.get,ourceEF WW btn,ave#eleteF
V
#elete#ataEt(t%edicineI#.getTe(tEFFQ
t(t%edicineI#.setTe(tEJJFQ
X
B2
else ifEae.get,ourceEF WW btn)efreshF
V
)etrieve#ataEFQ
X
X
public static void mainE,tring argOPF
V
*%,,wing c W new *%,,wingE2FQ
c.)etrieve#ataEFQ
X
private void ,etCol+eaderEF
V
tmodel.addColumnEJ%edicineI#JFQ
tmodel.addColumnEJ%ediTitleJFQ
tmodel.addColumnEJDtyJFQ
tmodel.addColumnEJ*riceMitemJFQ
tmodel.addColumnEJTotal amountJFQ
tmodel.addColumnEJ*ur#ateJFQ
tmodel.addColumnEJ%an#ateJFQ
tmodel.addColumnEJE(p#ateJFQ
tmodel.addColumnEJ,upplierJFQ
X
private void ConnectTo#atabase EF
V
try
V
B6
MMload driver
Class.for1ameEJcom.mysql.3dbc.#riverJFQ
MMma-e connection
con W
#river%anager.getConnectionEJ3dbc4mysql4MMlocalhostMpharJ!JrootJ!JrootJFQ
MMcreate statement
st W con.create,tatementEFQ
X
catch EE(ception eF V,ystem.out.printlnEeFQX
X
private void Add#ata E,tring mid! ,tring mti! double qty! double pri! double tot! ,tring pdte!
,tring dte ! ,tring edte !,tring snF
V
try
V
MMprepare statement
,tring qry W JInsert into %ediInfo values E[! [! [! [! [ ![ ![ ![ ![FJQ
,ystem.out.printlnEmid I J\tJImtiI J\tJIqtyI
J\tJIpriIJ\tJItotIJ\tJIpdteIJ\tJIdteIJ\tJIedteIJ\tJIsnFQ
MM,ystem.out.printlnEJ)ead only JIcon.is)eadOnlyEFFQ
MM,ystem.out.printlnEJClosed JIcon.isClosedEFFQ
*repared,tatement ps W con.prepare,tatementEqryFQ
ps.set,tringE2! midFQ
ps.set,tringE6! mtiFQ
ps.set#oubleE7! qtyFQ
ps.set#oubleE9!priFQ
ps.set#oubleE;!totFQ
B7
ps.set,tringEB!pdteFQ
ps.set,tringEK!dteFQ
ps.set,tringE<!edteFQ
ps.set,tringEG!snFQ
ps.e(ecuteLpdateEFQ
X
catchEE(ception eF V,ystem.out.printlnEe I J\tJ I e.get%essageEFFQ X
X
private void Edit#ata E,tring mid! ,tring mti! double qty! double pri! double tot!,tring pdte!
,tring dte! ,tring edte!,tring sn!,tring condF
V
try
V
MMprepare statement
,tring qry W JLpdate %ediInfo set %edicineI#W [! %ediTitle W [! Dty W [!
*rice W [! amount W [!pdate W [!date W [ !edate W [ !sname W [ where %edicineI# W [JQ
*repared,tatement ps W con.prepare,tatementEqryFQ
ps.set,tringE2! midFQ
ps.set,tringE6! mtiFQ
ps.set#oubleE7! qtyFQ
ps.set#oubleE9! priFQ
ps.set#oubleE;! totFQ
ps.set,tringEB! pdteFQ
ps.set,tringEK! dteFQ
ps.set,tringE<! edteFQ
ps.set,tringEG! snFQ
ps.set,tringE2=! condFQ
ps.e(ecuteLpdateEFQ
X
catchEE(ception eF
B9
V
,ystem.out.printlnEeFQ
X
X
private void #elete#ata E,tring condF
V
try
V
MMprepare statement
,tring qry W J#elete from %ediInfo where %edicineI# W [JQ
*repared,tatement ps W con.prepare,tatementEqryFQ
ps.set,tringE2! condFQ
ps.e(ecuteLpdateEFQ
X
catchEE(ception eF V,ystem.out.printlnEeFQ X
X
private void )etrieve#ata2E,tring condF
V
,tud)eport sWnew ,tud)eportEFQ
s.,tud)eportEcondFQ
X
private void )etrieve#ata6E,tring condF
V
,tud)eport2 s2Wnew ,tud)eport2EFQ
s2.,tud)eport2EcondFQ
X
B;
private void )etrieve#ata EF
V
try
V
int row W tmodel.get)owCountEFQ
whileErow ] =F
V
row$$Q
tmodel.remove)owErowFQ
X
MMe(ecute query
)esult,et rs W st.e(ecuteDueryEJ,elect U from %ediInfoJFQ
MMget metadata
)esult,et%eta#ata md W rs.get%eta#ataEFQ
int colcount W md.getColumnCountEFQ
Ob3ectOP data W new Ob3ectOcolcountPQ
MMe(tracting data
while Ers.ne(tEFF
V
for Eint iW2Q iZWcolcountQ iIIF
V
dataOi$2P W rs.get,tringEiFQ
X
tmodel.add)owEdataFQ
X
X
catchEE(ception eF
BB
V
,ystem.out.printlnEeFQ
X
X
X
class ,tud)eport e(tends "rame implements 'indowistener
V
private boolean flagWtrueQ
Connection conQ
,tatement stQ
ist lstrptQ
,tud)eportEF
V
,ystem.out.printlnEJUUUUUUUUJFQ
X
public void ,tud)eportE,tring condF
V
,ystem.out.printlnEJNNNNJIcondFQ
setayoutEnullFQ
set8isibleEtrueFQ
lstrptWnew istEFQ
addElstrptFQ
lstrpt.setBoundsE2=!9=!K==!7==FQ
add'indowistenerEthisFQ
try
V
setTitleEJ,earch )eportJFQ
BK
set,i.eEK6=!7;=FQ
Class.for1ameEJcom.mysql.3dbc.#riverJFQ
MMma-e connection
con W
#river%anager.getConnectionEJ3dbc4mysql4MMlocalhostMpharJ!JrootJ!JrootJFQ
MMcreate statement
st W con.create,tatementEFQ
)esult,et rsTemp W st.e(ecuteDueryEJ,elect U from mediinfo where
%ediTitleWHJIcondIJH JFQ
,tring st2WJJQ
whileErsTemp.ne(tEFF
V
st2 W rsTemp.get,tringE2FIJ JI
rsTemp.get,tringE6FIJ JIrsTemp.get,tringE7FIJ
JIrsTemp.get,tringE9FIJ JIrsTemp.get,tringE;FIJ
JIrsTemp.get,tringEBFIrsTemp.get,tringEKFIJ JIrsTemp.get,tringE<FIJ
JIrsTemp.get,tringEGFQ
,ystem.out.printlnEJ^^^^^^^^JIst2FQ
lstrpt.addEst2FQ
X
X
catchEE(ception eF
V
X
X
public void item,tateChangedEItemEvent eF VX
public void windowOpenedE'indowEvent eF VX
public void windowClosingE'indowEvent eF V disposeEFQX
public void windowClosedE'indowEvent eF VX
B<
public void windowIconifiedE'indowEvent eFVX
public void window#eiconifiedE'indowEvent eFVX
public void windowActivatedE'indowEvent eFVX
public void window#eactivatedE'indowEvent eFVX
XMMEnd of stud)eport class
class ,tud)eport2 e(tends "rame implements 'indowistener
V
private boolean flagWtrueQ
Connection conQ
,tatement stQ
ist lstrpt2Q
,tud)eport2EF
V
,ystem.out.printlnEJUUUUUUUUJFQ
X
public void ,tud)eport2E,tring condF
V
,ystem.out.printlnEJNNNNJIcondFQ
setayoutEnullFQ
set8isibleEtrueFQ
lstrpt2Wnew istEFQ
addElstrpt2FQ
lstrpt2.setBoundsE2=!9=!K==!7==FQ
add'indowistenerEthisFQ
try
V
setTitleEJE(pired medicines )eportJFQ
BG
set,i.eEK6=!7;=FQ
Class.for1ameEJcom.mysql.3dbc.#riverJFQ
MMma-e connection
con W
#river%anager.getConnectionEJ3dbc4mysql4MMlocalhostMpharJ!JrootJ!JrootJFQ
MMcreate statement
st W con.create,tatementEFQ
)esult,et rsTemp W st.e(ecuteDueryEJ,elect U from mediinfo where
edateWHJIcondIJH JFQ
,tring st6WJJQ
whileErsTemp.ne(tEFF
V
st6 W rsTemp.get,tringE2FIJ JI
rsTemp.get,tringE6FIJ JIrsTemp.get,tringE7FIJ
JIrsTemp.get,tringE9FIJ JIrsTemp.get,tringE;FIJ
JIrsTemp.get,tringEBFIrsTemp.get,tringEKFIJ JIrsTemp.get,tringE<FIJ
JIrsTemp.get,tringEGFQ
,ystem.out.printlnEJ^^^^^^^^JIst6FQ
lstrpt2.addEst6FQ
X
X
catchEE(ception eF
V
X
X
public void item,tateChangedEItemEvent eF VX
public void windowOpenedE'indowEvent eF VX
public void windowClosingE'indowEvent eF V disposeEFQX
public void windowClosedE'indowEvent eF VX
K=
public void windowIconifiedE'indowEvent eFVX
public void window#eiconifiedE'indowEvent eFVX
public void windowActivatedE'indowEvent eFVX
public void window#eactivatedE'indowEvent eFVX
XMMEnd of stud)eport class
K2
>.2 SCREEN SHOTS
L%4-, F%r*
K6
Ma-, F%r*
K7
P$rc/a!" D"#a-.!
K9
S#%c ("#a-.!
K;
Sa."! D"#a-.!
KB
E@'-r) M"(-c-,"! D"#a-.!
KK
16.REFERENCES
BOOAS9
2. >eorge )eese! et al! /%anaging and Lsing %y,D0 OH)eilly.
6. )oger ,.*ressman! /,oftware engineering$ A practitioner5s Approach0! %c>raw$+ill
International Edition! ;th edition! 6==2.
7.*.A.#eitel!+.%.#eital!0Aava +ow to *rogram0!*earson International Edition!K
th
Edition!6==K.
9. ).*.'attenhofer!0"A),ITE4"ederated!Available and )eliable ,torage for an Incompletely
Trusted Environment0!Operating ,ystem #esign and ImplementationEO,#I5=6F!#ec.6==6.
0"b!-#"!9

2. www.sun.3ava.com
6. www.3ava6s.com
7. www.mysqltutorial.org
9. www.w7schools.com
;. www.wi-ipedia.org
K<
K<

Vous aimerez peut-être aussi