0% found this document useful (0 votes)
79 views

Design Patterns Natraj

1) Design patterns are common solutions to recurring problems in software design, promoting reuse of proven designs. 2) The Singleton pattern ensures that only one instance of a class can exist and provides a global access point. 3) Design patterns can be implemented in Java by using common object-oriented programming techniques like inheritance, polymorphism, and abstraction.

Uploaded by

raj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

Design Patterns Natraj

1) Design patterns are common solutions to recurring problems in software design, promoting reuse of proven designs. 2) The Singleton pattern ensures that only one instance of a class can exist and provides a global access point. 3) Design patterns can be implemented in Java by using common object-oriented programming techniques like inheritance, polymorphism, and abstraction.

Uploaded by

raj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

,I

Oesign pa$e'rn '. - 'fr lat | >ot:-

Ith;ch cornes a$ -fest soltnhidn frr rt "t n-e prob)e/Ds o? aff,t'tahctY, dt*brr*nt .

De$ign filfcr n S a"re 6u.St praoi ceS lO use Slto le}ndogieS ePfer; uEJt ln pn j€d 6( a14'Lraa,t)oa

dgloj,rrrTy .

----t D€5i0h pdrteln av[ $.pr-riry cale arbtte J-.6png slq, Pro,.r'ers by
"s;g pb:, leolrradogies,
-)
-7he
$(rst Soltr ticn f^ '%l -" pvob\ero 6:f pyD.ie.tl' 6/ a?pljcai 6h derxUy*,r is c-ojxe./ os
Aon - WlIetn

TSo rrrcq n tcrl n5 leorb desl I h pt4'n arJ ahii-Faflcrn"


-) the Cr{Lri"fuV1(h

1"3 f },"s" o? pra.lec Jorl" Prt elf '


Des)$n f8H,e!n5 a.re iol pleoen l.atita +..Kes pla.ce in c"J

neeJ ttnd a16l ;za't'lon oP


Geracrqrltr pLITL derign g $e +asu +!'( dcrtlopeog ,rPeciBad rhe
C*tPtiioo '
tt irnP)lment rhem talut" J'1"6
TatV
l&9'c;n ;srlfi n9 and dadcnc s c,r)

a there 6yg Eog+ Jesign pet&o nJ


in Java kntt;rcnt*'t'J '
slur fcchnoloSU ' [or) pmSronn;"8 Lo"iJ",?e
-) pesl gn plkrns cc.n be impler',evrled rr5 t^t;n1 to"X

-i JdF wr-@r--!9ry!li-'
Singie fdn java c lass

69'*hroni xJ $nglet-on jaua clc'ss

[-aLrort Yoerlod I *n*l priic{ n

Fad-ar $
Absi"au

T€Ynplarc rnerho d

Et-.itdel Prtc'n
pmtfrne P&rn

flg c,:eifhr lzrErn


runFr o I ) P'rltn
h
of
f 0c (rnvigidn
AdctPftr clc!(9
Fesn li h e e { f,.*"tfu sLfui ckt
value oblcd cle\5
'
"<trd lr;n
v. o o(r}, JDro iias osic^r
o&4
- '" hre,o lera.l d es ; 3n

Vielo llel()e'l

Crrn06sii V ia(,
Vci mve3
M\,(a
Fnnt (rmrr o lltr
lnLrncephnt Bfuu
Ab gh acr acr'^ tYo \\ e1
foltgrdtifn laqC-. Der;€n 3 :-
Jnv"lol.os JuriSr,s Sol,'H o', s +- no,j..'^ti',J -t
Pr:.fftYn
-> *nior
Sessiqn Prrc.(d e
w6I.ns a( *cl,nolop9 dti lizotjoor .ollt,"e os l"e 1t^nicn -,
t'\ sag gF.,rc. d 3
'laie hst Sduitns a't4 4'"n o' )
es
Jetr)oye's
$trvteLa-cf<1
2gs tl^.t a! d*,6"J frLk'ns'
&sines Sl)cli$a-hc

,". i.toOet Layr"i ;-


DA o ( tlla lt{ esl obi )

Ab6tYac,r DDo

-P S,*otn Java class

!4I:i-- f,nslca/ oP (YEdir,$ rru lhYie 6qjecm oP ;hoa cla-n lo.,,"U &-"&r. o'd
&$sHn3
hlqb de merftn q
, degtc,d," eaqlp- f+ is recomende J tro Cl{a.l.. b.r)< 64at 6" J
,J X fxrrf6

@'+ rn,u''ple jirns3 .

ry:- Use singlera n iavo. clcrls -


f.at
'-
The joua c\al6 ollcrrs d€ fu c"recl.lt One oqj€d F,( Jvm ls Cq-r ted ar Sf13lef.", cla11 .
"ia^:a_

the logge* clors d r|'e Los+j Ap: is diwn as gqllet


_ jaLT4 daa-
-,
---. Ahe Se.!v lce k# locilcY clc.x toitl 5e irnplzren rcd aS 3;r6l*"n jw" c,luu

a,-

0 iU must l'"tte or,l,J fri al-t 'J


aon sl.rkc]rctrs .

a r
t hdr,{r Sla}i c qtf1rt.te Vadd$le tn
bn;ra,<
^
CJ nous r 5z.me clavs
c /onln 3 prore rs
gVe{ 'r ilg Clc'neL) to Scrrpre lS
.

€r
rr.rsr L* *'in o'. -P*\'r*['J ho'i"6 rde lu6i' u( $okr-. t".-'" ilj ;flj:'il
0
fr\ {crc vtr{es closc orr 4t J'--s + + j*oclb*" c^) op"'r unt6one
C*"h"A odttFs

h" h o-s< otic4t.e. Tn 4)%J nk* St^f,ean l3r'i'


pl""r)'
a
1e ,ocrlod og o clos i.e " 6c.po-ble 4 37eoling On J <rol'i n5 9*t ar od\c.( clcds
6611t I &s ft.ro.1 rcrl'".\
h
_ ll S;oileTanlcsr.JavA

Cld95 STes+
{
7
/lgotlc r.efetore varta-bte

plivcrt€ Sl-ati c $Tesr b=nqt,

/, Irnvotr Ct ttshuetw
.!,7 ftllcltse Srestt I
JL
s'o' P ( '' sresr : o -paxern , &r6h.!rr4 (a;vat )' ),'
t
,-z llstttic {-aC."g nerlloJ

\v.
lllblic S lali c $r.st crqg( )
L

llow c*"a"n lo)t^6 9a6lrr,, l'4;c

iPIn==n,,11;
n =h.!t) STe*tt )
\v

a <ftJurrl h '
\-' t
J l/clas s

prblic c-lcnq f,;ngreronTes f


L
P s vrn f Sw,nlU o'rs )
i
C );
$f..rr 1, =$Terr' ctaJ<
fi-:
16=

s.o ,p ( 6, trbj lrrashcode i5 '' + t' 'l^rt3;" t x) ,'


s'D,P L" t> t, ,,'+b.harlGrec) ) j
g.o.f (" tl tl ,,.+g.h"shCode() j,.

Stest t+ = ( Sresr) t3. ctone();


S.o,n ( L', oL,
n+tu hartro'{c(r-

\--l5-r
-- ir.r./a c S inglr L0on lest 'iau^

7 jr*o Stn1ll. hnTctr.

\'J
Qantirre lass
2!:lYV
-) iav6' lang. c iS o ple-d€g bed Jdk ter€l Slngle fon jaraclc.ss-
ze d SiDgleto n java .lasg :-
-.Qg.,c1,ron;

,j:kn muldpte rtrreads a.jg dt't siogle o \kcJ- rkn fia'e i$ a pss;5;ltt'J rnrrfr$read;n3 -.
"f €.16"1
iS:[€s , this chans€ iS olso tht,e olule rrrctrt"l n3 oirh tbe tt*ods o, S"61u * icroa

Cla55 . -TO
orr o"rne ttL.is poblem ir i5 rczorntnded tD Lcsr 3n S;.,cbnai rx d Sr"g)er.- iooa clas< '

rrrorrrg he 6h$ c &.i.r"1 *rma 6( n-r d-s*\ vaust Ie la Lcm


Thar
anJ ,rkr DJ€^ rle P;ne.l r.rrlrods

ab S6hchYDrnzed merloJt

@) F".*t **r. / e**f po* t


p*I}- u<inl -
ne,{ k€{rrord (x. ca,'r r cr€a$e cbi4r urrr}' 'Pr^iu; ut5 ar:d \ afdgn3 .'e< r';tlcos

grurlcrn i- (Jse fatrrrg nerld / ro.r.5 Utrt ..,

ile yrrtfiod 6f a javrr clt c5 i'e ' gr,ltr,Ole { Corst'c.chnJ anJ etep'r"in 3
lrs ocon c lars(o{ )

orlrer cltss ohject is CottPd 05 taclrrl pethod " ,

lte,e a'e koo rgrr5 6( t"cn 9 trr *,od

r) Srotic frcJor5 rubo d l) -3.6ic"nca


Iorfon3 meiroct .

er"-O"r - ffilal.t8{trn€thods:
-lt tea d t= -Thvud.
carrc Ttwad { ) j

cl&6s 6-- fra35'.fi:oNa-. I Test-1;


Qr.r,H-e vt = Qendme '6.1i)r.n6rr. e Ct ;

ce (t:
fat.',aen
" cl : Ca Lnde'r ' gtfnsru^
' i5 o$er "P yt'F""- Cc'tend<x clar5 p[cl" it c'["t"rs 4
L it ig not crt.''Jt't 'lois o$ecl iF

$rc'\dcr rtass (aSshacl c/4ss).


\ _-/

clatt cantaaa
Ste'-c -fa,ro1 rrrrtrodf art Lrc& \ jdla ctc'vl a*s;de al ts cLaN ) l'\t
(Te4,| o6eet 4 i

-) io'a cJa+sce'
'fhes' a'ft ar\o vkfut ,Lr. dcuX;I S^Xlu--
on\fl ptvaLt Gmsrr'-dqJ

probrjf.t og 5toti c 'ft<nx5 r'.uho d


rpme > petho cl [ rrrarn rovne)
tlc z clas S rome abgrraLt Ctossna"'u J inu tc're'
pu5liC Sk
i5 1€.cl'{qd€ I

Exomples 6', lmtonu -p.u,tt3 tncrhod : -

Q't"g
$t tng s? ne,.d [-ov- );
f,tr;n'1 3r - 5. ccnc o]rr ['t.ir d) I il Ok\et\o
( -*ft me (tdnX"lar: c&i

t-
n',eficd sk;ng cl,br
$x'ng&pput et = oero 6rcn6BuPf.' ('h"llD" ):
'S*r"g 5a = sb'fcr.bSi.rog [o,e),. /f t"rr
prrc l=ierc \)aPt1 )
. $r"rnX s3 =J
, 16 $wrn6 tl ;

LP u tnaot fo c.reax trol ' bj t6f"g e.lsrln$ oti d*a atA belollio<"'r *ren usc Dosl-6rrf€
"U,iect

4,rrorg rrxrbo d '

+ d GdYr {€Jtrr n e.i*rn its oan c,b.rs ohictr (-s, otk, clc"rs ohlG ta') 6*cbx a8+
Fur-trrt Yr0ho

i .._. e rhe c\pat gilr'n by &,tn ,*.a r€arr€ty+s cetw, lytc i'e'e^cdt'elio
**yl
Vrr-eNl &.to.
d'&ti*&)
2,frd'ds *lxttn; n-6 enen1 o4rts-( ol"tc''ts
'"^*ft
* M\'tjl9i

5rroto
tgpe of Tnskarnce kcfdnj n:noA Z -
pblic &.e cla$ naF'e> *tnol (-\
Zc\elsname, aint<r rwr c>
f zattftatt i

6trrn1 3r = nerl $r'rng ("or'):


$d.5 5r = 5r. corrot ( "herro ") : // ornerro

f$'n3 .lors i5 imYrtriaile cl.(gs )

SnLq&ero, sb-- oero Sr""gB,ee. t-ol" ):

5b' ofrcnd (- hert 0') :

' 't .,
$r:"gl},t?e< ori
l

[gung6"?Ft ctdc\4 i6 llctd,l€ clttl )

i a"vo clavt-l
ci{ *st*u" d<rlel'ra
r.o6t cf rht pn&Rrtd ,atltf" m,,laHe classcr'
U.*ar3
// tfst'ia$r^
( la{J ft(r-
L int q',
+t6f ,b ',

l- p[an obytt &tu ;' n"el)kt| i{ tt i.l ve{ltrfin3 ord


r/< ^
ierr(ior a, ;nr u ) ryI!
I rl.;r'o-- ; o!|t!'1irs tk+t it
^ 9me ou1at. -t a it i' cottd "
"*1"'9!e
l-hs L=b l
1** cutA ,tt'*le cJet) ,

n&^t,
@ @ rs4ip4e. dsd' i< lP il i( \^'t *llott\ *"1'
* oW 'n&h€L
tgric Void "nafgD,rac; ue!t'ts1 \' o '*lA (& objt'r *'a
t &,e*r dbj&f b"t B ,o94
d? a*-a; ,.(t,o^n b( ftja'*\ ^r.'";;'il 4- "*
b=b*b)
\ 0t inm;*(c "LW (r*"
c['as i' c-JtA ^ l'*-;*')'
IL$uc Vdid d;tpr)
i
s.o.f,('a="s+"5=.+)l
9

llctas
pl&\;c claL6 nddblcl;\r
,t .,
,ru-[5'1Ii *lr)
n ^^

Tarl'ro''o)'
), *-n*' ()
1' 4'^?1")j .u^ !,oar*toect". -+r' La:tcoac )l
a'-"'j6i6p*t ct)
I

\llro^n
t:fit l''l*^ r*r^':'lF ra:Lc'art))

ll auN or I oq lrorr

bt'*ry'*r
-> SniT Cqn6tant Pcbl 6nr;6t-cln 3 3U4 "*de l.J ot:rYn'ble objcd-s . Dcre t'o *tjs oh1ecls a'Eib6i i i l-Y

be Rom Poot aa need d


rrr.r) dprrS coill fDf be crtoled *tli pirr occesfed

c1"!5
pot rhe jovo'lang ' Sr'in3 clals i5 as irnrxr rarblt v
---a 16 ohliTe ttr, s Srrir5 cnnorant dil'crD
gs rl-r5 aYe
kioJ o? 1- pools o'e mF aval table ' '
{r ".r*iniq cldsses thj s Canstan

8i\En 0.5 ruhuble classes '


c lctss I
d i mrrLtab\e .lava'
.--. 'IO deu€bPe ttsc" - dehne

, cl&!9 rrust L€ ft not C lc'sS ' \v

,l ffi hr rjari ouleS rn srbe 1ec\ce'n


ab pnrrrle I $"A Van a-bte
.tD'-
-) c-o\,rr, &..fa nodi ficarrcm 5 re1*r"cd
i io it sinura- ue dane thr.,t3h {,1- r.er{."di
\J

l,irri''1 lr6ic h .rerat n ntlD obars'


/l imrn ura.ble TegJ- 'Jav6.

W_? o"16 4'*l o.'. vtot- I'nlntrtaltq ela

t' 9i.o I clast -Iee r clarscs

{ ,h'o S6."-r,er"rjB. llk,, x,,rcnar eLu-st.+


pr;v"r/iq-I.ai. W
Pt;uoIt/ bmoS b" *o $not s b* t\ ^'"^ t
clat's.

//C*tw'"ro' s ,"
iw,muta-Lle elntntt.
puu\;c -l.sr (t' t)
",bXi1
{
thv ' a ' a"
tlrc'b z t>"
"
Co's w c'cttr J ;
5 o' I L'Tcst
"
?-Qataw

*a1t;n I
mtrffod oL<-,, D't6 'K,.l'h'"ba 3 '
X*,.J .qr.a o'5r'n9 b)
"^'1rl,,i--Li1- .ArqDr^ 1;",
{"
tctu.{n hed 'Ie5J (6' b ) '

p4rir 16y rod{iA (r^r "-)


{'**ln
rreld T€lt (althis'b);
t .'-,
ptu. rest rno&fuS dll' ol
trtotn Y)c,^' Iell (rhis'a' I ))

,*n rY tft, d/sP( )


{ <o 'P 1"a=
,'
*o*'5= " t.b),'
.j ll ri"n"' Irn,",(,-tdrlelat .lrvd
.\ ltctr'r s
/l > iata :;trntt-roAe '
Fr5ti6 las6 c lYnrn(k61e1f s t

" P. u."f5r'';1[l
s
L,
arls)
t
a" ) I
t.rrt et=rle- mt tlo
- '+5''ho..s}'9odec) );
s'o ? ( t oql
"'YoJ
has hcode

t' dl:r(: i
ao'" rc'r'€:h" )l
r(Jr t'=g(
h&s|.coh"'rtl'lokc"detl l'
t"- n i:O, rri
t1 dise tr '
-i i
&sr cl
lerr rr- ' f
't',1F 1 !,11"t +tr.h,ib cod<())i
obi [":ht
s'D't'L" 5r- 3 /'u't"
tr- 'J istL) ' .iU.t'lA
L'A:sr L)l
rn
Y Tetnprctrc o€$'od pesigo parkr n i ' '-J
\J
iastt ------) o.c)i
b(i; \_,/

bere tocompler( Ibe ia,cl.t:e ,r:\o$ L1


oeed fD rn-rlriple
::]; )
xt)l .rrrryrr bezinj rrrrbod rrorrps atd *xt'{ sel*q'Le o( )
.\--)
inVCr.tian, ,,--z-
use ltrr)rlole roe6o d
_)
prbtic V6id rr6nerho d ( ) \
{ \-/
&c); \)\
btr;
cL) t \-/\
d( )j
II): J
t\ \-/
t0$\a1 : mgrrerhoi()l
J
nooD cn\t cne rne,rbd needS to be colr bcornplere t&slc ' '\
The pyocers .n€tl,.,d 4 or3' ot!.che . S6c.ts . 6ricrr,. @atPoceosc,t .c-lc"'s culrs l{ pccess X^^c > ll
meb"dS in a qlrnce tb Ccrrdetc lhe +&sl.
v
d'
.-)
6or nurg rnp:ho d i5 co[ed Tcrnplo]e met+]o

Pcryst Pr,ccts da]" oL'iett


16 \-/
-J &riirn S"uret slnurd c2lt oI' 6i5 lq roerhocts &"etrt Lo)
\-/
W"rtW. Eur i8 cdlrr o,r1 o"e -a-- n'r-rAoJ I e' p'*xO
Cwn9t61y

ri\ J
9FY FasrLine Rea&'r '.- logc ;n ac'v sr"al\;
l'ru'nort) to c\aaog ?eTslsrcnLe
oRv\ sl-s ll;re
6^*--,"t'o"u oPn tf(I]s J
fl'e pe&""ance }ecarse /tere
gale a{p6 -q deXo"de
co''l medrtrro lTic deu"lqw*
r{p PQd6sff,','
infanat\ Se"erare jduc aede
to cc'"net#
:
slo, > DG
_t
d\l(I

litser ni're
t"'lrj rGffiA
3i"-'
EgS
lgeo torn?
| 1on;c

rnog &3rc.de tle Pe'r{zrr"a*'ce

Use F*. L''e R"dc. cles;3n pcrrk'' n


,,
b inlercrf- cr) lrf) rhe \
hlrin jdbc 6otr. d;'..rl.J iq (r r Srmll and tn &..rn Scale c4pliaorianS

db elto io ;rnPr# rhe Rlfs" tt"t^ tt '

crbEtrc..cl:- h; Jtog rhe impltrntrialic'4


ra
r AbstraCr Facfar g gUrnrn i-
bj .hrt"1 nrth"A ecie*
q19. t,hrte d0'! i.;ot lL'irh the ohjeLl cteo-hL and t"l<t'n"l
cl&ss nortres of rlose o\ie.rS.
|a&va rnslcr r1 b)a need h ePa,fo rhe

DP Nt'n*1 gn.." '

rJSe obotadcl fau*"tr 6'orrc'n tpluch ;o


grirtnsicn
- !a*

'intt^r.ftre 6 6bstraat clar '


[rr) s]$crt d e.\thd Fra,n &rrroun clals
na'rs ol r$e
\.-,, cbskdoic.n r'e&n s hiarng irnp{evrrenloltcn . eb6fo4t '&tr'x l"*t 'ttt class

-,,, o{oett dbre venlvinX anJ utiti zin3 ttse ohietts


ddvctrs in octv
and Ltdtizint flpse
enHre f,dbc spd p;ca-6on Obc d+wrs ctevabryfr*
\.-- ldbc code 's hq'r'ehiq3 based cro obsrro* -t'o"t1 cleslgned portcro '

Gnnecti<rna-=D'naYb*g"''6tt(rn*tF*(&bc:odbc:oraAsr"]'#[*'";ggt')"

I-,encsnlsiduconr'hi*s-l-ltlstttohlttrc(idbcd"iuo{s'trTuaJjauactaxrl1al-
irnplerr*r,ts jarn' srur ' G'"rtr"ion
: its

"ccro' obj eoithou'h €)( P05;ng 66 d


Lncrt'ln3 clax rnr"e
'i6
hL,re uf,are ooo,b,nl Loirh idbc
(-'- '- ) ris &eR^{'f clavet obr'ttt
e!rr^ il.xrg h D",u.N4ongtL{ . get&nrerdon "p.11tr

\v' !,oru d cm jduc dviuw omd jclbc tot u.)a us( Ihis is Lu-l. 6l"swa* &'amj
'srtr;ng
lhltt{n imp\errunr1tu-ti
cm'

:
y*.! Exarople 6n 6bA) ic,( r +i,u'..!11 irnCe'nenhCri-i('n).

ll cor*o. innr ft,1 a

inrtyR.re Aoc
t
/]lbt,c vojd xyz();
.t

JJ i.Ple''r"t .ia3sr6 .!

Cldss Testt iroplercotS A(3 c


{
P&b\id lesil ( )
{
6.c p (' resir ").
&

[tr'5llc Vo;d /4r z( )

S.c' P I x/. 69 Test] ' ):


T
? 1f.",
/ ;'nnl*ne*raf ..n cl6.?-s a

Clats -Jbst?, irplcn're'r-l S +tsc


L

?&b\ic -las+at )
t
t ".p I reva');
3

fr.uf iic Vcid xYz()


{
e o.pf" xyr 4 fesrL"),'

1.

] 71resr1

CidcS De"no
t rzr \
Ats" t'(-Sil"6 '.'o-L )
\'<we pub\i( 6k.-hc

l)4**X p*,
'
if (' ',o,r'.' eyas ('a ))
*n,,n neo"l lrrl t l:
eite if (rurv.1c. eX,,.olr
l*.b"))
.rt.tltIn MLLu -Te:fa t) ;
{ l5r
1 .r€ttt\r'r 4u\l i
3
ll aw,t uAc

fn"Uttc clc's {U.r'o.rE rtlt"tr


fL
P s v !n (Sn,, o'6e | 1

s
lJ6,':;a^1
ll oLrv*"+ -1",r"7 y"tt ^

45. otr = D,'^o''"r, f""n't"l )'


a tt. xyz() l
1ll","
L,.
r cIM
fl
'it' ^
2lauac -AL"r*'*frtt"7T"'t-
Ziott^ -*tn"*t-c'*\ aiL
>J*uo *-tb"'&-d.\
I dot'J €xamlle o'^
' o!'u"*t-'n1 S^*n 'YLfcr{ fvfQ^bs"
z

& *lu^ ;^{.".orr- a^

dc+r. h^s
Prcrn Scr.rrt),
le''tl ho';'-'3 *rc ex;srin3 ohir-rl
Pr[!g: C,,rdlloj ner.,J

d.id
;-':;,,:
':=:'
ff"ffi] .,,.- ntnohkt conlzdns u*t;"6-&nr,ra

@sr,utllr/ 6ill
nd Lt
''l€d-f,ton
a'<eoutd 1,,'tn6 oblttt '
i";raa! d"$- |nl /]lu k e^eeu4l -f- "U'eo
J.fa
Vtr'a^l Clflsfrultals
plrn o 6iars ue c*"l'aA na' "
tcitt nof Je
-7 cb';1
:'2 6fu'r' oLJ€rt-s G{c c'd'a k
Ce'tro.l'o6
;hJrra-fi 2""44,
6Ft3 tLol t*
ebun)&I
. pecorre 'i{t', ;t vo n(el '( oLtffi i';uc'Lt;^n ^<L'
oV eoi'u^'UN&'*a a't In)+;^L
O:.)-,
c**d h, ctoc,-^t^'6 (* +rf
?*+o\r'
a..u'i'''.d ^-*^^ '
Fk""
-=7 icort-^6 orrl ;; s ^'tk^, L't' **t,7 ,,{
lr -
i/ Clo'rc.Ule lest' java

Che s Dlrno innplemeni6 java'lar6' cloneable

c
7
int 0rb i

ftub)ic &*of\ )nrx,lnr r)


L ' ")
5 o' P ( uemg ifl*S$arn Ccrsr'Llcrzd I

A-- X;
b=r'
,,
\
Ptblic Dtrmt )
f '
s'o 'r ( nrrrr: o-?avorn 6cn-si't'tt<r ),'
I
BA);c 1hlt+ -gCtonc [) n"^t E,rc(pHoh
f
Ohi* o6j = &pt'chrt O; llp'|.-.-e clonln3 e'a''ftrLf invobu oE1<l.t-

oqj ;
B&tic vdid d+( )
t5 o p (" 4
='+ot b:'+u)
" '
J //aots
\
"pdlic closs Clo,cdbleTes t
{
P5 vm(srtrqtl c.r911i{rnos E<cg*tonl

I l,rn^* D,rr obs:<a


Doilo*I, = n,^'D-o (to, "t'1
"

'd1 n
Sc, p t- hoskcr,dc ; r Jr . h.sht de C)}
d r. drspc) ;

/r*.P.- ,t-n
D*o 4" = ue(&m")a,'
ryCl*a
[]
f .".eL" J= l^o^lc"ae ; ' +dz. [*tGl.c))7
d", Jirpcr;
\ I*" -' F ohkYre> io-oat (lo"eolL;rar -';1* -'-''
I lL"^ hdrk^? > p,le6 > At$s > Dertrt ltorlcrn

ll *" Ct^e'''bleTe*' Y''^

ll t'"" ()uullel<xr ltx fit".


o\p+ omriao thvotrSlr
ctot'i5 47LvP3
.-z lcrnJuved t6 rrryrrsr cUlrr| cgrri on rle
se ltrrre p no ccr Swcrc-F<rt exeuurit'n
Leoru - '
on {a arornauhx ',oitl nri,- b.
---e Fle.^ objelrS Orc a.r€.r5ed fin",.3 h a,on,',, usrd Dest'nral,zorr

{xe ctrFd

-1?r tdored 1o&n* ofi<rn on grotorgne peslgned puton


tta. rqtrosS9
- 06laqb^o
.--Q",'dr.y D€sigb pd$ern""-

dl-ct3
h *"y
PrGbleYb:- cbnsi, .(*tc,a 4 Couelex odie.rs one Ccrnple* cluvs is lot- rcco.r,ienJe I

Pto.€ v! .
skf -{ ' tF"( as neeJ'J ' -76' '
x obictt3 !'ot n''"ltl glt 9-ple obje'+s
'
.g[ub'cn:' C-"r'...* conpk
mubple inLoi&'"J o{t'+sJy
*, !,rra.' J.r,4n fdcrn ' uoliol i'np'orT r tle *'sobitt Q
C-st^,"c.t","tr il"" G"nder eUe'ls '

':""t:- / B,.irJ";T.rr -.i^vo

4las s &ng et
;
ft^bllc inr Pti ce C )

{ .ftt<-\rn
eS;
L
J

cl&(s F"rcr
I
}'Ltic int frx-cc( )
l
vLfirv4 l5-;

13
Clc,js !rt't<.
(
t
Pr,-b
lic ;n* liritec )
i xtttn 30 )
\
3

C lats f-leot&'tldcn
{
Pulli c ir'f arrcPvice t)
\- t
lo6;'
llLu;teu Potlu"
*ntra D;nvt)'frrcQ;
Ku'y,0 'Prce()+ nrrr 6bua,'
*tn ;mcet)
r^*
1

c lcJ! f,"oa' BuiJcn


{
,*"' lni .olcPtscrL)
t ,rt,r*
;r-*+ern fo6ic i
Ddnui)'f'crt)
norri hegt)' gnte(J + rtr^t
Yrn
\'
.p-bl t t c l&r\ Bu ta,rT- r
L
" t ". t"6r: -\
-- *6'>
,' "(e
I
llc'^rt"^ ouYrl
YIe"IE"qAct()'
Ple^lLu;du 2L=n<'ra
in* Y41 :mL
t
' , O.,..t't
c'A''?s< Ll '

\-''l
s'o ft' 4. ^^L Pi'e is "+vat )'
J

ll C'"'\Nlc,. oLfuk a

e"'otl'[9cld"t ^"*lLad-()'/
sL=ueA e :
J
i^t Val1,=sL.crkP;cet)"
n \-/
r. o.rC' +4,< sno,.l, (h.. iJ +W t )
:
1 t&. Pr-Sfa n
El;.t!'n?o\u^
> fL.r \\'r'
*iw> D"vft"lur&'n
i NAPI3>

l>.huac &'l U tTttt i"':o 'a&'tr>


'.J
/, fuo lk;lJe,'lerr ,^t I .-
-+.
>-lIt-
.he Au^t,u,

ttllL\?rT
7
t "ftsfaflie oW
",x;-;;;: "tr ;*,,,.
s:T h:-Xr 12
rol<nrt" Q I b 11
- Kai*u*sr r{ '&ex :
*::::"':#"
v
a'totl-'
f,&,pret clace ; - n ll as Iflwi le ; tyln
, i'n@twe ' \J
------""-=- o'(#'8- &'4 ingler'1l,^ts
r:::::-t o\,^ cto,. e,n'.f,:: i^l<''.'A<j to lr'roo'det*'w:,-
&' *t
A; r & #\"-*;
ltrc?ae €'u 'ui
+
'J, '*
4" olx &t 6tP -.r+oos '9 J
2'
Jo7 g"t*^
x'|
^gl,A^ intetlac€ ,-
i o*" "'* -1
goiJ L); I V
8,!;.
"purtic vold c'L)"
?._ a)
x1 z-
.,,' ]t" i'nf ir'vrrrJs
a 1
v

tc )
n,*1," {oid '-
I-
=-J

-.Jrrc
t^vr'
vo;d *) ll" ntr( ^uiu'l J
\
t
,1' \
-_lL
q-
I
,v, 'T"rr' ;, ,tf inl.rz<kl to yr"vld' inplz*un\$a 4.n -uLl 'q L',t- i1i.- ]-tt"J h J.B;;,uo

it at nqtl nt+Ld Aekar:'n ,

9. o)opte' claus ;-elw'z^h1 *<^k'ce


i c'n<l ymvid< nalt mcsl.oJ ,,A* J
'--:- trv"
"'-ih^u"* caq owat.ide it< oo\
1't'*+'-
+, l^R,l-a,< -*bh ' so +!'t c)t^ 4clats
- cLottc m<tl,*A LX e*e^L"'4 -n"- Aa"yla '

r-' ok;\..u,."*
C

,'^' [ \l2'r^ inPlcm.*rs t'! z


\---2
N
PcrJ'tlc rlaid a() t 1
t() L\
Yrltjc rtoiJ
'.-,/ p#tr cf) f.3
. \lr,rd
3
TuY eav-n)'t
flyol*^
c\c'ra
,t VaiJ aL)
" n*"t
;-
"a

,, t()
Vatd
Y'bllc
\J'
L.
3
z

- clt ^ T-" erK^lr WN*^


- t
s
tJo;A t L)
Yulv'
tz
| | t,
, d'o"c n
- 3 to'I4so., B'
' c^t"t" R" tl*L lo6es
c '
[c -{z)'a og 'atsna'nt
t4 fu o[4vt cbN"s pirt &"e4
- - 'u
qpmera(
l . l.r'^. 1-r-'-uide
-- t ' n-' L'r':-:---
Qo*dn S;ou t lo6i, t (aa"s r\Ql merT'o<1 '1"9;iu't)
-
' i ntratngl a*i cn J^ /d^7 .tt'< cl-*s
' A s et' ,1t l;(F net< in"t- f-cz
;( a'n olot* fu {*
)- davrr . c,ul t ' e.uen'F . fi;'Aotofidoyt<"t
t"*.*y','ff*
It Le 6;adow l)nl"i, Lo:nlor CJonEnT^s" ,l'lindoo?cLL\L\tfe"'u
dn ada+tu'bN 1- i"'f;::#t:'W'ffia
--)Jo,ual- ge,nru.(Jvne^ic6rlc-r- ctc&\ rr pa'r'n{

uni M*ptt clntsu.)n ,rr Pwig< '. ,.*u


- g-
oLo* 4lp^ ure inltkces
,-*Alg::
'- ry e'\ ?L des/gns Arr speuAcad.,n ff t&e pxiex ),-,n3 #,'ffi'AJ;:1J-"
\-. IrrD $rame"{
"
flts ywtttt 13( urcq alerrcrl- clc^y.5 !'lfli es bfl r,r lr'c arrA 6<..ide|t^o o^A
pe r.rre9 l",lr, &ace s fo Eqoh o"l;1 ,rt"s{-at^"I &16-.^+'-'").
- yw\* \ac'- ") fu Vn l' G^f^'l+ lu'''
fr,-^n w.f(ro \(i-rY' \Ti,,^e! &D- qre.i(;cc'l''o Lllte ]t'/
'rutes )a Ac':t'( rl-'t f"i;" J"i*o c^) 6'nr<a'"a)' t -rk'
^nA brL)l;ftt .P'*
Lc *"J!t:"",*?"
&atl'tJ
i utl^ a^J o-l t'+c'{o'-s ot't
*,,, * *U *f-8 ""ler Y*'o -'
j^g ..-lo J"'"t'7;O
LoiLt Le 1a-v<"1 ' -L;1"
t6*"t Uny"**
't'n*"u
,l-t" Aa''he;'1 oAoyv
-, ^
f^pVc<: H it"^ 9'-t-%'< '
fia"us Cenynz*6 k 3VE moo^el i't<r (oo": c'n
O+dL; li$2 fb oLi*
V'oq-F^e
.-'--. y''vicl" 9g<';^l
y<f wr\ ' A^
e, rc^.I".i fr,n Sye-o! tL,Nes,
"a t'*tt
L"
ot eyer;"t c"'^Y
= w7 od;,.V )"t:o clw .
SP;J iv'jd,*a-e
aA:tta* elalq &'/< ;19 nwtt i"^plutnouJs

:!tYY-
98.*,.1 DTo c\c'ss
t &nd it drr"etrq
6tr"n he t)ttLov{
zalte olqiecl ' So, lt)e CAr|
Qesul't 5(} objecl- i s oot 91idi

SoluHoD:-
inskad
Agprta<,L r .: ase qbwtets @ o{ f2esurr$ts
r3 Je&-rr)
o* .Q",ic.\izat\e ohie'x
fart PYas*e
data-Svnto*uu *'rd ed Aaf
Cop5 &r.,4 Pesurr&+
a'i h ol\e'ucm t'.,*-e
DaraSk rtl'e t"
ilt nelcoo{r ' L+n c.tlcrr.lo'r
$"-'-lU D*'" 'i:.ff:f' :
i S',#","" &,5^ s. e qe -lrgt-'.4La to sot'x
$.,,.o 'no"t Q i a' kw"
d,,a
florF
.t===
i^ t14I
-"n
'+L" ^Ior" ynac'"" '

*'.d ,!__43jS I ) ds jl r.,"c 1r"t",.6 {o px &"',r e -,,11-o",er<.s Qr^lq*.*ttu*


-a APU'I
{1b 6o.-.
e
{"t^ 03L non-<;nc}'vowx dufo Cftt"f""" l;pe *r7l;'+,h\-rlw -+d L*"" ro'4*-"n'e'

l.***I, drt^sv"*'^n il 6'-a'* to"kl l"P&-^


Ul"
--> AP+<n lmouin1 Ja--to Lallech'on

tztJ J'unsv""*''l liL<- \tt''tvt


*"J u.) 6; Qr.,altons 9r,, ltaneou t -$t rse
t-e f6^t/''

l, ++*l e"e"tr'

l'.,r D&S''"'r*'
ln $e abrc Gar;o rc p*l* ,o,lrn orrl *t1
uDdel3randinj $e yro utem ,.',ld,ca h col,inJ l2rsar r&t &6 f" -4'"t6 Lt f

oli TS ( Ses{tr t5cro[i )


I (Arro9L5t ) QTTL

lot tct'-i,esl', qbooo


t<.

2ol Yd'yts| tooo o

ALB.

fu i".L&ffitu/e "tj* E ,,1, e {.-",.r "P


---z La<\ ,eto'td o? P.."rt Coaknns mc,lHrle volt..es '

ah ' Ae euj, vzcn^J 4 &ttt'Sr.+ dr,.rl6 h z*I


*A--aq
'ilv L"t olLow one oLPt So, Ce,'o'+ r^d,'<

eiu**,+ -/n'',/L,t
U
s'^ - (Lp;'eA clt"\
-10 ','oie 4e
qb'o gY,,oho. Pr<"rle uulz t',tulr;el" obj"n h UVs-'Jk'*J
t e'le''r'1J't< 4 h\L'
'' ^t l"'n It: mul't-p')u
oLjetrt
1",,1 4t A^n- 4 -..u;'\e
wwls ^"4
aA) 1Les"

&)& \, Called c'g \/r, rlan tIOro "1"'l


cLo+s (*[;"; (nd^r''-u olt'.*
s,iu, y-no 1k' Qw)"k*) 1 7

Ex^.plc Q*9;
V.o clars
J n'''
o tr^s f j^v"B*" )

E^pBenn ' iav a l- t


p&bl;c class EnpBe"n iqiltnu,^ls iav ' io ' S*oA'*t"

inr no;
P{ivat'e
Fuok S-"J nam? ,
f-!oJ. Q.* SG{;
/J *'* QtXxx[-) o.J q.rQX*"t- ) ,'tl"tt

ll ud,, J-d c,rtr Pes.ttG+ oqn au''\ +" h"'lU'r


pssgllSet t's -- 5t . e"ecure0uevy f' stttr.t * F<rr'\ €mPlolee
');
al An.o.rlLis r obj ) rs (Res'us<;

lrraglisr al: n trD /V"1L;sr tl;


r.oh te, [ts' next( I )
t" I
/l c.r5 et cJ., +trv, I-o ore btgBean abj

f,op0er,n tb : nu,l En^fB.a,n t) i


eb. sttNo (rs,Xttlnt6)) i
rb. Srt\\rlns (65. gerSrrrng (>l) I
eb. r| Sor lns . gerFLo"J t:r ) i
llaaA uJ" En7Bu"., oheu a *"ybtr
al , add (eb ) ,'

't llrc\"ite :
J rr- '

"eb' i' ant 3rn3[e 6i5 v.r|"e 11 G^U- "1 t-"lrlc L

.-4 xq t\e obatt goneri o 'r'r'*'|t"J\


4'eV" is ioilLd ar' ! o' ct"r't
\a.[!zr' so, rl^e clc'o pgfl$zu" )._/

's5' i' also ldo'^f, *o -* l^t d*^ 8'- *H'+*-t"w k


S,-itterl;
t< "fro c'L,a az D"I'o crt'u
-A**L;.. dt,v,r*t t'Y;'
0
d*6'&n ",' tt *\, "'U^-t^'.k*
d- ,. n..i-n rmp{c,,'r^f, ^k'- + h
-11,ir i,nlltmrfall cn is wot *t1'li "
J wke nttu'1 ''tl' ,9f""'t ' Wnal'
&w;rt *'ru'"n L::t )"ra 6lr.*!ray

D*r5"P"ttt"
T^d* clasS i-
tuel hLt tl,, tet'ttAtt;1
S',." calcT-6 -t''"'' S"*d'
p'S\e.";- D'xl"pt-X m*ttiPl c ctarats 4
:==: LJ

*I incc.,-ie: IL' !,'.tr^ - +Le ffiranu*


'

l*r,,q *ft o^l yil&"<2.


^*d
4r', V8*^
k^jW cl"u 1/"' -'['
g1 JcA,e *k;' c\''x+
fid ^ +t^'
Fwlarat<S Can
o^e ,.fuwu\ clauu '
]o i\ot< do:v,ct
P-"\
E"o*r(o :-
..=-.---
t'
tn\V'/Y iaoa' iO' i

flr,*rlos" 'l*s
clc'* [J;te,v.L
&*ton*
L
Ilg-t"r''n
o,;rrt L)
'tv'r s"| i"'t-
fuSuc
[ *'t^ atb)
\ *t);
.lo)J ,L'R''ttO*
e
il Y'l

luJlic l|cdo*
]
ll g*^ton t n T^Ptt*t .l".vl l! \HR,L
clotj Scn.r lJ"' rc'l exftn
f.
'.-, [rr,6tic VaiJ
5
"L^P.*u(;.rt*)
\J (.r.ptt r);
3

3 \\tu'L"blrPJ{ '

'Ta.r,lorc cbt's
\- ilfrwt;o"Z h
s Qlr+t L
clotA Fre l'J;rc"-r Lxgnd
\*
t * 2
uo'' 'l'P'*vti*
""
{.
4
JA
$'il'#I:ui.[L",r, +xr'))'
\-' E#*v \o= ua)
E"e&t*tLfn6'
-(* Fu0u+"*\tn'-(
orc'

EA+o"aUan't
\-/ to.r^c,irclS,; ;
\--, ya'.flo.tLt Y,
.
Iu, ctoSa g1

\! 3 il'v
caH^ff*ot' ") t 3
\--'l |It',l..r
J"
u*

V'Ilt' ald6' T-uUntt'n


t frePu^^
o u* ( si'o-1lJ -rt ) *o'^'
t
'
9*"^wP'/L\:
: **u'o sL--v\e'n
i
it* (ro'z'")
ves = cc's'm
\r gc' slnaQetutt | '.l) l

v
Ft"fJ;ra- J^'-'*t FeAswtO;
,^-- %.<.r'(to,-)'
-l*,,b^Wl@');
\/ 3l*a'
\- tt ck^u
J'
6qlo q l,:o tt-
7 O ta,f *+e^&*,x',,i"acn,;-

ry:t U^en_9:- tlry*"d.,,'1 b"u"p o{ rt,aurte i<


6el;ni ;rs &,,&* -,
!@* h Se.o,chi^1 1^ *rr- uTli\ x ca-tted a.t D*e"t t ,^f . j,.,
h.^l-,r
l",tf*f $e Pr.* I^ t,
Id fh" va.!.ne gnplitriS b.kne vhti?;\ fl"r,"_.
W er,^Je"rf fl*s l',e+t"tra.l .,1 ,A^ L" Jr^,or,Js _l-_ ,,
9 lte hs',l
ryn*",
oht"+ it
fl-a'*t l"- La*a3 s/r': tl'-,y" JNot:c,J.
sd*tio-- l)tf,*d*rq \]rriatl.". (n.\
I \-,.

\--,'

W d@w vim{a, .-
&pna,"q fnlt*i on t- r t

*laFnde"rt '\-./
Afsr6n< ValLk s ro \rort{Te thpn ir
ts latJs f,uu* "

y6luel n W' to' J


undortalin3 grt,"' I OrJo),.t'o' ' ' ' F,6hu 7lp
--, m Dqurbe,*1Jrj€ct'c.n
,6h" ^ru*"q need drnt n*Aar,n *, fime lo frtrk.d u"G rh'" ,t"tues

d o\y tt ts
\'nfiz'uze tl'e obiY*
g- -. L.r'rl JUn eteu"rs constua'tz:tc cultaYtart;o&3 1a
' .'',,'J4, l€P'.- 'lLt,a,t Aa*S"'lu m;vts '&^lnr' n 1u^ue*n :
;=-=
F@; Mt 9et+t',Cant"tz't d'A furc'l.r'eSnu;'os snXkt
*",t^z G,tkql,trt p".kr,l;s f.a'
-fhe
==-0'0 -
4 'ke @^ +[,"u4L co^'t"tfur ues"x]on c'*'et u *L
>fi*1?"y"';*t '

- it iHa.L u
tn'-{ ,
u obie* 11"iuo.!-;u n ca tl l
tL'nde'r u7^fitd"tP''-' t

,nA d*^ l''*4L *u!''d aJl-s


cunzz
:*-l\" @tI ohlu* ls 6tcuye-d
v,

&., YW*go .J

. -/
Flg rc.'gh* p.fkrn i-
rtPr?trudoq + emplo,leel dt-t-all s
Prcdcrnt- E dhpus oP €mp)a,1ee CI ads

e'b3 eb+
eba

no: l0 I
'no*{G\
rnmc
@ t@9,,
,'@9 ,air

9ol ut1c,o ,"-

gx+rinsJc f,a1a, tuPanren JaI

infytn s ic edf:r'/. --)c"t rn"^ ee-<

ryY"^; D).rn yocr 6rea-br rnurr;ple ode*ts 4. o ch's Lttnt drffcttlr Vcheg 6Hll

thtre is lihj cf '\o1-1rng $me Shrne , cornrna\ d"r..lvofu"es in Glttd h faDFttE


cr q:stibi

off- tkne rnrr,lHple oqje*5 . InsFcad o$eu- tlrroL ah:u-S allocarlnl &rnmcn *^ttJ

anJ uSlnll *tnrc!-fu'Le O6wa,


;"Htd"o
-rhe Ct.nen A^+- 4 rnt,lHele obeus cftalLl !t' ^'1"^ is &-tred
-) d sic
t lo eod'' obie* i! CdJle €xl-rln Ja-t.q '
$.nrtat1 lAe fuo ilrat Is sW(1

Jofl'oh Yro na''v"ra V&q in e'L<"A ObJo+ Cctnu un)w


-frr *u oLow
q(hlhslc drjo onA
"dt" Gnct unAu ihhi nsJ( d'to'

yyy; i'' oLiet an) lnjr;n glc Aua \n tunno'1


e+8- frlr)nsic duro 'M'X
Dat1a
sl'o'eJ elxl oLJ?w fl^*"11.
PlXce,3w
.tu*'A (w^ cti ) nnd ure it ir
patk, n i^pl cne,n*otl ou, .

f,n e*u"nl. ayp\;cz^Hun on ?\ua1t't pesix'r ?aj+<r{n


' )<P<n flh't'^ fuyhw^lw,

l^ Aou+^
r)* P.leb leve I D4;1n pnxt n *

o Vieco lwf-{ ",-

flobterD:- Nr}inj Java cod e C sc{ipt ) io f,sp is ku,ro 3 -Brraoi''3 lin'llc'li ao5

t kills . *,e recddbili i3 ol J5P


-

o Kils the .rerrgobit; Q o( J..r..code YftM.5

a sbl'J t-ia7l :- -fmplerneot viuo helpe't 6lss;9n {t}ka o nkth ;s no'}"A b €@g Jsp p?Dgra'a q.s

Jova ccde less Jsf prD3ram ' 4" rl,is ttx need la u3e *r f,orrot'i n3 JsP qS
grlpt le* dedomll oo , exf, esgian +nE
0 ftP b&i rf -r n s e(ef '
f&d

(:l Jsrl taXs

(e --ft,:rd po'rrX 9qpiizd to6s

o Cujtaro XUP kfla

l-
vierc DslS; fr}rkn
@ Ccmt,sri
p"r"
n"utas 1 Jry
k^w.Ii.r'l''91
Yyv' G"tar I i,p pnq t l'{i c Setlu b6tc
1lo6;c kod?!

pur" Cuntenr tqic"{


rrA n co'.r"r- lltc og
mcii n (l)nKr* loSl c
6ctgele:
op oebruge r ryry::,
FooK! looic
FooFs totl c n ra [,ntt

(*'*'oo' "trb4|ad) -c41ez)


(6cro.are.r (54e"+"r wd'4aaez)

lo6;c o( coce\ fncga'rn Qre rro f ye ura-6te loSi<


4f* 'ilre 61,-1a," mt,rhple cr)cb \.t14
v"s#-"
^r* L,u'd coaAed )n etfi be6
YLsok)cE
Ape he,e', kq,:l kc*un rLcl d,n @
cv't<nta
Thz mutlt1le &'Lb tbX'|s 4 ueb gllt coo,jei n grne hadt' o A 'l*f- ' Bc'l-

of^
ec.L .?a1e I
van Can*t& atbrcle tt &lk'e*

cu-^- l,6,rt il, &r*dile l"to \ hn'V rlu^ i' ery'"n e,al"ws"o'vw
yn ^ovrfu itt
,"d t"^de +{*.ar ou4"*" {-e lk- natn 1,gl""*ou"t P,f-tl
t*f-S )nc
0 h ,a. va,a$!-) p6p : i"clade >
p^ott *"LW1,* +, il;t Wneed use

-fi)! p[a f e grure D ' i( C".rle d irnplenn * oxa "P


&'npslic Viao WTh Petttn-
ll€odLr sYv

Sorurct / 5sg f,vo gr


u. iiqrude (-, -)Lor)
Zio: iXcu,ae >
P;n Ar.*cf|t lB;c ficrin Coy!t1* lo;ic r.aj^O'nk*
,,f f" 4- ,^xt"fqcz
"rclf"{e

a.1a-i.f-, ) Lr')
Jd . i"tftrde Ct

forr 1"6 rc

It 1"" co'"roon lo61c g ( f,qa.ter and .fi-t. t'gt"s alt fectla-ble i?i(s )

@ kon, G",|Norle{ Desrro a'ltt"o


Q ceL a4,yl'c"Ito*o cos t
O{djrn'1 iaira clar<es Ao* o" u'LV c'g oeL ttsa'"ce f"{""v
ryry
Lli.'t gtilJrat<A hhrrcfesr dtfi'
-l.rke $,e
- LL-
(an t,^Ft:
Ir*anryrt J.;**N-
y' .t4 A",a"lfu Y\"c^ms 4 g'* ualattx."tt'q
t@f all l*r!'*ynr V"'
Gl,.lt^'. yu"Li q,u^r cuo I rtp f'*To* ^J"'t 4#wilt't

v'cL'l^'\ a't-h^1
J$: :,:T."n:,
&*tr
#::,'"["Hi^
2afu,$ort ,nuJ U\ mo4^ u't-Yil-an'
&oow ,tt^tron1 -T.rthf [w,]ey/""n')
of
-
U*sr,llw"tl,ar,.
0- $."r zr+'l-rrA - -.- ^ ,j"r.a;E;f
Tes+\rl7'do

wY,oru "ctl ') laoa JoueT (

bW,ll t"a'l^ur'-
ret&lrl t>'d'.

wuIE:- ftw (-not i, " *-d"1 xJ r.rrc,'t< W( ar\ g"1,ar' | :r, ,t "- ) *h"t *" a
Qo,Et
- Enht a,nl Enir piv,.r t^ rL\ quest d^ot ojrL FO OAeo q*.|*to*tr" j.on^-r d- 1',^
!;Lon
olrt/lahaq ,luL ,,r" )^,sa cL,-xcs
Atx'"Cb"o "
fiLL
co^'*^ (1<'r 9^'t t' J- 9n*w
Fn'"' rh g,o!t( I'K a$xca!'! on. A'u'S'*tu- )' J*'x
=; (b^"*"JC*wn
(c*^ri"n-). 3^8"\ wlnvc Drr*.uoGui.r i' &cxz'*'*ltu {'a

eto*er (-.ro^ c-0*.-, )


i
hie-b. Arn I Pif" co;tl, *'i0 oartaft
.nrA.xm\
PrDiraro iD
ael>' * ' clo uY
Ci^H1ffi Fro" rSrv I

ttust te OmergtH in ut-b'nmt " fute el


'le't
IsE!- Ptonr Cdnmller setvlci lJsP PrD01^r4m

€,\ftn6ltm rnarti uvt


Poffc'r 4
cdrh dirzo-org rrurcA url Porkr h or coltfr

tdeb ' xrfl I

4toeb - opp y
<*wkJ.>
{JervlCf -Dame >F alg.rvlef - 1pm€ }
ls&v t& - cla!,g > Ecm rsrv z /Sc,rutcr _clac s 1
4suvlu >
/Scrv l(i_rrnpplnX 1

Lkxvlet - ncLrtr- > Y z/ Satvkr -narne >

/-url - Par*an > +'Jo Llul- patl<trn 2


Llwte* -Ym1,pinq y

4weh't+'t'>
I wanrgu " jov a
impott jotax, ScnvICt- "y.
imta*- jwax , K.ture+. htl7.+i
lrnPn- Ju.tu . io.+ )
yruHtc clu\ 'Fl^Terv €xtc,ds )\7Qe''tle+

y*l;c (ilwe !*wfuq,exr''Y1,, l+4 !^"wP^r'"x'*)r1."


V6ld J,a+
t
Jl6*o, x lua"as
g*I)a* t>)
p;*N'''* ?, --'n's'

s' spafu"rc"rfirt ("1r^"f t'r.,"t" ),'

I +v, 1,, reoL/1e|l atnl W flt vt4ae* lr affqofrNe lota dal4


lnt ,rt-tql I =- b ;
if (V,. 6etQ'vWPa,O.wats ( lt,'n') )
-Tesr7 t1 =- neta -l?st}|
i
) l
. .lr(r.{l I = tt - bmt (to,>o);

S lliv ,M t.
( /r''a" ) )
etci''iP (1n ' nr:Q*wPoAL) ' e#ata
o
a

Te*Z tz-' \\e!D 'Te:rZL);


:r,{tut+ = Y.' Lm-Llot'>o)l
1

llt,'t% +l'," nawtt


pr,o,ftir,rln ('2b", zL)1ht asutt is i " + rcsut) )

jlla"a"tq
uo,, )nNosr(WW'utL*r Wt +)+\C'"'te1-fup*tt *t )
Xr*,,"
L
dn6rt (*+l ,'rt') )
t
5
j
Dorc: r6foO 1"o.
(E JntetcePhn3 t'fu:- lrlrrce{rdn3 Ftrcl fbe gFgctc,t tDel Yes.crrce p'4}goot ol .,4af.{.-L'Or*6o, V
llar i9 C-t aaAz + f-{tPt5 rte rclucst { 'r.s1r,"1 fi 6ffis,r ,paf,1.esta1,uce L

:
prab)ero:- keepinq rhe
----- ,.r .,- cooxr6.-,
ccr",m.- and ^ r^Lr,t r)rs-.nar
^^) 6lobr,l trs-rlAtjrr,et- p'pu",gn'tl7t
r>trcv+)n\lqlLc alr'l
r onl Past Ttr/'/r$c
Ttl/vnsc ffJrlethLt')
tr^-^L
W" in n*\ ,r*n vt)crcsa.rce {r"Ato- 4 aboryaca*a Vitrc r!''e ^re-*aLl n 4 'l.e O,
t}

de.
i' f;tr-
y $rykne* rnntal,a,n $u.' Torl rurtu:1 'ak& '*&xb'*s*ulu :\J
m1cLfi, ,---t gnle+ 4,toyr-jro, exj, tt. Cunrron y-r,e-.rw*trp'nd^1 to|+c t1 ,-.
.v *;
*WV\ *y'ut .ginirral6 ,^e!ilr<. Carnynan yosrytrfnse V,oraaan t|tc \ W\
YaWtL + 6Ste'r 6-L *X6,a-'tx- pr.f to^a
. \-/
\-./
f?r) 'ef*s".rS pft.-"t q/LLes'r p'Dcr-t3iht

rod; c
!-,u.,r ?stAnp (tr..8a/.ac o")
r,r lodo-rl ( 'l :) q,re s."rS Pc(+'Fsrhse it;'r'-}}{
,,=\ slv-!

i€1Aa rl
*.,,*",*ftuJ--- S.'m) {odrr.

(,lr) .rfrer6f' the rncnrt -r?"t'{t

procrs;"6 Inl c
Svv r

e)
l,np te3tsru e
52 cr"rl

plote r|''e
-z g.tet Brrcr ;6 o6Ar, !u.t- implem<av;n6 inlercephhfi
inl€ycephhfi tr'
Frr'v Deri6n p''t*n $'-""1J/6 '*
n
-*rroc'tnX PtL.efs + lcf.i c in e*t+ptr.n p-7,^.
'o"n'"x

O f'.'rl^n"ur'l-t",) l'tr r,
() -*|,"-.-sn [o6r.
O 1"66r"tr t7i"

* tv",
a tx p1"." r4. jno*inn po"t -"tcsld1r e yz-ohn,U,
- YY *3Sl"J I
O-r"^^%-,"11' 1"6i" o^A .nc-. - --
y::t: Frc,rccorrz.,tte'r -Iiaps rfie ftellelt to
t6 lHs *rrn ord;na,1 jc"vo clc.,sses

&f.'ctprinJ Tjrrc< -lw.ps $e, ,ftefrrLt


0"'"f ro $"ufet g,'06'c"ns., Gp r-gro-S ooj Jcl)o chr:q .

&nnple -$*vlet TIte{ D4.Lptrnl- :-

flg F;r ie.r . j c.r a

glbllc cl&s5 llgF,rtct irrrplernanl€ FllaY

{
P{"{blic Voi d inir (Fitaconfil f3 )
f
f/n;r,oti."n.n I7t'
1

l>,aic Void doErx.* (9*r"t?"7,r^7 -g,]il+?.'t...-re'.*, p;taC\ain f-)


t 1"6+
'
f/ rn* -tc1,,^"st pnawn n
&' JoF,,* (*r,,t");
Vgt c
- - ll p"s' wfonv Tt4raNc'^'
\
wtiL v6ie ctcr Frvg L)
t
1-

luniruH^! z--g a.1 [o6l c


l
a- JD Shc.rs a'1 c^ppliLc\))am Ftrrc.D;"pt .[er is a |+re; 9" *trrrer PF{Ern
,',eJc oainX er '
Cr"rtptlet" . b4 i-nla'rr-r.$n1 iorc" cct^ r;.,J I,rr_rD.tJ', 2tt..,
@ Abet ar Conrmtttn :-

l.
proLla'n : - arJ Co"d i"9 .rai., lo6;.c d\d.+hd tn X+*c+r'6Drr" F,l'o-(9"rroF,* )
d
"
Fz,ntC*.'ot r.r 's Ylit
'errr.",'),
I yncr*s . lez s hrrs de -?rr.leri7 4 nutr;(;""Jeo,t

SJ"n,n'.- Da,c,l,v *le[w


J,, ;v,ktyh,,'d fr* p,X'^- f +;*G,*;"Uc't ,-'1'^n
i,*o dnxas

)*'"d r'1o;^116r.1 6* rb $^ta;uV 4 m"&f,t.,!t-r. --yy,a -11.11,* cW ," ,dU,^6L,r


p$a"+ G,*'"llw '

Bltoft. trl^Johl -G*An, (*l'r^l-$'")

ry*ry
ze rg'e l3"o "P +,.&.r conlrot lc^ p-f'"t- C"6)
--t Abshoct &"trottel Chss i! *t .*fu '16 ccaro.'i,

J",r-tar'.6Frt ' p,V.,o Ur,n e4 sJde "? fltte' f.w'f t''thL '

n^ clerl ;s A!r* G"''^ttt !- '("


lron+ (or+bUer
-z \n 5i,"*< r'r €wftinm<ttt Dq,nrP,n
hs-?*t'Y ' (r".t'Z'x e,,'t:irat^t^* }J*tftde ,l'" all.e*t GrlnLF26v
9,-lo,t4 tu, ^"
4- t^*r.raV\'Lc,l Cwnttu & ,"u"a fitaDt'r-t.t-.

\'./
ll]) I"*ffor,"., la6a'-l D*;6n Pa** o *)

0
o,n" I
S JEE

cttn* Arp g-:rr ,


l-.

a
cl)qrBfd

3 n€rqodP h.and.h,JoJ &rq Oel |r2lYe


-Ar\; aHd'l td{?

_@

t
t-

rrrl gq-.
4 Ou mart .ro(lhd h,{ pr a.'P l<rr, $ypttur.an

Lngln rs (onScx.t''t,3 flut it o


Woacio'"- 1f pztnote cticz.l diw{ -lot B nir& "rrr''tdplc
il
cl\t^f arJ @Eu-tlt^ct! Coryu^t*
>o,L,,A l'1?t Llu'
& tr/.1 ''-""tdrlt
oho*rc 'oJ?^L
Jd,r'., ,b* @ Jiograrn
Sla.Hoo i - 16'&<efun217o^L lounA ltips 4"
o 9"cuAo +.,Ve
oLoje on. d.,-t'1 tsa^* ?vfu
l*'aoC", r,iA
W Canrav*
at 9o*e."9td" *f, *o'^ yefr-tt &"- .UT otrd "dr
Ot[t. iluanu, bny<ne,* ol .lrrrr^ is @tql
)e-te rle d1rn"rq !..el"'cu tc'"f'rrui:f
"rt*@,
4, Lr)
^.
!e\!i.or}.,aa dc ,
("ui*t,oJ" d"e,','t- aor 61 Gt o ur [,u$ ,' trJ \oS".l"-f i*l".Le
".,
.ndftta4.. ri,rJnl fr ps k ;t-t<"-z'al''7 afrt'
i
'tk 1 LU <^f Lratl'< rn'"d+i p'lr- Rug
^r-rs
Ct
'nrerrerut

cli.^t afrL'.a$"n lolH\ roi.4 rnutnY'l- K-s'incta Az',qna'+ I

ui-tizig orth q c-" I"io


Jcisl
'U ^etrJofu,
ro].,n) .

-- 1. dat'd ;nk ot eN4 cnl)u A" "nPfo luy" no's 2l ,.nA >)- '

crienr AfP <e"v.o A PP


eliet'J Al ?

r&1,lttr@

fla-t W
y'FXnch-ror,e (ornmun) tc,*|c:n tfta elic^r Av tt/.
Sgnrhrrnor, s c3-rrun; ca'tl <r4 rll cr i"nJ- futlt"r{o-'
\ sr,utr filt coh'o"
a"d <<ntt-'t -A1p\;caJ4orl

u-z taytt udill ,rpat^e


'I I a)6,n) *tYcnrc &nu
XP ctlgnl- ls Llocve
,n A
flaer '11pn, F
Eitih
e

h eliL\1t Jr". gn* . +!^* lr is t" &nv,Mtrrlaatl0"i.4ft


battc calneJ
{ n.["o"t' ,:'
.-,/

.----. J)\ C1)tit 'Sef d'{ (tnr7lt ct \cvt t il cticnr )s ln" ta 6ge"tt< naal NJPlelF ai+lottt G,attrtr
&"nv"u* ctll
n
,fl'u if r( fuUed ls6'ilt"r'nns '
-1., ff,w
-Tb
Adeitt'+
wy,^est reJ,i-4 *s1'ate

*6rrtr.r"os &tnmawcartn tl" L^rot* ntndara and r,.r/


E sire urre
->
arl"o, ttu clit* erde kh^nl'V1 #fax 6{ .fl, Qn'u C;Je tcd"et"sY forla<'

allusogehudu !
ffi otall spiy:,a
V gmtL.t
$
t
suve,! !\ (l
-_' :.
Yecsccqe

e sla }(,
f" e
clrcnt&0 lvle ss ar 1t|)$ con? ,/
-ct-fiIl-
"LgAestO @)
r+l @ 'l/
ErBtoniilfrp
44.YYQ mrftv-1
lt0
@)- (t{eeto6e
Poto..le
' \
J1- : ^:'l
'(!f'c* I tatS I ms9
1
t\!
P >(t
( b\\ c'r'03
ls[w

clieft side
A^
+,t -ti trrst )
I
S€.rw,, (idC

A4*1. Yol4oql ,-'vnmw- cctH oq U[r,. 6lterx fq,glicah t, an,l rar*lt,ple Kr,sl,rr 4
1

la*llonu^ts
i
-fie inplemunr) cn 4 n rdrt e net odL ^,s^d klps zh
grssa Fotc'de les:Xn
9* 1o+k'
on '
clir,,+ anl kcinevs &m7ew-r'ts , k r l^o+ Camwni cc'J't tn i'< Sy"lur,"oc's Ca"p'uacolt

to, rb clun* ;, Lo, 6 ta;t h r<1au t unkrt 'e 't(ulf


lt rctd*J &"n
VnuraJ< nsrs
nrltiple bugntN &rFre^r<.
maVe Ce^w,umca-11a7 Llp
.liw,t a-vrJ Lttstlnt-v<
Solutt ooi- u,re JMs and l"i DB <,+f,ct tt
Cui,LftN'ft ,M Artn&n aA Sl*,an oLw lioVo,, 4A-@
^oul
A ,a^pl \,,|",-uu crn fles<"yFoule der;yVu|'t<'rn ,"refu ftzno i- 2'Lr>3
DAo : (t* 4*,, geee) i-
('tt*\ a6"'lnLxi*ts b6i'"
ftat1em""- |'lix;r5 tr-t, prr<i<l.,nce )r:6i. coi* u'1n^ [o|ics 6{ -/lTlicallen
lofltL ,h* )oukt e c/a it
daLsnbt EL,e ftts;r;q oP ^d;{6:r^a- J- Wlct<n&
d^t d a irs Jnts on d*ryu"A
ktatn"*l Pctt(i&ata
94",'41\n1- I^g\"-'a* D*O dut'6n pr#cnn ' it k a Jd'Da(:\u's i flot
pror.,;.{ce hu;nt
tt'X rP
Lo&" +"- ortu l"6t.s Q Ae qttt"ttn d**V t* and

--fit.'roll^'
'
D'ro Clc-t< Conlaln 9 1" Ju'o"6lo6rcz
A:nvelt cn
c L06,, n e(ia"tt?311 4^"
on
Connctl4
6 Loft,,t lo ,Jease +1,.e

We ar 9u f5rld<t
Tetft\ttN4'l'

o bT. k P'k' CDED apuahont ^


Drto clatt<
DAO clc'x tot) ""'atriple
NarEi J, fe. tanlarc ""irl^* ^"
cne- YJ& WIrcU'y
'->

Pe-ca4 u\2 a'n{ fo*lslznge


l16;'s in Dlro Ll^A
NaTE:- -n dwbp 7c*isranct

live fiac,L;k,n"t" \erc

Jr ir plrcnEisn o? DAo ,Farl,t"1 ) Wkrhr fiL;cl" ccolann!'


+L" oL;t;ry 6 ft
rcfa'(vr 6 e Ao*",UUe c D AO CIc,r OLtctf Lase-J u ,1"" *,to il^"t it
e[," SleC h

frrprleJ . *lldc i< ure4.,t rnLo-n


p^jert 1rrot, rltrl nl;ple Aat-J"<e so(hto:rg
yuN"-t^X (ane pc.r9,*amce Olret:rFlens Cm ynrLtlnlE Jct ,Le,Se (okrlc.tq9 .
(\.,btic ctass llgDAOPacrurg

f
llr"nn nnerl,od
P.rDtc sl.*ic DAO ge*D/0 (Sitrng t'a-e
'"1 e

if (na-e ' e,1l,al s l'brc'cre " ))


Kirrrn OT4ceDAb [);
else iP (rr.rne'coilrars ( frgSlr "))
. .rer.,'n XXfurDAo();
el \e

?€j,(^rh n&t I ./

I
i
6b5hc.tlr ct4i5 DA0

I (
PkbI{ C Abst{u!-t vold rrnPeCoinrrcr, crt' ) )

ftrbllc ubst6l.;.t* vDl d rgn*fotna*rc^t) ,

WIL 6bfia-t* int insetlnPo (-'-'-' -) i


lr* upl"rc-I"F2 (-'-, - t -) )
PUbl L obst{aiJ

//lno cton 4^ osue


cla'rS Orade D A0 exrcnJg DAO

{
void ,aveCw"zutr"C )
PUluc ovile dbsl'o
t-oi rb
f /1to3t. to ertzr'b\ls lr Conrrpr'rrm

frb\lc \lo\ d n.teose$"nn'ctrclnC )


t on tpll. uo*' AL"lo-,
|1
toXv to 'r1dteox Cgnnet$

pubilc lrLt in::"tlPa l-, -' -'l


{_
ra \nte* 'rt-tu'l rix]-o Qrr.cle #rte
.l
flr,6,.

?uJjc fnt
(r
ulh-r*fot-D (-,-, -' -)
L qJale v'wX lvt $,2<,rc Faltt'
= llt1l'''to
11
DAo cV-,ts 4a l1y5lt
ciars lltSqrDno exnnds DAo
s
' purr, , vo i d mav e Gnrne dllnL )
r,'rr4 Ytfic?l db 6tiJ
lotri. ru €tta-blis I"
'
t - -- Cav'esi c-

\
lutil. vo{ d rcLeueGnnet{onL )
t-
' -- ko wlea1 e CLo''€ntt:.n,'' pith l{4s?l Jb e tLo
- |oX'lc
I
t
Wlrc iot inq'rl',Po (-l -, -, -)
I
lo'd\c rd )nscn'1- fttud l^to l't{s?l db (tlx
----.-
t
Dt6ltc inr crpl.rcLFo t-, - , -,*)
{ tto'
lal;c It upAa*< *to'< d i''' \1X61t dit e

- -- -
1

tn rl'e
c\oJl 6 41ert tc"scA
cno d O{'B'r DAO
,'
i3 &*1"
o -ru* nalsrnrnft
- \, oe &e
a 1
F€.ct-cttY
DAo F€.ctscrry
>.,rr te
usaj in OS- *cryrrtt-g
. -tLis F 'rq ctort
dara isor
dora +l,ar-is ttlprr.c
is 9t1pl;ci : .
^ n ..-a-,-
^ynk_. lutlsXt""U
| ,icc ctr'x obicn _na
^
Tnjarr h ser *l"et
DA-o c't"c

*l^or Drc clw


otler+ '

apu;u4c,.".^ t6 *-iY
ttl', l-" '-'-
f3*,n.,. Pell6ate
-.-_-_--:-' "* aa$0"!s ol bdrners Ccm?ctnenK
qJ-r,i tode

Problerni- Frrs ineSs Jh Cli€nt cl ppri crlr crn s calls bus;nat5


det* t3
o( no&E'<cuon' rf brsnerl tt'erB"l
in 9'rwr a{Pt:4hon di"ecriX te dq;n 6'+ heltit;ttr
a€ clrar[ed in .{tr..1 .

oturLo:- D€velbced bc\oe.{ cltrgs +-, Clienr Appri6"6- ln rrin5 ire f


oJi cs to tdl *e L,srntss
mor?ro dt 4 srtuttr A-pp licc.don. So , AnX rnodi 6 ccH ..ns Or.e tltm in r\e d*r'\S ot
B(sl ness merfiod can l,crPq.m rham B.-rslnevs Deie-6as d^ clc,x a" J *o* ;s no ,prsels -nq 4
Disturbi..l ctirnt +$pl;crrfi ons .

--,f,rr o,na an61e ii calte Sru.rs Actt<vrc\ a}{ a! 8a(rirz?s Dl r0"r< wlen ;ru l"ttT 1"5t. cdilta
t"r) 9y'^X c'$L c"'A$a '
d,e knn"* nul*,As 4 lldet Loacx lzTE avnTcnli*'ts

fn$rol C );

€erv ice Loorrr j-

PrDbl€nr:- TO C&ll Ersr.,ecS metads o? fcrs-inat5 Gm fnFarrs Betr,"6t"g fo 9,rutx +le cbt*
AppliccrrlcrrvJ Ynusl
fla$e4
E sg,rers &,nror.cr,r 'ftk-ftl.L?s 4.,r'.r *tr.q.I,o trsl
^g JNDe GJe

rP E*"x clienl amlicanor) ec4t"c.te\ e-t^ d^ir BusrinerJ .tf,.*,.c. &r-


mctr{ Indfe
og,rnx tha.t- iic.r"osc{ tEsa nQ,tLoofli mond |-ri Ps

vgfurene d P**
3 logig t0 gdrl'e{ BuJiner5 Gff4'rrotr.r
h1
Solultmi- De$eloP H€lEr cto{s l.arin "t"
oP *.,vt'r ond to keep thcr atae ln $!S- t4ore ddiueriyq \r
. cWryr"t A1plicafims"
-[rls iel6,r u
clc!19 is &ued S..r, i ce Lo ce]er ' ct&44 .

-j trc g.'rrr dtLl de,,t\o p ,6, ee vice l_oc..Kt clccy, ds j..oa q*


SlrngfU-an
1-u ot-ri d rnatlHp)e
LrrP? ers b ftoi oy\s .
Ne qanrratlq
vJ us€ d Seivicebcale a lclsg alc.n 3 tai rl Bksihers Dl;041€ rlals .

h or l"nett vefcence and


Satvtc< Locnte'r tspsoslr"le 6ad"er
anA gi€ ldne(s o5!^t /
kxdrress ltUtafe ycsg6rtslrrtE h cofi &rsi ne4 mut d,s *t *l *t E^r{es cfiizt] teP{'"^ce an d -

to Pccrs tle .rertr\t6 to cllen+ alplicc,Hon,

ntm't)l EusitessDalilcltr.

;aoTl?ontni

b?'ltL')
----
6
(18'l
t!-Dlor();
I (ts6 )

Jq rbe a|lolt diagrar"t Ar ro Aro io|i cttt-t-s Ctieni Applttation I foro 4 erel..uor, !D k".e

BL{661n1s5 o5je* rePewncr ;s


6a+Il.) h." n1r"r7 anJ t*ni"te".J in tk 'St,eF.' .tt-

eeoace b<arct [U- 6e+Hn?


u(e. q
B, l-o Bt in&catcs ctlcr.r ,41p l,'callcrn Z & Lrrre t Sot,, of e,\ecL,# o^n rol"-q* +[. &1s;ne-<

&nyent-,at re(*arc ;, qdlc^.e" -!,". grefr.,i L^l ol S.a;te l*<rtta, Caft il'l
"rl"
Bctsstne* terlodf,'
lvlINI koietl- b9 ustng €truf 5, EJB c,o d JDBC technol o6,r, )ou'ng rhe i -plrrot'.'t."6,'.'

rnLr\dple Des;6nPa$crng ;-

..". €
6
5 r,
. ct,
E
+

qq I
C

4
F:
12€
sc E

fts
(5q -a
5T
.t 2e
-2
-e

3 _s

,. le
&J 'r. lo rh€ dlagv am
t slo l lrot >

he *af asr bX teiectl n.X B",e ltem 4 sded bo^


0 Fixrn Paxe e&bm',r5

6 c.",ilftlte'{ Aaicn *'tv tz+ +ft'P s and 'loYcc 1'la r1azs t


@ As

' ono" ];rc d"';'le ]at han ao| Moncltt!''


luton*nr ter t:su fhe e*ies ol Sflut| co"$ 6ut
@
h PmcesS rhe waTtesf '
cl avs oqet '
as txe h^lau to Fa'^Beot
@ Auic'nktvle'r nr;

(O A* .,,.*,ulu- (rttts *e utu'1<L) oP Atsanctttl


..-,

l,3r;:,,,^tr:;':**:::.J^*"-i^'ouy:';::-'ratLiLr{'{ExBb*tv"^r
,r"fe'*nrc in B'l&'r U'l U*e A-" J"
a no,, i+airtbe 0*h"^
is rur atw rasLe in Buf(u f ) &^lPe" 4
tt gnre EJQ 6a7np6'^ea* 12Pe1z ntc
tle o't^" '- '
- r'c;J-
sl,') o? Avpl;to.t;crnsuw't anl
o'rrse n;st<"J
ryt<\
\, grvite Lxoi-<n
-- +D Buv;vrevtDlu{
'}*
c^r& zt'fu*ntc
-' O Se,viteLoulat wssLs #e
EIB
*A d a /"t&*;'e< ^e'!'"J4
csr"ron** *Pa't'^Le
Lx'r r{or oA ue
EJR
- O Ews',tssDel;pt<- cLd'ts t cta*' fi<en)
.- EJR Carn('u'L,'f '
g{,oqoq"(@ {1.i' ::'"'
Tu'1qiil('!4 -n},od
L}:':-- #:':;:
Bu*:,,..xD&3,!
4',11't- a'l flul"
yn Pom&u" t Nno't Li't u"
gaL #,!e.,r , Ut '{8utr ')

Elg u'^t4ett
- (ts Bu:tintst *oLo) "? '* 'u fo e)'eutco h-n^9*t''
^r*u , -.,h. *Le-t-qJ'-lt+o
+!",zrecuLr

- @ &uo^^ ?a^6^r."Jr*- a') *o^'"'0.,.


p^L .ras^tt in
*11'tsr alhtu'rc -ruut{tu'Ie
_ kr+ h 4* th
v s'u'4-
ra pxpu&L)
& kn-t-W'oh'-
' r us.l +{c nn1'';'t

@q@ O*\un. (dJ,or ta Resu*,isp onr wa.sl^'r'ru'^lt


rxe ,,,^ lTtc
taqtc a "
*) 7as '* n' ,, br u,,y ynu,rdl.n
il"tnuurrs \u S-6
' g Bu*tt'jsn +'ble cott''*'

'e ; *'\aXe os lrnt-


to fL k' "
Erplicitll imelemerteA Dca;6n W+:.{
t1s oP ile alov{ lni ett : -
"J
't1- dJb ca @?o^e^+ v-isP gvDgram I c- Atr,r' QnIt
O nvca
@ o*o
(9 D'r'o classlv'o ct^-\^

(Q &'ssi"cwDu6't'

@ *""'Lo-t^
F$"itp1"--rrn1 9* r"loe't-- ' r

(D S,"M- jaria cfa*!,w,*,r*l

@ ftu'a A'e )
+1elru{ DaaT?aJ+r"n
'-*"V,*,
@
4- t0'o oL"'.- P'qic$
"-
tut.; F D';x"Poric'"""

'7n* ctox tu httto'*".u\tr -kJ, i, *r|^*Q t* k:*ot --,


F4(ord d.J.r )

O ;;.'ffi;* n*-*o "ld,on


lt.o c*xf v,6 ctda L**"7^'
O ^ r^",*-,
o{ &'y""*'vP*cw-
6 O^^*n*, tnt f-*'c'-->
fle imfenlta-/t "o oP )erlXoP"*t"' '
tt''" r6.yn base f"l rn Pgjg! ll-tn
F* aLove
or1 Pl"n I Zol>
'.tP<rr +[. &1. -l,b.to*

n\

\t

.o
\*' m;n! Prqject Q banla't
pro,"Oo* f0 cteploqee ord €xe(lde clesign praiect bc'se '1

ala.stS
* 'jartlr)

e{
v?
s
oc
^F
E.
t
cJg €
! b!t c,
i\.J
I
JJ .9

a &. o !l
I
; Ectr c
:^ !_ tr
E ! a .g_, .:.,
'5
d
J.
e3 v cts-
-1
.c I d E -o
-a 1
t F $ !,t
t,
o

E \x v.J
5 .?
I
I

f d ?K
!
<.

.4 -ro
v
s F
6 6-J \'
C

.?-c F

It.J

u-
2 iig
6
..!
ct d
!l ! s-r
3
FqS i1 '
.Y -,o o
.E
c- .4 --)
tJ-
FE9 s{
$r

'rd
-'-e- tscc
il?
Esy d
\!l
ttt 4:
lc
3
\ll
\tl l\
\
3v. 6 e-ll I lc
€3 E\L' -I
?g
&
+
g
6t
c- (l
fj r.t

-.- \
! ,: s^ \

tE
"fl.
{r1 -') ( e&
9'a -s\
\

d
',.rr- i L4
rt
+! -Jt
tl

.i 2\ 3
r-{
I
Yq
o-g
e .?
lo
:- .Dl
iii
1

(n
ei
cl+5
el
dl
ol rE

.
.)
,tt!
_!

c
c,
i
P
\,J
I
(o
3
3\
.:l
I
<ic
I
.J

\o
9./
-!
s$
.J o/
l-q

o-
A
I :-I

ci
qr
a-i
:1

vt €
.q e- aJ !l
F€fir€ Ja. 6'reS r.{teSc^f't$ EJB 6en06nerLt :-

E.,\ D ?prDi€l+ 14f\ co-pr> jar cP Copi'ja't


rtne.r6 ave L,,0 cDoJ s ro ' dePlqe e !

$rt' g+*d\ in 6l*'f"l' Q*sr


Afl,-alhJ',- , D4lo9te Wa' anl 'F'
--;, nna camP!"ia't 9'''s to
,*oar'""
Jomot's\mgJa'"c"in! \@"trad+l'1a f"rau '\
lcrlosrA't -lotz t\ 41"^,,'\

sT'' wwfr ery'*


UB L I'
h*Pr{/\ocarhP
&qrtast
oin do@
OEn broose'r
,-
-1
Gr,".P*!' sttn"n '
fornbine \(av o.d J.." f, f. s Eav 9t te 'ond dqtofetnS

.
€ar Pi1n = jar ftre +jt^r Bta + - .

dr"r B'e jarF;te+qtvSitc+ - - - .,


o
-t;
- ec;o 6'rc a*rfue + w,t (;u+. . . - - "

FnT€st
t*l*t ra*p\ica-rlc'rn'xrnl

51or6fr1P 'toarl

GinP..-'j4'1

prq.u'€-J eo, {te


-!JDrp"o;.,t\E^rtsr) ja* cP Frer&oP'€a'{

4"16n - X \
ffiF\
t W*' wl
60?ti
.
:^
-: *' \tu'' br"viY'i:
an'Lcth;rn -l-3 dn'
ilvN "
lrlitrr* (^

ar' >
l31nu cad
/dispttJ'J - narc > ee,Te:t ld-n2 ,, LlesrrdlAh.
'zclercmpd
a' u
Srru,ts Ffl fFicu
7
Zmod"tE
Corvrl!" i*r / ejb>
, 14b>
>
4lrno0"Ie
1
_ -2 app2 hrip: h0.sileh lsrux p+t---r O
/ilo<41

iq main-jsp-------- -- Nel.ome f4e Cv ) kl


5 <frameset r ow s=' 3oo/o,7 Oo/ott >
t

6 <frame name="f1" src= "Sea rch"jsp"> -=*


7 <frame name= "f2"/ >
a </frameset> )
9 serach.jsp------ -------- Fc'.-Bc'str Lvit'p
10 <o/o@taqlib uri="htto://struts,ar,ache.orqltaqs-html,'prefix="html,,o/o>
11 "http: / /struts.aoache.oro /tads-bean" prefix=',bean" o/o>
<96-@!g-S!ib uri =
LZ <html:form action="F?IgIpe!I" target="f2.'> T>)rl [1!f a)
13
@ !.*-l{1 t A(}ioa cla s 5"(-.,e6 [.r no:, sj)
L4 <bean: message ke-y="1py.161"r
15 _FteFer:ar
&)afLor r 16
o1*,.n"sl
ta<rt& /
rz
a8
<html;select property="job" multiple="yes">
<html;option value="CLERK">CLERKS<,/html:option>
<html:option va lue= "MANAGER"> MANAGERS< / htm l:optio n >
xr)
-*(rtro\t-
h,:'liYT1i
l"a G"^rnt4
a'1+a
6;6ple ) 19 <html;option value="ANALYST">ANALYSTS</html:option>
<htrnl;option value="SALESMAN">SALESMEN</html:option>
",^ ,"lO .wr6&rc lht&h
l''"' r+e
rrf.iE l20
d' o \-2
Ffl( 1 </html:select> .J
** | t'tt\ Le e*b'Fl
22 &"
23 <htrrd:submit> 'I js fram e ,oh"r' h4rhd ls Bv
'24 <beanimessage key= "btn.cap"/ >J6
25 </html:submit>
.26
27 </html:form>
28 myfile,properti
29 # To change this template, choose Tools I Templates
30 # and open the template in the editor.
31 my.lbl=Select job(s)
32 btn.cap=Search
33
34 <web-app version="2.5" xmlns= "htto I / /iava.sun,com /xml /ns/iavaee'.
, 35 xmlns!xsi="http:/ /www.w3.orql2OO1 /XMLSchema-instance.'
36 xsi:schemaLocatio.t= @
http://iava.sun.com./xml/nsliavaee/web-app 2 5.isd'.>
<serv Iet>
39 <servlet-name>action</servlet-name>
40 < servlet-class> org.a pache.struts.action.Actionserviet</servlet-class>
4L <init-param>
42 < pa ra rn-name> config< / pa ra m-name>
43 < pa ra m-value> / WEB-INF/struts-config.xml</ p.."rh-r,il r.> k
44 </init-pararh>
45 <load-on-startup>2</load-on-startup>
46 </servlet>
47
48 <servlet-mapping >
49 <servlet-name>action</servlet-name>
50 < url-pattern> *.do< / url-pattern >
51 < /servlet-mapping > 36-5\ @
52
53 < we lcome-f ile-list>
54 <welcome-file>lq!I!EE</wetcome-fite> (Il
55
56
< /welco me-file-list>
</web-app> - /."
57 e**s (rznh1avttn krc Q"*,aw
58 <!DOCTYPE struts-config PUBLIC
59 "-/ / Apache Software Foundation/ i/ DTD Struts Configuration l.3/ /EN-
60 "http: / / iaka rta.apache.oro /struts /dtds / struts-confia 1 3.dtd',>
61
62 <struts-config>
Ne.,_k'fos <form-beans>
.dn?'tr.'''t 6 4 <form-bean name= "sf " type= "Sea rchForm "/ >
li.'tt 6 5 </form-bearis>
66
67
6A <action-ma ppings>
69 <action na-e= "sf" path=" >
6c io ?& shurs A<*a, ctar^ cfo (J Pase 1 of L"[D
"
L
@,"
7t
<torward name =..success,. path
</action> =,,/ resu lt.islp,, />
-
72 </action-mappings>
73
74 < message-resources parameter=,.myfile.,/ >
75 --, wr"rt$ R.te coo B
6,-.r..lic,r1
76 </struts-config>
r"vcr)
il,
79 1;;;;;;;;;,;'";;;.;;.'",:il:H$T;,,?l'----------------------tu-u"',(-r"r<"
irn port org.apache.struti."ction.action"lOO],{n,
go import org,apache.struts.action-Actionr".-rij"".
a1
82 public class SearchForm extends ActionForm
private strins jobD; {
fi l,.r.r r,,r+rt"- vlr,..i' ."uLt {*
uo^ 1;r,
fJr
public void reset(ActionMappingmapping,HttpservletRequest
f# req)

lii . i:3t"=Y.:1i,'3n"l1t;,"".Irl--ro6;. +ohonarehosser.rr€r srar.cf lisrtor J,;tnw"vta'4


*e)
9(} Scr(rm scqr.J T-rBr.;
?1 pubric strins[] geLrob()
-- {- _r
92 return jobi I
e3l'J'r
94
A f-9s pubtic void seuob(String[] job)
( oJ I e6 this.job = job; {
-L_92 )
9a
es )
too ----------. ------sea rchAct;o.,:.iav-a------.--- ____________--&ln CWw (c"*nt^fu'a)
j"va. utit.ArrayListi
!-p".t javax.servlet.ittp.
191 import
1O2 *;
1O3 importorg.apache,struts.action.+;
to4
1O5 public class SearchAction extends Action
1()6 Co(Jvert'ade
@overr.ide /,-:\
6t
Lo7
1oa ;-tri:iii::::,:::::l
publicActionFo.ward exewte(ActionM€pping-mapping,
HrtpservtetReq""=-. mappins, ActionForm form,
."o".rll.,r1i,. rservletResponse
1o9 throws Exception=:"9.=rActionMappine
{
response)
, 110 ,//read form djta
lo$i.r. n%d e111 Sea rch Form_sf= (Search Form
)for.ni -__J Tvfec,rsAy
strinejobs[]=sdg";"b(;'"','"'",,
PJ^IfrvJ,!!?
i;r,u* ii'o
115
3liliil:lll|Iil:il[::il,:T:'.:1i,1;;:"];.,;.";:1o,".",, !
116 ,/,/ call B.method

tDii M:j:!.]*:::
- 117

l2o
L2L
R rr<iha-ch6r---.^
B usinessDelegate Lr
bd=new E

!q'rrr'e g,method");
r''meEnoo ');
);k rjff #d,-rft
Hilffi'S
#tr4":#H,*,ft?ffiffi;;;
(

lr're a."apq rn I tll t zoo )


L2Z / / send result to result page as req
-."
req-uest.setAttri uute1,..e-sui1;,, j;-- attribute
GX tll: / trorwatd control to result paqe
\:yl y1:
l_: returnmapping.fi.ndForwardl,.iuccess,,).
L?6 Il / executel_,_,_,_1 -( -!!!ve' ,'
127 > / / ctass
L28 .r,..( i*^1,-,-F,r",'a q"*inlnon"Der)Vts?a+tn
129 ___________ --------servicelocator.java-------ll1t-t-:{t-1i-"?- I
13O import java.util.*l &,,nk"ol t, "4 o't
131 import javax.naming.*;
L32
lii ?'o,,. "." u.*,..1".r.",
,l-
't't.on'T,t:, v,*orldrrt Er3 c"*M "*#4Y
n (*' e or
135 private l.laShtable
Hashtable
1,r rv.tEe cache:->r"mdi$tar
Cachet,T)rom
l0'ar
private rnitiatcontfi-ffi y.+*nr {u,. . 'r
i3, 6.N.,r+,j oro(
134 private static Servicelocator sl=nuJ1.
. l4ua6rari- {rm
Stna
ute Page2 of 4
CD
-
139
private servicelocator( I 1l rr"r"r. ccuch*l-trt ( a
g-nt'r 9t9\ek")
- 140
141
-L42 try
143
Cache = new Hashtable( )i
'.44
145
- L46 ,/,/ jndi properties
-lqr. r, ^447 Hashtabte ht=new HashtableO;
\rae ht. put( Context.rNITrAL_CONTEXT_FACTORy,
e+'h"t
^.l Ms "com.sun_enterprise.naming.SeriallnitContextFactory,.)i
3ffri"il rso ht. put(Context.pROVIDER_URL,,'iiopr / / tocalhojt:4a4[t,, );
;J l.{t'.-ls 1
..r ic=new f nitialContext(ht);
j/ ltry
catch(Exception e)
xY'
".9p.ll'"13"
1s4 {
rbs e.printStackTrace( );
156 ) bn't telarotc,t Co.la'lssne
157 )//constructor n r^L", tt*;o-*le" c^Le"
1s8
159 / / Faetory rnethid having singleton logic CaAt co.t u$ E,.epG/
^ ,
-160 public st;tic :servicelocJtor 6"ir-Li"i"iil n A*ta"t er.tha
I re r 1-
,--r I rez if(sl = = ng11;
( lo) / ros sl=new serviceLocatorO;
\J/ L64 ..!
\ res return sl;
vtz: ),//getLocator( )

16a / / tnethod having Servicelocator fmpl logic


Pzrcs public Object getService(String jndiNamejthrows Exception
IL70 {
lst System.out"println( " ServoceLocator:getservice(_)',)i
lvz i",.,,--.ti:Y:*
I L73
I11171
lt74 Y'l ,
if( lcaihe.conta insKey(jndiNime ) -----l . u" ut
fl|ryr Jrro+ nz,r,^c i< rtof al){di..Ae
,ig
..* Vu,,i&lac^rco"k
t=_-_-_-*- )
u
J
^ , ,
r:l I i
{lkllurz;
rzo cache.Put( j nd iNa me, ic.lookup(jndiName) ); I
-T gr*,o ti^""t*A:-j kt -.1 *a pat ad^F !^t 'ek snt" *'' #*t ,e',d ,rn
I s< ? ble
\J I rze , //rl',j tc.x d o'r f,r:or "ray're arJ i+ €rr
I179 catchaException e) +ti $ilrt loQf {".1-. a\ n:r{ JND1 h^!\e,
I reo { 'x'
I rar e. printStackTrace ( )i
II
182 > / / catch
rss
I re+ // Return object from cache
|i 1ss return Cache. get(jnd i N a me );
yin !bg!n3:,,c \tlt\ 5a'nl.,'ncJ
L:^az 1a6
)i/,/ getservice( )
*t* tt "rr wt rr""c c Q 'nffi.
1aa >/ lclass -----------E-&n
149 L-"-r;,*
----------Bus i ness Del e gate.java---CLqJ5-''.!!e--------.,.
190 import java. util. *;
191 import com p. Myco m p Re m ote;
L92
193 public class BusinessDelegate
1"94
195
ar\ (\,r )
L96 public A rray List s".n>-:"!j(9!!ngj"-q[f )throws Exception
197
199
t_-
199
200
fit2o1
\yL2o2
203
204
205
' 296
zbz
Pagie 3 of 4
,.4-\
, -/^.a I
,b€ji(,-\t'Js\\:/
2og - -------- -- -- - ---- -- --- -- - - resurt.jsp----d4-q!t-Pt-.--------------
2O9 <%lQEag€ import = "java-util. +,java.i'nath. *,p 1. EmpBea n " o/o >
27-O
27. L <o/o
212 ArrayListal=(ArrayList)request,getAttribute("result");
213 o/o>
2i4 <center> . ,r
2tS <table border width="1ooo/o" bgcolor= "#FFFFFF">
2]-6 < tr>
2t7 <th>EMPNO</th>
21a <th>ENAME</th>
2L9 <th>JOB< /th>
22O <th>SAL</th>
22L < /tr>
222
223 <o/o
224 for(i nt i=O;i<al.sizeO;i++)
22s {
226 EmpBean eb= (EmpBean)at.9et(i);
227 BigDecimal bd=new BigDecimal(eb.getsal( ) );
228 o/o>
229 <tr>
23O <td > < b > < o/o =eb.getEmpnoo o/o></b></td>
23I <td> < b > < o/o=eb.getEname( ) o/o></b></td>
232 (td><b><o/o=eb.gelrobo.o/6></b><ftd>
233 <td > <b> < o/o = bd.setscale(2,BigDecimal.ROUND_HALF_Up )o/o >< /b></td>
234 </t-r>
235 <o/o
236)..J
237 o/o>
238 </table>
239 <./centei>
240
24L
242 <o/o--<o/o@taolib uri= "htto: / / struts.aoache,oro / taqs-html,, prefix= "htmi'. o/o >
243 <o/o@taolib u ri = " http: / / struts.apache,oro /taos-bean" prefix=',bean',o/o >
244 <o/o@oaae import= "java. util, *,p 1. Empgean"o/o>
245
246 <o/o System.out. pri ntln( "In result;jsp,'); o/o >
247
248 <ta bl e border=1>
249 <o/o
25o Arraylist al = (ArrayList)request.getAttribute( "result" ); rerJs fl.e refo.V al+ribtE- \loJtL
251 o/o> -l
B -wh
zt!3 . toni",.,otEmpty name="resqtt" scope=,,request,,> ---, cLcr1* o*p"^a*+o v d#L'.t< ;-
254 <tr>
255 <td>ENO</td>
256 <td>ENAME</Id>
257 <td>DESG</td
25a <td>SALARY</Id>
259 </tr>
260
log;cr6 6e f 261 <logic:iterate id="id1" collection
= "<o/d =alo/o>,, ) bti. Fc tlr rtt^!8 af
. . t
ll.lDnlb rh< I
262
262 <tr> I - trlrdr al_.rl trrl
263
^-- <td> <bean:write name=,,id1,,property=,,emp no', /></td> f arqd a{ ta'6(e c-tl€"l-
Aq&ilts 4 264 <td> <bean:write name="id1" property= "enam e" l></td>
tu,'tti'r.)'l 19: <td> <bean:write name="id1" property="job" I > < / td>
-:-
e",r"lr.,"s"f ]!! <td><bean:write name="id1" property="sal,, / > < / td>
,|'267 </tr>
if ,['o^rts tr\269 </loSic:iterate
6he €t{r.?flf
dg 2 6 9 < / logic: notEmpty>
27 o < /table> --olo >
-.{r.xL,,t
A -E-*&T.,f

Page 4 of 4
a--' (2)

2 ApPl
.4 ---------------------MyCompRemote--------------------------- &{sr;n<r4 l^rcht"'l E8;t'-1"'t t -
5 package comp; "r (ftod.l la'<-;-
6 import java-util.ArrayList;
7 import javax -eib.Relnote;
t^tatrar"
3 *",,,.1;l;;'?I
das PernorBr''ervrl
10 "t=llno-'""".
public interface MycompRemote {
public ArrayList search(String job[]);
11
i3
14
i---:";;;";;-.-l-li#rs :1 ?tv*v).c^auu*\'
package comp;
^

15 importjava.util.ArrayList;
16 importjavax.ejb.Stateless;
17 import p l.ErnpBean; . . r:liho.
l3 :"#J"*o:'t; ..r slsr(s,or'tcx srrst"' &a'n)
20
2L
"r,.r",""
public class Mycollq.Bean implements MyCompRemote
s,rsi*" ^(h"d
{
/-lo=]-*
22 public Arraylistqtlgb (strinsl] jobs) {
23 system.out.priEEn(;MycompBean:serach(-) method")i
24
2s | / write b.losic tD Ptaore 6s.!lrro nv'hd +4 g|t Yn
26 StringBuffer sb=new StringBuffero; -J
27 sb.append("(")i. 3rttJ
28 for( int i =oii<jobs.length;i+ + )
29{
30 if( i == jobs.length-1)
31 sb.append( " "'+jobs [i] + ""'),
32 else
33 sb.a ppend( " "'+jobs[i] + "',");
34)
35 sb-a ppend( " )" )ii
sb-append(")") lt,,-e- ('curr"'
- ,,.., . -,...t-) -t, +j' s,,t q/rana {tre t/ 'crfn *', ' fJA f.'
tu)ER
f*urcnf
); r+ 3i"'s rdndlton Y."9a'-f,'{a &'+l T'4A
)
36 string cond=sb.tostri n9 (
37
3a / / use the persistance logic of DAO clas q3
", "r'55 66;1
t.r",
E*oq3 L4O\:?i
ruyoi<5 JJo=.t.w MyDAog;
-- cond ); --.,--
Arrayl.ist a I = dao.findEmp !oyees(
r"W llh. no's 5t hD
4l return al:
42
43
>rr'""*fq* ns +a &'s;,1,aT>t;Pte cloxs '
44 / / class
--------------M yoao-.Jses-----
>
45
46 package comp;
Uildle4"l )
47 import java.sql.*;
48 import java.util. *;
49 import p'..EmpBean;
5()
51 public class MYDAO {
52
53
54 p u blic ArrayList fi ndEm ployees(Stri n9 cond )
*-\s 55 { i;|-A t*ir'1 Pc&lstanle- l..6; c
6-A 56
K-/ 57 system.o ut. println( "find Employees(- );MyDAO" );
58
59 connection con= null;
60 Statement st= null;
61 Resultset rs= nulli
62 ArrayList al=new ArrayList( )i
63
64 try
65
66
t
class.f orName( "oracle.jdbc.driver.oracleDriver")i
67 con= DriverManager.getconnection( "id bc:oracle:thin: @localhost:1,521:satva'r,"scottrr,rrti
6a st=con.createstatement( );
6s rs=st,executeQuery("select empno,ename,iob,sal frqm ernp wherc job in "
Paqe 1 of 2
sete!+ .'[fi?]rii'r1,
"n"', p,o zyn, i"qe jos in (Lueev','rvwrooe') ana<" \ job
+ cond+" order b:. job");
while( rs-next( ) )
{ 61(Arrajustfbj )
System,out.println("In while")t
EmpBean eb=new EmpBean( );
ID} TAli .LEPP
eb.seaEmpno(rs.getlnt( 1));
eb.setEname( rs.getstring(2) );
eb.seudb(rs.9etstrin9(3));
eb.setsal ( rs.getFloat(4) );
al.add(eb);
> / / while
rs.close( );
st.close( );
con.close( );
>/ ltrv
catch(Exception ee)
{
System,out.printl n(ee.tostring( ))i
)
fa d 4 frS Cor/'l'ctn"r fkt'n cla'u
return al: rt rtfs\ns the vr..cb rnolo
)77?l-"a-Effitoyees
> / / class

package p1;
import java.io. *;
1 public class EmpBean implements Serializable
*-q"",l'd,J..^j
1
L private int empno;
1 private String enarnei
1 private Strinq job;
1 private float sal;
1
1 public int getEmpno( ) {
1 retiJ rat empno;
1 )
1
1 public void setEmpno(int emp o) {
1 this.empno = empno;
1 )
1
1 public String getEname( ) t
1 return ename;
1 )
1
1 public void setEname(String ename) {
1 this.ename = ename;
1 )
1
1 public string getJob( ) {
1 return jobi
L l
1
1 public vaid setJob(string job) {
1 this.job = job;
1 )
public float getsal( ) {
return sa li
)
public void setsal(float sal) {
this.sal = sal;

t r i'r Crrlorsfi rl La/6 Ab *l,t Sunl,trw inxxkc ftj bnyurL^a


!./hrn N1 J.p ls1lg Ef,B a' e-fffealn ^umQ-bt'
Page 2 ot 2
Alranaht\ k@rnet -JNDI nqrnl L^r 8J7,1 c",i,Jl"i'ik*,, +ta+'1s pla"'l n.'(tn #X\n .

?", d.e o!r*" 6'\feuk CDr.p, MdCAr^pVn " t< O6 rt J\th ^ame,

You might also like