Está en la página 1de 49

DOCUMENT

ON Network Administrator Tool

By,

Internal Guide

External Guide

Xxxxxxxxxxxxxxx xxxxxxxxxxx

Table o Contents

!"#" &"#"

AB$T%ACT INT%ODUCTION 3.1. Purpose 3.2. Scope 3.3. Overview

'"#"

$($TEM ANA)($I$ 4.1. Existing system 4.2. Proposed system 4.3. Modules of t e product 4.3.1. !emote "ontrol 4.3.2. !emote #ile tr$nsfer 4.3.3. %es&top S $ring 4.3.4. !emote Mess$ging

*"# O+E%ATING O,E%,IE'.1. ($rdw$re '.2. Softw$re '.3. Over$ll %escription

."#"

$($TEM DE,E)O+MENT EN,I%ONMENT '.1. "oncepts of O)*ect Oriented Progr$mming +$ngu$ge '.2. " $r$cteristics of O)*ect Oriented +$ngu$ge '.3. Overview of ,$v$ '.4. Overview of ,#" '.'. Overview of Swings '.-. Overview of !M. DE$IGN DETAI)$ -.1. %$t$ %esign -.2. /rc itectur$l %esign -.3. Procedur$l %esign DATA 1)O- DIAG%AM$ 0.1. !ules of %#% 0.2. +evels of %#% 0.3. #low c $rts 0.4. 1M+

/"#"

0"#"

2"#"

MAINTAINANCE AND IM+)EMENTATION 2.1. "orrective 2.2. /d$ptive 2.3. Preventive C)A$$ DIAG%AM$ OUT+UT $C%EEN $4OT$ CONC)U$ION %E1E%ENCE$"

3"#" !#"#" !!"#" !&"#"

!" AB$T%ACT

NET-O%5 ADMINI$T%ATO% TOO)

Network Administrator Tool 6 3etwor& /dministr$tor 4ool provides remote service to its entire client over t e networ&. .t $cts $s $ networ& $dministr$tor to its client to provide remote service li&e remote s utdown5 remote logoff5 remote file tr$nsfer5 remote des&top s $ring $nd !emote " $tting.

Modules6 !" %emote 7ontrol !emote control module provides remote oper$tion suc $s remote s utdown5 $nd remote logoff if re6uest $rrives from client. #irst it p$rses t e re6uest $nd provides service to its corresponding client. !emote control is $n electronic device used for t e remote oper$tion of $ m$c ine. &" %emote 1ile trans er !emote file tr$nsfer module provides file tr$nsfer oper$tion from server to t e re6uested client. #irst receives t e re6uest $nd recogni7e t e file n$me5 if t e file exists in server tr$nsfers it ot erwise sends $ file not found error mess$ge. Remote File Transfer cont$ins inform$tion for tr$nsferring files to t e remote loc$tion. !emote file tr$nsfers $re used to tr$nsfer files from t e development environment to $ server t $t c$n )e inst$lled loc$lly or remotely. 8e c$n tr$nsfer files )etween two connected P"s $nd c $t wit t e remote user. 4r$nsfer files $nd folders )etween loc$l $nd remotely $ccessed computers.

'" %emote Deskto8 $9arin: !emote %es&top S $ring module provides t e $dministr$tors to g$in $ccess to remote 8indows des&tops in t e networ&. .t is $ tool en$)ling $ccess from $nyw ere in t e networ& wit out re6uiring $ny n$tive client. /dministr$tor c$n directly $ccess t e remote system )y

s $ring t e re6uested system des&top. %es&top S $ring is $ server $pplic$tion t $t $llows to s $re current session wit $ user on $not er m$c ine5 w o c$n use $ client to view or even control t e des&top. %es&top S $ring lets users c$ll $ remote computer to $ccess its s $red des&top $nd $pplic$tions. 8it *" %emote Messa:in: !emote Mess$ging is $ sm$ll $pplic$tion t $t f$cilit$tes communic$tion )etween different osts on t e s$me loc$l $re$ networ&. .t does not re6uire $ centr$l server $nd uses very little )$ndwidt )y t$&ing $dv$nt$ge of $ lig tweig t protocol $nd 1%P p$c&ets. /dministr$tor c$n communic$te wit t e remote systems t $t $re connected wit in t e loc$l networ& $dministr$tor c$n communic$te pu)licly or priv$tely. Mess$ging is not ing )ut p$ssing d$t$ to $nd from $pplic$tions over t e networ& w ic m$&es t e sync roni7$tion of d$t$ simple. Mess$ging $llows users $cross t e networ& to exc $nge d$t$ in re$l time.
t e %es&top s $ring we c$n oper$te our office computer from our ome or vice vers$.

&"#" Introdu7tion
4 e w ole P"9)$sed systems5 w ic $re $v$il$)le rig t now5 $re $ll running t roug t e 3etwor& type communic$tion. 4 is type of system is m$inly used in net centers5 offices5 m$inly in industries .t is more time consuming to control $ll t e systems connected in $ networ& m$nu$lly. So we t oug t of developing $ new type of system c$lled $s !EMO4E %ES:4OP /%M.3.S4!/4O!. 4 e oper$tions t $t c$n )e performed )y remote des&top $dministr$tor $re System s ut down System log off !emote files tr$nsfer t roug #4P protocol !emote %es&top S $ring !emote Mess$ging

3etwor& processing is

$ndled )y *$v$ soc&et /P.5 "lient re6uests $re

p$ssed to

$pplic$tion $nd response will )e p$sses to client wit out del$y. !emote inst$ll$tion reduces inst$ll$tion time )y providing remote services. /ll files $re tr$nsmitted to clients. &"!" +ur8ose 4 e purpose of t is document is to give t e overview of t e pro*ect. 4 e m$in $im of t e pro*ect is to develop %es&top S $ring $nd !emote "ontrol environment. !emote networ& $dministr$tion $pplic$tion provides remote service to its entire client over t e networ&. .t $cts $s $ networ& $dministr$tor to its client to provide remote service li&e remote s utdown5 remote logoff5 remote file tr$nsfer5 remote des&top s $ring $nd remote c $tting. &"&" $7o8e 4 is $pplic$tion $s $ very wide $re$ of us$ge. /s t e num)er of users incre$se t e scope of t e pro*ect goes on. 4 ere is no limit for t is $pplic$tion t is c$n )e used to $ny type of p$ge )y $nyone )$sed on t e restrictions given )y t e developer. 8it t is type of $pplic$tion t e strengt of $ p$ge c$n )e incre$sed. 4 e &nowledge c$n )e distri)uted to $ l$rge extent. &"'" O;er;iew 4 e w ole P"9)$sed systems5 w ic $re $v$il$)le presently5 $re $ll running t roug t e 3etwor& type communic$tion. 4 is type of system is m$inly used in net centers5 offices5 m$inly in industries. .t is more time consuming to control $ll t e systems connected in $ networ& m$nu$lly.

3etwor& /dministr$tor 4ool provides remote service to its entire client over t e networ&. .t $cts $s $ networ& $dministr$tor to its client to provide remote service li&e remote s utdown5 remote logoff5 remote file tr$nsfer5 remote des&top s $ring $nd remote mess$ging.

'"#" $ystem Analysis


'"!" Existin: $ystem 3etwor& /dministr$tor is $ cruci$l *o) to monitor $nd m$n$ge systems in $ +/3. +/3 $s different pl$tforms $nd resources so if t e $dministr$tor w$nt to monitor or s $re t e resources on t e remote systems in t e +/35 oper$ting systems doesn;t $ve comp$ti)ility. #or ex$mple if t e "lient is running on 8indows XP $nd Server is running on 8indows 2<<< we don;t $ve t e control on t e remote system for doing des&top s $ring $nd $lso if we w$nt to tr$nsfer $ny file to $ny remote system we $ve to depend on 3 rd p$rty tools to $ve common pl$tforms $nd comp$ti)ility. 4o overcome $ll t ese pro)lems we c$n develop 3etwor& /dministr$tor 4ool w ic c$n m$n$ge $nd monitor t e client $nd control t e remote systems. )imitations o t9e existin: system6 1. .nefficiency 2. "ost m$n$gement 3. ($rd to m$int$in 4. "onsistency '"&" +ro8osed system 3etwor& /dministr$tor 4ool provides remote service to its entire client over t e networ&. .t $cts $s $ networ& $dministr$tor to its client to provide remote service li&e remote s utdown5 remote logoff5 remote file tr$nsfer5 $nd remote des&top s $ring $nd remote c $tting. .f t e !emote oper$tions suc $s remote s utdown5 remote logoff re6uests $rrive from client t en it p$rses t e re6uest $nd provides service to its corresponding client.

#ile tr$nsfer oper$tion from server to t e re6uested client=9 #irst receives t e re6uest $nd recogni7e t e file n$me5 if t e file exists in server tr$nsfers it ot erwise sends $ file not found error mess$ge. !emote %es&top S $ring en$)les t e $dministr$tors to g$in $ccess to remote 8indows des&tops in t e networ&. .t is $ tool en$)ling $ccess from $nyw ere in t e networ& wit out re6uiring $ny n$tive client. .t $llows $lmost $ll oper$tions to )e performed on t e remote des&top. !emote %es&top S $ring lets users c$ll $ remote computer to $ccess its s $red des&top $nd $pplic$tions. 8it t e des&top S $ring we c$n oper$te our office computer from ome or vice vers$. !emote Mess$ging is $ sm$ll $pplic$tion t $t f$cilit$tes communic$tion )etween different osts on t e s$me loc$l $re$ networ&. .t does not re6uire $ centr$l server $nd uses very little )$ndwidt )y t$&ing $dv$nt$ge of $ lig tweig t protocol $nd 1%P p$c&ets.

'"'" MODU)E$ O1 T4E +%ODUCT 4 ere $re )$sic$lly five modules for developing !" %emote 7ontrol !emote control module provides remote oper$tions suc $s remote s utdown5 $nd remote logoff. .t re6uest $rrives from client t en it p$rses t e re6uest $nd provides service to its corresponding client. !emote control is $n electronic device used for t e remote oper$tion of $ m$c ine. &" %emote 1ile trans er !emote file tr$nsfer module provides file tr$nsfer oper$tions from server to t e re6uested client. #irst receives t e re6uest $nd recogni7e t e file n$me5 if t e file exists t en it tr$nsfers t e file ot erwise sends $ file not found error mess$ge. !emote #ile 4r$nsfer cont$ins inform$tion for tr$nsferring files to t e remote loc$tion. !emote file tr$nsfers $re used to

tr$nsfer files from t e development environment to $ server t $t c$n )e inst$lled loc$lly or remotely. 8e c$n tr$nsfer files )etween two connected P"s $nd c $t wit t e remote users. '" %emote Deskto8 $9arin: !emote %es&top S $ring module provides t e $dministr$tors to g$in $ccess to remote 8indows des&tops in t e networ&. .t is $ tool en$)ling $ccess from $nyw ere in t e networ& wit out re6uiring $ny n$tive client. /dministr$tor c$n directly $ccess t e remote system )y s $ring t e re6uested system des&top. %es&top S $ring is $ server $pplic$tion t $t $llows to s $re current session wit $ user on $not er m$c ine5 w o c$n use $ client to view or even control t e des&top.%es&top S $ring lets users c$ll $ remote computer to $ccess its s $red des&top $nd $pplic$tions. 8it * %emote Messa:in: !emote Mess$ging is $ sm$ll $pplic$tion t $t f$cilit$tes communic$tion )etween different osts on t e s$me loc$l $re$ networ&. .t does not re6uire $ centr$l server $nd uses very little )$ndwidt )y t$&ing $dv$nt$ge of $ lig tweig t protocol $nd 1%P p$c&ets. /dministr$tor c$n communic$te wit t e remote systems t $t $re connected wit in t e loc$l networ& $dministr$tor c$n communic$te pu)licly or priv$tely. Mess$ging is not ing )ut p$ssing d$t$ to $nd from $pplic$tions over t e networ& w ic m$&es t e sync roni7$tion of d$t$ simple. Mess$ging $llows users $cross t e networ& to exc $nge d$t$ in re$l time. *"#" O+E%ATING EN,I%ONMENT *"!" 4ardware >%eveloper $nd user environment? 1. 2'-M@ of !/M 2. P.A processor>1.3B(7? recommended 3. Minimum 4< B@ c$p$city $rd dis& *"& $o tware 1. Oper$ting System=8indows 2<<< $dv$nced server 2. 4ools= ,$v$ 1.'
t e %es&top s $ring we c$n oper$te our office computer from our ome or vice vers$.

*"'" O,E%A)) DE$C%I+TION" -9at is Network Administrator Tool< 3etwor& /dministr$tor 4ool provides remote service to its entire client over t e networ&. .t $cts $s $ networ& $dministr$tor to its client to provide remote service li&e remote s utdown5 remote logoff5 remote file tr$nsfer5 remote des&top s $ring5 remote c $tting $nd port sc$nning. !emote oper$tion suc $s remote s utdown $nd remote logoff re6uest $rrives from client t en first it p$rses t e re6uest $nd provides service to its corresponding client. #ile tr$nsfer oper$tion from server to t e re6uested client. #irst receives t e re6uest $nd recogni7e t e file n$me5 if t e file exists in server tr$nsfers it ot erwise sends $ file not found error mess$ge.

!emote %es&top S $ring en$)les t e $dministr$tors to g$in $ccess to remote 8indows des&tops in t e networ&. .t is $ tool en$)ling $ccess from $nyw ere in t e networ& wit out re6uiring $ny n$tive client. .t $llows $lmost $ll oper$tions to )e performed on t e remote des&top. !emote Mess$ging is $ sm$ll $pplic$tion t $t f$cilit$tes communic$tion )etween different osts on t e s$me loc$l $re$ networ&. .t does not re6uire $ centr$l server $nd uses very little )$ndwidt )y t$&ing $dv$nt$ge of $ lig tweig t protocol $nd 1%P p$c&ets. Port Sc$nner $llows $dministr$tor to &now t e inform$tion $)out ow m$ny ports $re wor&ing on t e specified system $nd w $t is t e port num)er $llotted for t e service5 ow m$ny ports $re closed5 $nd ow m$ny $re open..P Port Sc$nner $llows to test w et er $ remote computer is $live wit 1%P $nd $lso $llows to test w et er $ 4"P port is )eing listened wit two types "O33E"4S $nd SC3. .P Port Sc$nner reverse loo&up .P $ddress into ostn$me $nd re$d responses from connected 4"P Port. !emote /dministr$tor >!$dmin? is $ multifunction remote control progr$m.

!$dmin en$)les you to remotely monitor or wor& on one or more networ& computers rig t from your own wor&st$tion. .t is $ complete remote control solution wit suc fe$tures $s #ile 4r$nsfer5 34 security5 4elnet $nd Multil$ngu$ge Support )uilt9in. we c$n view t e remote computerDs screen on t e monitor in $ window. /ll mouse movements $nd &ey)o$rd sign$ls $re tr$nsferred directly to t e remote computer. 8e c$n wor& on t e remote computer *ust $s if it is rig t t ere in front of you. !$dmin performs $ll ot er remote control softw$re in speed5 us$)ility $nd fe$tures. 8it !$dmin we c$n wor& wit $ny remote computer so long $s it is connected to t e .nternet or loc$l $re$ networ& !emote /dministr$tor >!$dmin? is secure remote control softw$re t $t en$)les to wor& on $ remote computer $s if we were sitting in front of it. 4 is progr$m is t e ide$l remote $ccess solution. we c$n $ccess t e s$me computer from multiple pl$ces $nd use $dv$nced file tr$nsfer5 remote s utdown5 4elnet5 OS9integr$ted 34 security system support5 etc. !$dmin outperforms $ll ot er remote controls in speed5 reli$)ility $nd security.

%admin $tru7ture !$dmin consists of two p$rts= E 4 e $er;er on t e remote computer t $t sends t e remote computer screen displ$y.

E 4 e Client F $lso c$lled t e ,iewer F t $t s ows t e remote screen displ$y on your own monitor. 4o get st$rted we need to run !$dmin Server on t e remote computer. 4 en run !$dmin client on our own computer. !$dmin outperforms $ll ot er remote control softw$re in speed5 security $nd us$)ility. ."#" $($TEM DE,E)O+MENT EN,I%ONMENT ."!" OB=ECT O%IENTED +%OG%AMMING CONCE+T$

O)*ect9oriented Progr$mming w$s developed )ec$use limit$tions were discovered in e$rlier $ppro$c es to progr$mming. 4o $ppreci$te w $t OOP does5 we need to underst$nd w $t t ese limit$tions $re $nd ow t ey $rose from tr$dition$l progr$mming. +%OCEDU%A) )ANGUAGE$ P$sc$l5 "5 @$sic5 #ortr$n5 $nd simil$r l$ngu$ges $re procedur$l l$ngu$ges. 4 $t is5 e$c st$tement in t e l$ngu$ge tells t e computer to do somet ing= Bet some input5 $dd t ese num)ers5 divide )y -5 $nd displ$y t e output. / progr$m in $ procedur$l l$ngu$ge is $ list of instructions. #or very sm$ll progr$ms no ot er org$ni7ing principle >often c$lled $ p$r$digm? is needed. 4 e progr$mmer cre$tes t e list of instructions5 $nd t e computer c$rries t em out. Di;ision into 1un7tions 8 en progr$ms )ecome l$rger5 $ single list of instructions )ecomes unwieldy. #ew progr$mmers c$n compre end $ progr$m of more t $n $ few undred st$tements unless it is )ro&en down into sm$ller units. #or t is re$son t e function w$s $dopted $s $ w$y to m$&e progr$ms more compre ensi)le to t eir um$n cre$tors. >4 e term functions $re used in "GG $nd ". .n ot er l$ngu$ges t e s$me concept m$y )e referred to $s $ su)routine5 $ su)progr$m5 or $ procedure.? / progr$m is divided into functions5 $nd >ide$lly5 $t le$st? e$c function $s $ cle$rly defined purpose $nd $ cle$rly defined interf$ce to t e ot er functions in t e progr$m. 4 e ide$ of )re$&ing $ progr$m into functions c$n )e furt er extended )y grouping $ num)er of functions toget er into $ l$rger entity c$lled $ module5 )ut t e principle is simil$r= grouping $ num)er of components t $t c$rry out specific t$s&s. %ividing $ progr$m into functions $nd modules is one of t e cornerstones of structured progr$mming5 t e somew $t loosely defined discipline t $t org$ni7$tion for more t $n $ dec$de. +roblems wit9 $tru7tured +ro:rammin: /s progr$ms grow ever l$rger $nd more complex5 even t e structured progr$mming $ppro$c )egins to s ow signs of str$in. Cou m$y $ve e$rd $)out5 or )een involved in5 orror stories of progr$m development. 4 e pro*ect is too complex5 t e sc edule slips5 more progr$mmers $re $s influenced progr$mming

$dded5 complexity incre$ses5 costs s&yroc&et5 t e sc edule slips furt er5 $nd dis$ster ensues. >See 4 e Myt ic$l M$nHmont 5 )y #redric& P. @roo&s5 ,r.5 /ddison98esley5 1I225 for $ vivid description of t is process.? /n$ly7ing t e re$sons for t ese f$ilures reve$ls t $t t ere $re we$&nesses in t e procedur$l p$r$digm itself. 3o m$tter ow well t e structured progr$mming $ppro$c is implemented5 l$rge progr$ms )ecome excessively complex. 8 $t $re t e re$sons for t is f$ilure of procedur$l l$ngu$gesJ One of t e most cruci$l is t e role pl$yed )y d$t$. New Data Ty8es 4 ere $re ot er pro)lems wit tr$dition$l l$ngu$ges. One is t e difficulty of cre$ting new d$t$ types. "omputer l$ngu$ges typic$lly $ve sever$l )uilt9in d$t$ types= integers5 flo$ting9point num)ers5 c $r$cters5 $nd so on. 8 $t if you w$nt to invent your own d$t$ typeJ Per $ps you w$nt to wor& wit complex num)ers5 or two9dimension$l coordin$tes5 or d$tesF6u$ntities t e )uilt9in d$t$ types don;t $ndle e$sily. @eing $)le to cre$te your own types is c$lled extensi)ilityK you c$n extend t e c$p$)ilities of t e l$ngu$ge. 4r$dition$l l$ngu$ges $re not usu$lly extensi)le. 8it out unn$tur$l convolutions5 you c$n;t )undle toget er )ot X $nd C coordin$tes into $ single v$ri$)le c$lled Point5 $nd t en $dd $nd su)tr$ct v$lues of t is type. 4 e result is t $t tr$dition$l progr$ms $re more complex to write $nd m$int$in. T9e ob>e7t oriented a88roa79 4 e fund$ment$l ide$ )e ind o)*ect9oriented l$ngu$ges is to com)ine into $ single unit )ot d$t$ $nd t e functions t $t oper$te on t $t d$t$. Suc $ unit is c$lled $n o)*ect. /n o)*ect;s functions5 c$lled mem)er functions in "GG5 typic$lly provide t e only w$y to $ccess its d$t$. .f you w$nt to re$d t e item $nd return t e v$lue to you5 you c$ll $ mem)er function in t e o)*ect. .t will re$d t e item $nd return t e v$lue to you. Cou c$n;t $ccess t e d$t$ directly. 4 e d$t$ is idden5 so it is s$fe from $ccident$l modific$tion. %$t$ $nd its functions $re enc$psul$ted into $ single entity. %$t$ enc$psul$tion $nd d$t$ iding $re &ey terms in t e description of o)*ect9oriented l$ngu$ges.

.f you w$nt to modify t e d$t$ in $n o)*ect5 you &now ex$ctly w $t functions inter$ct wit it= t e mem)er functions in t e o)*ect. 3o ot er functions c$n $ccess t e d$t$. 4 is simplifies writing5 de)ugging5 $nd m$int$ining t e progr$m. / "GG progr$m typic$lly consists of $ num)er of o)*ects5 w ic communic$te wit e$c ot er )y c$lling one $not er;s mem)ers functions. 8e s ould mention t $t w $t $re c$lled mem)er functions in "GG $re c$lled met ods in some ot er o)*ect9oriented l$ngu$ges >suc $s SM/++4/+:5 one of t e first o)*ect oriented l$ngu$ges?. /lso5 d$t$ items $re referred to $s inst$nce v$ri$)les. "$lling $n o)*ect;s mem)er function is referred to $s sending $ mess$ge to t e o)*ect. 4 ese terms $re not usu$lly used in "G G. . Characteristics of object-oriented languages: +et;s )riefly ex$mine $ few of t e m$*or elements of o)*ect9oriented l$ngu$ges in gener$l $nd "GG in p$rticul$r. Objects 8 en you $ppro$c $ progr$mming pro)lem in $n o)*ect oriented l$ngu$ge5 you no longer $s& ow t e pro)lem will )e divided into functions5 )ut ow it will )e divided into o)*ects. 4 in&ing in terms of o)*ects5 r$t er t $n functions5 $s $ surprisingly elpful effect on ow e$sily progr$ms c$n )e designed $nd o)*ects in t e re$l world. 8 $t &inds of t ings )ecome o)*ects9oriented progr$msJ 4 e $nswer to t is is limited only )y your im$gin$tion5 )ut t ere $re some typic$l c$tegories to st$rt you t in&ing= Physical objects /utomo)ile in $ tr$ffic9flow simul$tion Electric$l components in $ circuit design to $ progr$m "ountries in $n economics model /ircr$ft in $n $ir9tr$ffic control system Elements of the computer-user environment 8indows Menus Br$p ics o)*ects >lines5 rect$ngles5 circles? 4 e mouse $nd t e &ey)o$rd

Progr$mming constructs "ustomi7ed $rr$ys St$c&s +in&ed lists @in$ry trees "ollection of d$t$ /n inventory / personnel file / diction$ry / t$)le of t e l$titudes $nd longitudes of world cities 1ser defined d$t$ types 4ime /ngles "omplex num)ers Points on t e pl$ne "omponents in $ computer g$mes B osts in m$7e g$me Positions in $ )o$rd g$me >c ess5 c ec&ers? /nim$ls in $n ecologic$l simul$tion Opponents $nd friends in $dventure g$mes 4 e m$tc )etween progr$mming o)*ects $nd re$l9world o)*ects us t e $ppy result of

com)ining d$t$ $nd functions= t e resulting o)*ects offer $ revolution in progr$m design5 no suc close m$tc )etween progr$mming constructs $nd t e items )eing modeled exists in $ procedur$l l$ngu$ge. Classes .n OOP we s$y t $t o)*ects $re mem)ers of cl$sses. 8 $t does t is me$n J +et;s loo& $t $n $n$logy. /lmost $ll computer l$ngu$ges $ve )uilt9in d$t$ types. #or inst$nce5 $ d$t$ type int5 me$ning integer is pre9defined in "GG. Cou c$n decl$re $s m$ny v$ri$)les of type int $s you need in your progr$m= .nt d$yK .nt countK

.nt divisorK .nt $nswerK / cl$ss serves $s $ pl$n5 or templ$te. .t specifies w $t d$t$5 $nd w $t functions will )e included in o)*ects of t $t cl$ss. %efining t e cl$ss doesn;t cre$te $ny o)*ects5 *ust $s t e mere existence of $ type int doesn;t cre$te $ny v$ri$)les. / cl$ss is t us $ collection of simil$r o)*ects. 4 is fits our non9tec nic$l underst$nding of t e word cl$ssK Prince5 sting5 $nd M$donn$ $re mem)ers of t e cl$ss of roc& musici$ns. 4 ere is no person c$lled roc& musici$n )ut specific people wit specific n$mes $re mem)ers of t is cl$ss if t ey possess cert$in c $r$cteristics. Abstraction /n essenti$l element of o)*ect9oriented progr$mming is $)str$ction. (um$ns m$n$ge complexity t roug $)str$ction. #or ex$mple5 people do not t in& of $ c$r $s $ set of tens of t ous$nds of individu$l p$rts. 4 ey t in& of it $s $ well9defined o)*ect wit its own uni6ue )e $vior. 4 is $)str$ction $llows people to use $ c$r to drive to t e grocery store wit out )eing overw elmed )y t e complexity of t e p$rts t $t form t e c$r. 4 ey c$n ignore t e det$ils of ow t e engine5 tr$nsmission5 $nd )r$&ing systems wor&. .nste$d t ey $re free to utili7e t e o)*ect $s $ w ole. / powerful w$y to m$n$ge $)str$ction is t roug t e use of ier$rc ic$l cl$ssific$tions. 4 is $llows you to l$yer t e sem$ntics of complex systems5 )re$&ing t em into more m$n$ge$)le pieces. #rom t e outside5 t e c$r is $ single o)*ect. Once inside5 you see t $t t e c$r consists of sever$l su)systems= steering5 )r$&es5 sound system5 se$t )elts5 e$ting5 cellul$r p one5 $nd so on. .n turn5 e$c of t ese su)systems is m$de up of more speci$li7ed units. #or inst$nce5 t e sound system consists of $ r$dio5 $ "% pl$yer5 $ndLor $ t$pe pl$yer. 4 e point is t $t you m$n$ge t e complexity of t e c$r >or $ny ot er complex system? t roug t e use of ier$rc ic$l $)str$ctions. (ier$rc ic$l $)str$ctions of complex systems c$n $lso )e $pplied to computer progr$ms. 4 e d$t$ from $ tr$dition$l process9oriented progr$m c$n )e tr$nsformed )y $)str$ction into its component o)*ects. / se6uence of process steps c$n )ecome $ collection of mess$ges )etween t ese o)*ects. 4 us5 e$c of e$c o)*ect descri)es its own uni6ue )e $vior. Cou c$n tre$t t ese o)*ects $s concrete entities t $t respond to mess$ges telling t em to do somet ing. 4 is is t e essence of o)*ect9oriented progr$mming.

O)*ect9oriented concepts form t e

e$rt of ,$v$ *ust $s t ey form t e )$sis for

um$n

underst$nding. .t is import$nt t $t you underst$nd ow t ese concepts tr$nsl$te into progr$ms. /s you will see5 o)*ect9oriented progr$mming is $ powerful $nd n$tur$l p$r$digm for cre$ting progr$ms t $t survive t e inevit$)le c $nges $ccomp$nying t e life cycle of $ny m$*or softw$re pro*ect5 including conception5 growt 5 $nd $ging. #or ex$mple5 once you $ve $ well defined o)*ects $nd cle$n5 reli$)le interf$ces to t ose o)*ects5 you c$n gr$cefully decommission or repl$ce p$rts of $n older system wit out fe$r. Encapsulation Enc$psul$tion is t e mec $nism t $t )inds toget er code $nd t e d$t$ it m$nipul$tes5 $nd &eeps )ot s$fe from outside interference $nd misuse. One w$y to t in& $)out enc$psul$tion is $s $ protective wr$pper t $t prevents t e code $nd d$t$ from )eing $r)itr$rily $ccessed )y ot er code defined outside t e wr$pper. /ccess to t e code $nd d$t$ inside t e wr$pper is tig tly controlled t roug $ well9defined interf$ce. 4o rel$te t is to t e re$l world5 consider t e $utom$tic tr$nsmission on $n $utomo)ile. .t enc$psul$tes undreds of )its of inform$tion $)out your engine5 suc $s ow muc you $re $cceler$ting5 t e pitc of t e surf$ce you $re on5 $nd t e position of t e s ift lever. Cou 5 $s t e user5 $ve only one met od of $ffecting t is complex enc$psul$tion= )y moving t e ge$r9s ift lever. Cou c$n;t $ffect t e tr$nsmission )y using t e turn sign$l or winds ield wipers5 for ex$mple. 4 us5 t e ge$rs ift lever is $ well9defined >indeed5 uni6ue? interf$ce to t e tr$nsmission. #urt er5 w $t occurs inside t e tr$nsmission does not $ffect o)*ects outside t e tr$nsmission. #or ex$mple5 s ifting ge$rs does not turn on t e e$dlig tsM @ec$use $n $utom$tic tr$nsmission is enc$psul$ted5 do7ens of c$r m$nuf$cturers c$n implement one in $ny w$y t ey ple$se. (owever5 from t e driver;s point of view5 t ey $ll wor& t e s$me. 4 is s$me ide$ c$n )e $pplied to progr$mming. 4 e power of enc$psul$ted code is t $t everyone &nows ow to $ccess it $nd t us c$n use it reg$rdless of t e implement$tion det$ils F$nd wit out fe$r of unexpected side effects. .n ,$v$ t e )$sis of enc$psul$tion is t e cl$ss. /lt oug t e cl$ss will )e ex$mined in gre$t det$il l$ter in t is )oo&5 t e following )rief discussion will )e elpful now. / cl$ss defines t e structure $nd )e $vior >d$t$ $nd code? t $t will )e s $red )y $ set of o)*ects. E$c o)*ect of $ given cl$ss cont$ins t e structure $nd )e $vior defined )y t e cl$ss5 $s if it were st$mped out )y $ mold in t e s $pe of t e cl$ss. #or t is re$son5 o)*ects $re sometimes referred to $s inst$nces of $ cl$ss. 4 us5 $ cl$ss is $ logic$l constructK $n o)*ect $s p ysic$l re$lity.

8 en you cre$te $ cl$ss5 you will specify t e code $nd d$t$ t $t constitute t $t cl$ss. "ollectively5 t ese elements $re c$lled mem)ers of t e cl$ss. Specific$lly5 t e d$t$ defined )y t e cl$ss $re referred to $s mem)er v$ri$)les or inst$nce v$ri$)les. 4 e code t $t oper$tes on t $t d$t$ is referred to $s mem)er met ods or *ust met ods. .f you $re f$mili$r wit "L"GG5 it m$y elp to &now t $t w $t $ ,$v$ progr$mmer c$lls $ met odK $ "L"GG progr$mmer c$lls $ function. Since t e purpose of $ cl$ss is to enc$psul$te complexity5 t ere $re mec $nisms for iding t e complexity of t e implement$tion inside t e cl$ss. E$c met od or v$ri$)le in $ cl$ss m$y )e m$r&ed priv$te or pu)lic. 4 e pu)lic interf$ce of $ cl$ss represents everyt ing t $t extern$l users of t e cl$ss need to &now5 or m$y &now. 4 e priv$te met ods $nd d$t$ c$n only )e $ccessed )y code t $t is $ mem)er of t e cl$ss. 4 erefore5 $ny ot er code t $t is not $ mem)er of t e cl$ss c$nnot $ccess $ priv$te met od or v$ri$)le. Since t e priv$te mem)ers of $ cl$ss m$y only )e $ccessed )y ot er p$rts of your progr$m t roug t e cl$ss; pu)lic met ods5 you c$n ensure t $t no improper $ctions t$&e pl$ce. Of course5 t is me$ns t $t t e pu)lic interf$ce s ould )e c$refully designed not to expose too muc of t e inner wor&ings of $ cl$ss. Inheritance .n erit$nce is t e process )y w ic one o)*ect $c6uires t e properties of $not er o)*ect. 4 is is import$nt )ec$use it supports t e concept of ier$rc ic$l cl$ssific$tion. /s mentioned e$rlier5 most &nowledge is m$de m$n$ge$)le )y ier$rc ic$l >t $t is5 top9down? cl$ssific$tions. #or ex$mple5 $ Bolden !etriever is p$rt of t e cl$ssific$tion dog5 w ic in turn is p$rt of t e m$mm$l cl$ss5 w ic is under t e l$rger cl$ss $nim$l. 8it out t e use of ier$rc ies5 e$c o)*ect would need to define $ll of its c $r$cteristics explicitly. (owever5 )y use of in erit$nce5 $n o)*ect need only define t ose 6u$lities t $t m$&e it uni6ue wit in its cl$ss. .t c$n in erit its gener$l $ttri)utes from its p$rent. 4 us5 it is t e in erit$nce mec $nism t $t m$&es it possi)le for one o)*ect to )e $ specific inst$nce of $ more gener$l c$se. Most people n$tur$lly view t e world $s m$de up of o)*ects t $t $re rel$ted to e$c ot er in $ ier$rc ic$l w$y5 suc $s $nim$ls5 m$mm$ls5 $nd dogs. .f you w$nted to descri)e $nim$ls in $n $)str$ct w$y5 you would s$y t ey $ve some $ttri)utes5 suc $s si7e5 intelligence5 $nd type of

s&elet$l system. /nim$ls $lso $ve cert$in )e $vior$l $spectsK t ey e$r5 )re$t e5 $nd sleep. 4 is description of $ttri)utes $nd )e $vior is t e cl$ss definition for $nim$ls. .f you w$nted to descri)e $ more specific cl$ss of $nim$ls5 suc $s m$mm$ls5 t ey would $ve more specific $ttri)utes5 suc $s type of teet 5 $nd m$mm$ry gl$nds. 4 is is &nown $s $ su)cl$ss of $nim$ls5 w ere $nim$ls $re referred to $s m$mm$ls; super cl$ss. Since m$mm$ls $re simply more precisely specified $nim$ls5 t ey in erit $ll of t e $ttri)utes from $nim$ls. / deeply in erited su)cl$ss in erits $ll of t e $ttri)utes from e$c of its $ncestors in t e cl$ss ier$rc y. .n erit$nce inter$cts wit enc$psul$tion $s well. .f $ given cl$ss enc$psul$tes some $ttri)utes5 t en $ny su)cl$ss will $ve t e s$me $ttri)utes plus $ny t $t it $dds $s p$rt of its speci$li7$tion >see #igure 292?. 4 is is $ &ey concept5 w ic lets o)*ect9oriented progr$ms grow in complexity line$rly r$t er t $n geometric$lly. / new su)cl$ss in erits $ll of t e $ttri)utes of $ll of its $ncestors. .t does not $ve unpredict$)le inter$ctions wit t e m$*ority of t e rest of t e code in t e system. Polymorphism Polymorp ism >from t e Bree&5 me$ning Nm$ny formsO? is $ fe$ture t $t $llows one interf$ce to )e used for $ gener$l cl$ss of $ctions. 4 e specific $ction is determined )y t e ex$ct n$ture of t e situ$tion. "onsider $ st$c& >w ic is $ l$st9in5 first9out list?. Cou mig t $ve $ progr$m t $t re6uires t ree types of st$c&. One st$c& is used for integer v$lues5 one for flo$ting9point v$lues5 $nd one for c $r$cters. 4 e $lgorit m t $t implements e$c st$c& is t e s$me5 even t oug t e d$t$ )eing stored differs. .n $ non9o)*ect9oriented l$ngu$ge5 you would )e re6uired to cre$te t ree difference sets of st$c& routines5 wit e$c set using different n$mes. (owever5 )ec$use of polymorp ism5 in ,$v$ you c$n specify $ gener$l set of st$c& routines t $t $ll s $re t e s$me n$mes. More gener$lly5 t e concept of polymorp ism is often expressed )y t e p r$se None interf$ce5 multiple met ods.O 4 is me$ns t $t it is possi)le to design $ generic interf$ce to $ group of rel$ted $ctivities. 4 is elps reduce complexity )y $llowing t e s$me interf$ce to )e used to specify $ gener$l cl$ss of $ction. .t is t e compiler;s *o) to select t e specific $ction >t $t is5 met od? $s it $pplies to e$c situ$tion. Cou5 t e progr$mmer5 do not need to m$&e t is selection m$nu$lly. Cou need only remem)er $nd utili7e t e gener$l interf$ce.

Extending t e dog $n$logy5 $ dog;s sense of smell is polymorp ic. .f t e dog smells $ c$t5 it will )$r& $nd run $fter it. .f t e dog smells its food5 it will s$liv$te $nd run to its )owl. 4 e s$me sense of smell is $t wor& in )ot situ$tions. 4 e difference is w $t is )eing smelled5 t $t is5 t e type of d$t$ )eing oper$ted upon )y t e dog;s noseM 4 is s$me gener$l concept c$n )e implemented in "GG $s it $pplies to met ods wit in $ "GG progr$m. Polymorphism, Encapsulation, and Inheritance Wor To!ether 8 en properly $pplied5 polymorp ism5 enc$psul$tion5 $nd in erit$nce com)ine to produce $ progr$mming environment t $t supports t e development of f$r more ro)ust $nd sc$le$)le progr$ms t $n does t e process9oriented model. / well9designed ier$rc y of cl$sses is t e )$sis for reusing t e code in w ic you $ve invested time $nd effort developing $nd testing. Enc$psul$tion $llows you to migr$te your implement$tions over time wit out )re$&ing t e code t $t depends on t e pu)lic interf$ce of your cl$sses. Polymorp ism $llows you to cre$te cle$n5 sensi)le5 re$d$)le5 $nd resilient code. Of t e two re$l9world ex$mples5 t e $utomo)ile more completely illustr$tes t e power of o)*ect9 oriented design. %ogs $re fun to t in& $)out from $n in erit$nce st$ndpoint5 )ut c$rs $re more li&e progr$ms. /ll drivers rely on in erit$nce to drive different types >su)cl$sses? of ve icles. 8 et er t e ve icle is $ sc ool is $ sc ool )us5 $ Mercedes sed$n5 $ Porsc e5 or t e f$mily miniv$n5 drivers c$n $ll more or less find $nd oper$te t e steering w eel5 t e )r$&es5 $nd t e $cceler$tor. /fter $ )it of ge$r grinding5 most people c$n even m$n$ge t e difference )etween $ stic& s ift $nd $n $utom$tic5 )ec$use t ey fund$ment$lly underst$nd t eir common super cl$ss5 t e tr$nsmission. People interf$ce wit enc$psul$ted fe$tures on c$rs $ll t e time. 4 e )r$&e $nd g$s ped$ls ide $n incredi)le $rr$y of complexity wit $n interf$ce so simple you c$n oper$te t em wit your feetM 4 e implement$tion of t e engine5 t e style of )r$&es5 $nd t e si7e of t e tires $ve no effect on ow you interf$ce wit t e cl$ss definition of t e ped$ls. 4 e fin$l $ttri)ute5 polymorp ism5 is cle$rly reflected in t e $)ility of c$r m$nuf$cturers to offer $ wide $rr$y of options on )$sic$lly t e s$me ve icle. #or ex$mple5 you c$n get $n $ntiloc& )r$&ing system or tr$dition$l )r$&es5 power or r$c&9$nd9pinion steering5 495 or -95 or 29cylender engines. Eit er w$y5 you will still press t e )re$& ped$l to stop5 turn t e steering w eel to c $nge direction5 $nd press t e $cceler$tor w en you w$nt to move.

=A,A Introdu7tion ,$v$ is $n o)*ect oriented5 multi t re$d progr$mming l$ngu$ge developed )y Sun Microsystems in 1II1. .t is designed to )e sm$ll5 simple $nd port$)le $cross different pl$tforms $s well $s oper$ting systems. 4 e popul$rity of ,$v$ is due to its uni6ue tec nology t $t is designed on t e )$sis of t ree &ey elements. 4 ey $re t e us$ge of $pplets5 powerful progr$mming l$ngu$ge constructs $nd $ ric set of signific$nt o)*ect cl$sses. 4 e editor >i.e.5 w ere t e progr$ms $re )eing written? c$n )e 3otep$d5 8ordP$d5 MS9%OS editor5 etcP?. 4 is provides system input $nd output c$p$)ilities $nd ot er utility functions in $ddition to cl$sses t $t support networ&ing5 common .nternet protocols $nd user interf$ce tool&it functions. -9y =a;a is sele7ted< ,$v$ w$s designed to meet $ll t e re$l world re6uirements wit its &ey fe$tures5 w ic $re expl$ined in t e following p$r$gr$p s= $im8le and 8ower ul" ,$v$ w$s designed to )e e$sy for t e profession$l progr$mmers to le$rn $nd use efficiently. ,$v$ m$&es itself simple )y not $ving surprising fe$tures. Since it exposes t e intern$l wor&ing of t e m$c ine5 t e progr$mmers c$n perform is desired $ction wit out fe$r. 1nli&e ot er progr$mming systems t $t provide do7ens of complic$ted w$ys to perform $ simple t$s&5 ,$v$ provides $ sm$ll num)er of cle$r w$ys to $c ieve $ given t$s&. $e7ure 4od$y everyone is worried $)out s$fety $nd security. 1sing ,$v$ "omp$ti)le @rowser5 $nyone c$n s$fety downlo$d $pplets wit out fe$r of vir$l infections or m$licious intent. ,$v$ $c ieves t is protection )y confining $ ,$v$ progr$m to ,$v$ execution environment $nd )y m$&ing it in$ccessi)le to ot er p$rts of t e computer. +ortable" .n ,$v$5 t e s$me mec $nism t $t gives security elps in port$)ility. M$ny types of computers $nd oper$ting systems $re used t roug out t e world $nd $re connected to t e .nternet. #or downlo$ding progr$ms t roug different pl$tforms connected o t e .nternet5 some port$)le5 execut$)le ode is needed. ,$v$;s $nswer to t ese pro)lems is its well9designed $rc itecture.

Ob>e7t?oriented"

,$v$ w$s not designed to )e source code comp$ti)le wit $ny ot er l$ngu$ge. ,$v$ te$m g$ve $ cle$n5 us$)le5 re$listic $ppro$c to o)*ects. 4 e o)*ect model in ,$v$ is simple $nd e$sy to extend5 w ile simple types5 suc $s integers5 $re &ept $s ig 9perform$nce non9o)*ects. %obust Most progr$ms in use now$d$ys f$il of t e two re$sons= memory m$n$gement or exception$l conditions. ,$v$ forces t e user to find mist$&es in t e e$rly st$ges of t e progr$m development. /t t e s$me time5 ,$v$ frees t e user from $ving to worry $)out t e most common c$uses of t e progr$mming errors. ,$v$ virtu$lly rectifies t e pro)lem of memory m$n$gement )y m$n$ging memory $lloc$tion $nd $utom$tic memory re$lloc$tion )y providing g$r)$ge collection for unused o)*ects. Multit9readed" ,$v$ w$s designed to meet t e re$l9world re6uirements of cre$ting inter$ctive5 networ&ed progr$ms. 4o $c ieve t is5 ,$v$ supports multit re$ded progr$mming5 w ic $llows user to write progr$ms t $t perform m$ny function simult$neously. 4 e ,$v$ run9time system en$)les t e user to construct smoot ly running inter$ctive systems. ,$v$;s e$sy9to9use $ppro$c to multit re$ding $llows t e user to t in& $)out t e specific )e $vior of is own progr$m5 not t e multit$s&ing su)system. 4 e ,$v$ designers wor&ed $rd in $tt$ining t eir go$l Nwrite onceK run $nyw ere5 $nytime5 foreverO $nd $s $ result t e ,$v$ Airtu$l M$c ine w$s developed. / m$in issue for t e designers w$s t $t of code longevity $nd port$)ility. One of t e m$in pro)lems is t e execution speed of t e progr$m. Since ,$v$ is $rc itecture9neutr$l it gener$tes )ytecode t $t resem)les m$c ine code $nd $re not specific to $ny processor.

=1C O;er;iew Sun Microsystems is lever$ging t e tec nology of 3etsc$pe "ommunic$tions5 .@M5 $nd +ig t ouse %esign >now owned )y Sun? to cre$te $ set of Br$p ic$l 1ser .nterf$ce >B1.? cl$sses t $t integr$te wit ,%: 1.1.'G5 $re st$nd$rd wit t e ,$v$ Q 2 pl$tform $nd provide $ more polis ed loo& $nd feel t $n t e st$nd$rd /84 component set. 4 e collection of /P.s coming out of t is effort5 c$lled t e ,$v$ #ound$tion "l$sses >,#"?5 $llows developers to )uild full9fe$tured enterprise9re$dy $pplic$tions. ,#" is composed of five /P.s= "WT, #ava $%, "ccessibility, %ra! and %rop, and &'in!. 4 e /84 components refer to t e /84 $s it exists in ,%: versions 1.1.2 $nd l$ter. ,$v$ 2% is $ gr$p ics /P. )$sed on tec nology licensed from .@ML4$ligent. .t is currently $v$il$)le wit t e ,$v$Q 2 Pl$tform >$nd not us$)le wit ,%: 1.1?. 4 e /ccessi)ility /P. provides $ssistive tec nologies5 li&e screen m$gnifiers5 for use wit t e v$rious pieces of ,#". %r$g $nd %rop support is p$rt of t e next ,$v$@e$n gener$tion5 RBl$sgow5R $nd is $lso $v$il$)le wit t e ,$v$Q 2 pl$tform.

Swing includes $ component set t $t is t$rgeted $t forms9)$sed $pplic$tions. +oosely )$sed on 3etsc$peDs $ccl$imed .nternet #ound$tion "l$sses >.#"?5 t e Swing components $ve $d t e most immedi$te imp$ct on ,$v$ development. 4 ey provide $ set of well9groomed widgets $nd $ fr$mewor& to specify ow B1.s $re visu$lly presented5 independent of pl$tform. /t t e time t is w$s written5 t e Swing rele$se is $t 1.1 >#"S?. .#"5 /845 $nd Swing= Sorting it $ll out 4 oug t e Swing widgets were )$sed e$vily on .#"5 t e two /P.s )e$r little resem)l$nce to one $not er from t e perspective of $ developer. 4 e loo& $nd feel of some Swing widgets $nd t eir rendering is prim$rily w $t descended from .#"5 $lt oug you m$y notice some ot er common$lties. 4 e /84 1.1 widgets $nd event model $re still present for t e Swing widgets. (owever5 t e 1.< event model does not wor& wit Swing widgets. 4 e Swing widgets simply extend /84 )y $dding $ new set of components5 t e ,"omponents5 $nd $ group of rel$ted support cl$sses. /s wit /845 Swing components $re $ll ,$v$@e$ns $nd p$rticip$te in t e ,$v$@e$ns event model. / su)set of Swing widgets is $n$logous to t e )$sic /84 widgets. .n some c$ses5 t e Swing versions $re simply lig tweig t components5 r$t er t $n peer9)$sed components. 4 e lig tweig t component $rc itecture w$s introduced in /84 1.1. .t $llows components to exist wit out n$tive oper$ting system widgets. .nste$d5 t ey p$rticip$te in t e ModelLAiewL"ontroller >MA"? $rc itecture5 w ic will )e descri)ed in P$rt .. of t is course. Swing $lso cont$ins some new widgets suc $s trees5 t$))ed p$nes5 $nd splitter p$nes t $t will gre$tly improve t e loo& $nd function$lity of B1.s. Swing P$c&$ge Overview Swing c$n exp$nd $nd simplify your development of cross9pl$tform $pplic$tions. 4 e Swing collection consists of seventeen p$c&$ges5 e$c of w ic $s its own distinct purpose. /s youDll le$rn in t is s ort course5 t ese p$c&$ges m$&e it rel$tively e$sy for you to put toget er $ v$riety of $pplic$tions t $t $ve $ ig degree of sop istic$tion $nd user friendliness. javax.s ing 4 e ig level swing p$c&$ge prim$rily consists of components5 $d$pters5 def$ult component models5 $nd interf$ces for $ll t e deleg$tes $nd models. javax.s ing.border 4 e )order p$c&$ge decl$res t e @order interf$ce $nd cl$sses5 w ic define specific )order rendering styles. javax.s ing.colorchooser 4 e colorc ooser p$c&$ge cont$ins support cl$sses for t e color c ooser component. javax.s ing.event 4 e event p$c&$ge is for t e Swing9specific event types $nd listeners. .n $ddition to t e *$v$.$wt.event types5 Swing components c$n gener$te t eir own event types. javax.s ing.filechooser 4 e filec ooser p$c&$ge cont$ins support cl$sses for t e file c ooser component. javax.s ing.plaf.! 4 e plugg$)le loo&9$nd9feel >P+/#? p$c&$ges cont$in t e 1ser .nterf$ce >1.? cl$sses >deleg$tes? w ic implement t e different loo&9$nd9feel $spects for Swing components. 4 ere $re $lso P+/# p$c&$ges under t e *$v$x.swing.pl$f ier$rc y. javax.s ing.table

4 e t$)le p$c&$ge cont$ins t e support interf$ces $nd cl$sses t e Swing t$)le component. javax.s ing.text 4 e text p$c&$ge cont$ins t e support cl$sses for t e Swing document fr$mewor&. javax.s ing.text.html.! 4 e text. tml p$c&$ge cont$ins t e support cl$sses for $n (4M+ version 3.2 renderer $nd p$rser. javax.s ing.text.rtf 4 e text.rtf p$c&$ge cont$ins t e support cl$sses for $ )$sic !ic 4ext #orm$t >!4#? renderer. javax.s ing.tree 4 e tree p$c&$ge cont$ins t e interf$ces $nd cl$sses w ic support t e Swing tree component. javax.s ing.undo 4 e undo p$c&$ge provides t e support cl$sses for implementing undoLredo c$p$)ilities in $ B1.. javax.accessibility 4 e ,#" /ccessi)ility p$c&$ge is included wit t e Swing cl$sses. (owever5 its us$ge is not discussed ere. -9at Are t9e =1C and $win:< ,#" is s ort for ,$v$4M #ound$tion "l$sses5 w ic encomp$ss $ group of fe$tures to elp people )uild gr$p ic$l user interf$ces >B1.s?. 4 e ,#" w$s first $nnounced $t t e 1II0 ,$v$One developer conference $nd is defined $s cont$ining t e following fe$tures= T9e $win: Com8onents .nclude everyt ing from )uttons to split p$nes to t$)les. Cou c$n see mugs ots of $ll t e components in / Aisu$l .ndex to t e Swing "omponents. +lu::able )ook and 1eel $u88ort Bives $ny progr$m t $t uses Swing components $ c oice of loo&s $nd feels. #or ex$mple5 t e s$me progr$m c$n use eit er t e ,$v$4M loo& $nd feel or t e 8indows loo& $nd feel. 8e expect m$ny more loo&9$nd9feel p$c&$ges 99 including some t $t use sound inste$d of $ visu$l Rloo&R 99 to )ecome $v$il$)le from v$rious sources. A77essibility A+I En$)les $ssistive tec nologies suc $s screen re$ders $nd @r$ille displ$ys to get inform$tion from t e user interf$ce. "ava #$%& API '"ava # Platform only( En$)les developers to e$sily incorpor$te ig 96u$lity 2% gr$p ics5 text5 $nd im$ges in $pplic$tions $nd in $pplets. $rag and $rop )upport '"ava # Platform only( Provides t e $)ility to dr$g $nd drop )etween $ ,$v$ $pplic$tion $nd $ n$tive $pplic$tion. 4 e first t ree ,#" fe$tures were implemented wit out $ny n$tive code5 relying only on t e /P. defined in ,%: 1.1. /s $ result5 t ey could $nd did )ecome $v$il$)le $s $n extension to ,%: 1.1. 4 is extension w$s rele$sed $s ,#" 1.15 w ic is sometimes c$lled Rt e Swing rele$se.R 4 e /P. in ,#" 1.1 is often c$lled Rt e Swing /P..R 4ow Are $win: Com8onents Di erent rom A-T Com8onents<

.f you donDt c$re $)out t e /84 components5 s&ip to t e next section. Cou c$n get $ more gener$l introduction to t e Swing components from / Suic& 4our of $ Swing /pplic$tionDs "ode $nd from t e Swing #e$tures $nd "oncepts lesson. 4 e /84 components $re t ose provided )y t e ,%: 1.< $nd 1.1 pl$tforms. /lt oug t e ,$v$ 2 Pl$tform still supports t e /84 components5 we strongly encour$ge you to use Swing components inste$d. Cou c$n identify Swing components )ec$use t eir n$mes st$rt wit ,. 4 e /84 )utton cl$ss5 for ex$mple5 is n$med @utton5 w ile t e Swing )utton cl$ss is n$med ,@utton. /ddition$lly5 t e /84 components $re in t e *$v$.$wt p$c&$ge5 w ile t e Swing components $re in t e *$v$x.swing p$c&$ge. 4 e )iggest difference )etween t e /84 components $nd Swing components is t $t t e Swing components $re implemented wit $)solutely no n$tive code. Since Swing components $renDt restricted to t e le$st common denomin$tor 99 t e fe$tures t $t $re present on every pl$tform 99 t ey c$n $ve more function$lity t $n /84 components. @ec$use t e Swing components $ve no n$tive code5 t ey c$n )e )e s ipped $s $n $dd9on to ,%: 1.15 in $ddition to )eing p$rt of t e ,$v$ 2 Pl$tform. Even t e simplest Swing components $ve c$p$)ilities f$r )eyond w $t t e /84 components offer= Swing )uttons $nd l$)els c$n displ$y im$ges inste$d of5 or in $ddition to5 text. Cou c$n e$sily $dd or c $nge t e )orders dr$wn $round most Swing components. #or ex$mple5 itDs e$sy to put $ )ox $round t e outside of $ cont$iner or l$)el. Cou c$n e$sily c $nge t e )e $vior or $ppe$r$nce of $ Swing component )y eit er invo&ing met ods on it or cre$ting $ su)cl$ss of it. Swing components donDt $ve to )e rect$ngul$r. @uttons5 for ex$mple5 c$n )e round. /ssistive tec nologies suc $s screen re$ders c$n e$sily get inform$tion from Swing components. #or ex$mple5 $ tool c$n e$sily get t e text t $tDs displ$yed on $ )utton or l$)el. Swing lets you specify w ic loo& $nd feel your progr$mDs B1. uses. @y contr$st5 /84 components $lw$ys $ve t e loo& $nd feel of t e n$tive pl$tform. /not er interesting fe$ture is t $t Swing components wit st$te use models to &eep t e st$te. / ,Slider5 for inst$nce5 uses $ @ounded!$ngeModel o)*ect to old its current v$lue $nd r$nge of leg$l v$lues. Models $re set up $utom$tic$lly5 so you donDt $ve to de$l wit t em unless you w$nt to t$&e $dv$nt$ge of t e power t ey c$n give you. Progr$ms s ould not5 $s $ rule5 use R e$vyweig tR components $longside Swing components. (e$vyweig t components include $ll t e re$dy9to9use /84 components >suc $s Menu $nd ScrollP$ne? $nd $ll components t $t in erit from t e /84 "$nv$s $nd P$nel cl$sses. 4 is restriction exists )ec$use w en Swing components >$nd $ll ot er Rlig tweig tR components? overl$p wit e$vyweig t components5 t e e$vyweig t component is $lw$ys p$inted on top. #or more inform$tion5 see Mixing (e$vy $nd +ig t "omponents5 $n $rticle in 4 e Swing "onnection.

Swing components $renDt t re$ding s$fe. .f you modify $ visi)le Swing component 99 invo&ing its set4ext met od5 for ex$mple 99 from $nyw ere )ut $n event $ndler5 t en you need to t$&e speci$l steps to m$&e t e modific$tion execute on t e event9disp$tc ing t re$d. 4 is isnDt $n issue for m$ny Swing progr$ms5 since component9modifying code is typic$lly in event $ndlers. 4 e cont$inment ier$rc y for $ny window or $pplet t $t cont$ins Swing components must $ve $ Swing top9level cont$iner $t t e root of t e ier$rc y. #or ex$mple5 $ m$in window s ould )e implemented $s $ ,#r$me inst$nce r$t er t $n $s $ #r$me inst$nce. Cou donDt $dd components directly to $ top9level cont$iner suc $s $ ,#r$me. .nste$d5 you $dd components to $ cont$iner >c$lled t e content p$ne? t $t is itself cont$ined )y t e ,#r$me.

$-ING$ $win: 1eatures and Con7e8ts 4 is 4opic introduces SwingDs fe$tures $nd expl$ins $ll t e concepts you need to )e $)le to use Swing components effectively. /t t e end of t is lesson we dissect $ Swing progr$m5 $s $ me$ns of reviewing everyt ing youDve le$rned. $win: Com8onents and t9e Containment 4ierar79y Swing provides m$ny st$nd$rd B1. components suc $s )uttons5 lists5 menus5 $nd text $re$s5 w ic you com)ine to cre$te your progr$mDs B1.. .t $lso includes cont$iners suc $s windows $nd tool )$rs. )ayout Mana:ement "ont$iners use l$yout m$n$gers to determine t e si7e $nd position of t e components t ey cont$in. @orders $ffect t e l$yout of Swing B1.s )y m$&ing Swing components l$rger. Cou c$n $lso use invisi)le components to $ffect l$yout. E;ent 4andlin: Event $ndling is ow progr$ms respond to extern$l events5 suc $s t e user pressing $ mouse )utton. Swing progr$ms perform $ll t eir p$inting $nd event $ndling in t e event9disp$tc ing t re$d. +aintin: P$inting me$ns dr$wing t e component on9screen. /lt oug itDs e$sy to customi7e $ componentDs p$inting5 most progr$ms donDt do $nyt ing more complic$ted t $n customi7ing $ componentDs )order. T9reads and $win: .f you do somet ing to $ visi)le component t $t mig t depend on or $ffect its st$te5 t en you need to do it from t e event9disp$tc ing t re$d. 4 is isnDt $n issue for m$ny simple progr$ms5 w ic gener$lly refer to components only in event9 $ndling code. (owever5 ot er progr$ms need

to use t e invo&e+$ter met od to execute component9rel$ted c$lls in t e event9disp$tc ing t re$d. More $win: 1eatures and Con7e8ts Swing offers m$ny fe$tures5 m$ny of w ic rely on support provided )y t e ,"omponent cl$ss. Some of t e interesting fe$tures t is lesson $snDt discussed yet include support for icons5 $ctions5 Plugg$)le +oo& T #eel tec nology5 $ssistive tec nologies5 $nd sep$r$te models. T9e Anatomy o a $win:?Based +ro:ram A sam8le $win: a88li7ation named Con;erter s9ows 9ow $win: 8ro:rams work and 9ow t9e 7ode 9an:s to:et9er"

%EMOTE MET4OD IN,OCATION !emote Met od .nvoc$tion >!M.? tec nology5 first introduced in ,%: 1.15 elev$tes networ& progr$mming to $ ig er pl$ne. /lt oug !M. is rel$tively e$sy to use5 it is $ rem$r&$)ly powerful tec nology $nd exposes t e $ver$ge ,$v$ developer to $n entirely new p$r$ "omp$rison of %istri)uted $nd 3ondistri)uted ,$v$ Progr$ms

4 e !M. $rc itects tried to m$&e t e use of distri)uted ,$v$ o)*ects simil$r to using loc$l ,$v$ o)*ects. 8 ile t ey succeeded5 some import$nt differences $re listed in t e t$)le )elow. +oc$l O)*ect !emote O)*ect

O)*ect %efinition / ,$v$ cl$ss defines $ loc$l / remote o)*ectDs exported )e $vior is defined )y $n o)*ect. interf$ce t $t must extend t e Remote interf$ce. O)*ect .mplement$tion O)*ect "re$tion .ts ,$v$ cl$ss implements $ loc$l o)*ect. 4 e new oper$tor cre$tes $ new inst$nce of $ loc$l o)*ect. / loc$l o)*ect is $ccessed directly vi$ $n o)*ect reference v$ri$)le. .n $ single ,AM5 $n o)*ect reference points directly $t $n o)*ect in t e e$p. / ,$v$ cl$ss t $t implements t e remote interf$ce executes $ remote o)*ect;s )e $vior. / new inst$nce of $ remote o)*ect is cre$ted on t e ost computer wit t e new oper$tor. / client c$nnot directly cre$te $ new remote o)*ect >unless using ,$v$ 2 !emote O)*ect /ctiv$tion?. / remote o)*ect is $ccessed vi$ $n o)*ect reference v$ri$)le w ic points to $ proxy stu) implement$tion of t e remote interf$ce. / Rremote referenceR is $ pointer to $ proxy o)*ect >$ Rstu)R? in t e loc$l e$p. 4 $t stu) cont$ins inform$tion t $t $llows it to connect to $ remote o)*ect5 w ic cont$ins t e implement$tion of t e met ods.

O)*ect /ccess

!eferences

/ctive !eferences .n $ single ,AM5 $n o)*ect is .n $ distri)uted environment5 remote ,AMs m$y considered R$liveR if t ere is cr$s 5 $nd networ& connections m$y )e lost. / $t le$st one reference to it. remote o)*ect is considered to $ve $n $ctive remote reference to it if it $s )een $ccessed wit in $ cert$in time period >t e le$se period?. .f $ll remote references $ve )een explicitly dropped5 or if $ll remote references $ve expired le$ses5 t en $ remote o)*ect is $v$il$)le for distri)uted g$r)$ge collection. #in$li7$tion .f $n o)*ect implements t e .f $ remote o)*ect implements t e Unreferenced fin$li7e>? met od5 it is c$lled interf$ce5 t e unreferenced met od of t $t interf$ce is )efore $n o)*ect is recl$imed c$lled w en $ll remote references $ve )een dropped. )y t e g$r)$ge collector. 8 en $ll loc$l references to $n o)*ect $ve )een dropped5 $n o)*ect )ecomes $ c$ndid$te for g$r)$ge collection. Exceptions $re eit er !untime exceptions or Exceptions. 4 e ,$v$ compiler forces $ progr$m to $ndle $ll Exceptions. 4 e distri)uted g$r)$ge collector wor&s wit t e loc$l g$r)$ge collector. .f t ere $re no remote references $nd $ll loc$l references to $ remote o)*ect $ve )een dropped5 t en it )ecomes $ c$ndid$te for g$r)$ge collection t roug t e norm$l me$ns. !M. forces progr$ms to de$l wit $ny possi)le RemoteException o)*ects t $t m$y )e t rown. 4 is w$s done to ensure t e ro)ustness of distri)uted $pplic$tions.

B$r)$ge "ollection

Exceptions

=a;a %MI Ar79ite7ture 4 e design go$l for t e !M. $rc itecture w$s to cre$te $ ,$v$ distri)uted o)*ect model t $t integr$tes n$tur$lly into t e ,$v$ progr$mming l$ngu$ge $nd t e loc$l o)*ect model. !M. $rc itects $ve succeededK cre$ting $ system t $t extends t e s$fety $nd ro)ustness of t e ,$v$ $rc itecture to t e distri)uted computing world. Inter a7es6 T9e 4eart o %MI 4 e !M. $rc itecture is )$sed on one import$nt principle= t e definition of )e $vior $nd t e implement$tion of t $t )e $vior $re sep$r$te concepts. !M. $llows t e code t $t defines t e )e $vior $nd t e code t $t implements t e )e $vior to rem$in sep$r$te $nd to run on sep$r$te ,AMs. 4 is fits nicely wit t e needs of $ distri)uted system w ere clients $re concerned $)out t e definition of $ service $nd servers $re focused on providing t e service. Specific$lly5 in !M.5 t e definition of $ remote service is coded using $ ,$v$ interf$ce. 4 e implement$tion of t e remote service is coded in $ cl$ss. 4 erefore5 t e &ey to underst$nding !M. is to remem)er t $t interfaces define behavior $nd classes define implementation. 8 ile t e following di$gr$m illustr$tes t is sep$r$tion5

!emem)er t $t $ ,$v$ interf$ce does not cont$in execut$)le code. !M. supports two cl$sses t $t implement t e s$me interf$ce. 4 e first cl$ss is t e implement$tion of t e )e $vior5 $nd it runs on t e server. 4 e second cl$ss $cts $s $ proxy for t e remote service $nd it runs on t e client. 4 is is s own in t e following di$gr$m.

/ client progr$m m$&es met od c$lls on t e proxy o)*ect5 !M. sends t e re6uest to t e remote ,AM5 $nd forw$rds it to t e implement$tion. /ny return v$lues provided )y t e implement$tion $re sent )$c& to t e proxy $nd t en to t e clientDs progr$m. %MI Ar79ite7ture )ayers 8it $n underst$nding of t e ig 9level !M. $rc itecture5 t$&e $ loo& under t e covers to see its implement$tion. 4 e !M. implement$tion is essenti$lly )uilt from t ree $)str$ction l$yers. 4 e first is t e Stu) $nd S&eleton l$yer5 w ic lies *ust )ene$t t e view of t e developer. 4 is l$yer intercepts met od c$lls m$de )y t e client to t e interf$ce reference v$ri$)le $nd redirects t ese c$lls to $ remote !M. service.

4 e next l$yer is t e !emote !eference +$yer. 4 is l$yer underst$nds ow to interpret $nd m$n$ge references m$de from clients to t e remote service o)*ects. .n ,%: 1.15 t is l$yer connects clients to remote service o)*ects t $t $re running $nd exported on $ server. 4 e connection is $ one9to9one >unic$st? lin&. .n t e ,$v$ 2 S%:5 t is l$yer w$s en $nced to support t e $ctiv$tion of dorm$nt remote service o)*ects vi$ Remote Object "ctivation. 4 e tr$nsport l$yer is )$sed on 4"PL.P connections )etween m$c ines in $ networ&. .t provides )$sic connectivity5 $s well $s some firew$ll penetr$tion str$tegies.

@y using $ l$yered $rc itecture e$c of t e l$yers could )e en $nced or repl$ced wit out $ffecting t e rest of t e system. #or ex$mple5 $ 1%PL.P l$yer could repl$ce t e tr$nsport l$yer wit out $ffecting t e upper l$yers. $tub and $keleton )ayer 4 e stu) $nd s&eleton l$yer of !M. lie *ust )ene$t t e view of t e ,$v$ developer. .n t is l$yer5 !M. uses t e Proxy design p$ttern. .n t e Proxy p$ttern5 $n o)*ect in one context is represented )y $not er >t e proxy? in $ sep$r$te context. 4 e proxy &nows ow to forw$rd met od c$lls )etween t e p$rticip$ting o)*ects. 4 e following cl$ss di$gr$m illustr$tes t e Proxy p$ttern.

.n !M.Ds use of t e Proxy p$ttern5 t e stu) cl$ss pl$ys t e role of t e proxy5 $nd t e remote service implement$tion cl$ss pl$ys t e role of t e !e$lSu)*ect. / s&eleton is $ elper cl$ss t $t is gener$ted for !M. to use. 4 e s&eleton underst$nds ow to communic$te wit t e stu) $cross t e !M. lin&. 4 e s&eleton c$rries on $ convers$tion wit t e stu)K it re$ds t e p$r$meters for t e met od c$ll from t e lin&5 m$&es t e c$ll to t e remote service implement$tion o)*ect5 $ccepts t e return v$lue5 $nd t en writes t e return v$lue )$c& to t e stu). .n t e ,$v$ 2 S%: implement$tion of !M.5 t e new wire protocol $s m$de s&eleton cl$sses o)solete. !M. uses reflection to m$&e t e connection to t e remote service o)*ect. Cou only

$ve to worry $)out s&eleton cl$sses $nd o)*ects in ,%: 1.1 $nd ,%: 1.1 comp$ti)le system implement$tions. Usin: %MI .t is now time to )uild $ wor&ing !M. system $nd get $nds9on experience. .n t is section5 you will )uild $ simple remote c$lcul$tor service $nd use it from $ client progr$m. / wor&ing !M. system is composed of sever$l p$rts.

.nterf$ce definitions for t e remote services .mplement$tions of t e remote services Stu) $nd S&eleton files / server to ost t e remote services /n !M. 3$ming service t $t $llows clients to find t e remote services / cl$ss file provider >$n (44P or #4P server? / client progr$m t $t needs t e remote services

4o simplify t ings5 you will use $ single directory for t e client $nd server code. @y running t e client $nd t e server out of t e s$me directory5 you will not $ve to set up $n (44P or #4P server to provide t e cl$ss files. >%et$ils $)out ow to use (44P $nd #4P servers5 $s cl$ss file providers will )e covered in t e section on %istri)uting $nd .nst$lling !M. Softw$re? /ssuming t $t t e !M. system is $lre$dy designed5 you t$&e t e following steps to )uild $ system= 1. 2. 3. 4. '. 8rite $nd compile ,$v$ code for interf$ces 8rite $nd compile ,$v$ code for implement$tion cl$sses Bener$te Stu) $nd S&eleton cl$ss files from t e implement$tion cl$sses 8rite ,$v$ code for $ remote service ost progr$m %evelop ,$v$ code for !M. client progr$m

.nst$ll $nd run !M. system

/"#" DE$IGN DETAI)$ Introdu7tion6 System designing is $ solution5 O ow to N $ppro$c to t e cre$tion of $ new system. 4 is import$nt p $se provides t e underst$nding $nd procedur$l det$ils necess$ry for implementing

t e system recommend in t e fe$si)le study. 4 e design step produces $ d$t$ design5 $n $rc itectur$l design $nd $ procedur$l design. 4 e d$t$ %esign tr$nsform t e inform$tion dom$in model cre$ted during $n$lysis into d$t$ structures t $t will )e re6uired to implement t e softw$re. 4 e $rc itectur$l design defines t e rel$tions ip $mong t e m$*or structur$l components into $ procedur$l description of t e softw$re. Source code is gener$ted $nd testing is conducted to integr$te $nd v$lid$te t e softw$re. #rom $ pro*ect M$n$gement of view5 Softw$re design is conducted in two steps. 4 eir prelimin$ry design is concern wit t e tr$nsform$tion in to d$t$ $nd Softw$re $rc itecture. %et$iled design focuses on refinement to t e $rc itectur$l represent$tion t $t le$d to det$iled d$t$ structure $nd $lgorit mic represent$tions for softw$re. /"!" DATA DE$IGN6 %$t$ design is t e first of t e t ree design $ctivities t $t $re conducted during softw$re engineering. 4 e imp$ct of t e d$t$ structure $nd procedur$l complexity c$uses d$t$ design to $ve $ profound influence on t e softw$re 6u$lity. 4 e "oncepts of inform$tion iding $nd d$t$ $)str$ction provides t e found$tion for $n $ppro$c to d$t$ design. /"&" A%C4ITECTU%A) DE$IGN6 4 e prim$ry o)*ective of t e $rc itectur$l design is to develop $ modul$r progr$m structure $nd represent t e control rel$tions ip )etween modules. .n $ddition5 $rc itectur$l design melds progr$m structure $nd d$t$ defining interf$ces t $t en$)le d$t$ to flow t roug out t e progr$m. /"'" +%OCEDU%A) DE$IGN6 4 e prim$ry design occurs $fter d$t$ $nd progr$m structure $s )een est$)lis ed. Procedur$l det$il c$n )e specific sing eit er of t e following= Structured progr$mming. #lowc $rt constructs. %ecision t$)les. Structured Englis .

0" DATA1)O- DIAG%AM

DATA 1)O-$ AND T4E DATA $TO%E$6 %$t$ flows $re d$t$ structures in motion5 w ile d$t$ stores $re d$t$ structures. %$t$ flows $re p$t s or Upipe lines;5 $long w ic d$t$ structures tr$vel5 w ere $s t e d$t$ stores $re pl$ce w ere d$t$ structures $re &ept until needed. %$t$ flows $re d$t$ structures in motion5 w ile d$t$ stores $re d$t$ structures $t rest. (ence it is possi)le t $t t e d$t$ flow $nd t e d$t$ store would )e m$de up of t e s$me d$t$ structure. %$t$ flow di$gr$ms is $ very $ndy tool for t e system $n$lyst )ec$use it gives t e $n$lyst t e over$ll picture of t e system5 it is $ di$gr$mm$tic $ppro$c . / %#% is $ pictori$l represent$tion of t e p$t w ic d$t$ t$&es #rom its initi$l inter$ction wit t e existing system until it completes $ny inter$ction. 4 e di$gr$m will descri)e t e logic$l d$t$ flows de$ling t e movements of $ny p ysic$l items. 4 e %#% $lso gives t e insig t into t e d$t$ t $t is used in t e system i.e.5 w o $ctu$lly uses it is tempor$rily stored. / %#% does not s ow $ se6uence of steps. / %#% only s ows w $t t e different process in $ system is $nd w $t d$t$ flows )etween t em. 0"!" %U)E$ 1O% D1D6 #ix t e scope of t e system )y me$ns of context di$gr$ms. Org$ni7e t e %#% so t $t t e m$in se6uence of t e $ctions re$ds left to rig t $nd top to )ottom. .dentify $ll inputs $nd outputs. .dentify $nd l$)el e$c process intern$l to t e system wit rounded circles. / process is re6uired for $ll t e d$t$ tr$nsform$tion $nd tr$nsfers. 4 erefore5 never connect $ d$t$ store to $ d$t$ source or t e destin$tions or $not er d$t$ store wit *ust $ d$t$ flow $rrow. %o not indic$te $rdw$re $nd ignore control inform$tion. M$&e sure t e n$mes of t e processes $ccur$tely convey everyt ing t e process is done. 4 ere must not )e unn$med process. .ndic$te extern$l sources $nd destin$tions of t e d$t$5 wit s6u$res. 3um)er e$c occurrence of repe$ted extern$l entities. .dentify $ll d$t$ flows for e$c process step5 except simple !ecord retriev$ls.

+$)el d$t$ flow on e$c $rrow. 1se det$ils flow on e$c $rrow. 1se t e det$ils flow $rrow to indic$te d$t$ movements. 4 ere c$n;t )e unn$med d$t$ flow. / d$t$ flow c$n;t connect two extern$l entities.

0"&" )E,E)$ O1 D1D6 4 e complexity of t e )usiness system me$ns t $t it is $ responsi)le to represent t e oper$tions of $ny system of single d$t$ flow di$gr$m. /t t e top level5 $n Overview of t e different systems in $n org$ni7$tion is s own )y t e w$y of context $n$lysis di$gr$m. 8 en exploded into %#% 4 ey $re represented )y= +EAE+9<= SCS4EM .3P14LO14P14 +EAE+91= S1@SCS4EM +EAE+ %/4/#+O8 #13"4.O3/+ +EAE+92= #.+E +EAE+ %E4/.+ %/4/ #+O8.

4 e input $nd output d$t$ s own s ould )e consistent from one level to t e next. +EAE+9<= SCS4EM .3P14LO14P14 +EAE+

/ level9< %#% descri)es t e system9wide )ound$ries5 de$ling inputs to $nd outputs from t e system $nd m$*or processes. 4 is di$gr$m is simil$r to t e com)ined user9 level context di$gr$m. +EAE+91= S1@SCS4EM +EAE+ %/4/ #+O8

/ level91 %#% descri)es t e next level of det$ils wit in t e system5 det$iling t e d$t$ flows )etween su)systems5 w ic m$&eup t e w ole.

+EAE+92=

#.+E +EAE+ %E4/.+ %/4/ #+O8

/ll t e pro*ects $re fe$si)le given unlimited resources $nd infinite time. .t is )ot necess$ry $nd prudent to ev$lu$te t e fe$si)ility of t e pro*ect $t t e e$rliest possi)le time. #e$si)ility $nd t e ris& $n$lysis $re pert$ined in m$ny w$ys. 4 e following $re some %#% sym)ols used in t e pro*ect SCM@O+ %ES"!.P4.O3 E34.4C= .nform$tion outside t e )ounds System to )e module.

P!O"ESS= .t is $ tr$ns$ction of .nform$tion t $t resides wit in t e )ounds of t e system to )e module. %/4/S4O!E= /n expository of d$t$ t $t is to )e stored for use )y one or more processes5 m$y )e $s simple $s $ )uffer of 6ueue or $s $ rel$tion$l d$t$)$se.

4 is is to indic$te t e flow of t e d$t$. "OMM13."/4.O3 8.4( "+.E34

"+.E34 S.%E

%emote Deskto8 $er;er

Client

+OB9 S(14 +OB9 S(14 O## O## %O83 %O83

%ES:4O %ES:4O !EMO4E "(/4 #.+E !EMO4E "(/4 #.+E P P SE!A."ES SE!A."ES 4!/S#E 4!/S#E S(/!.3 S(/!.3 ! ! B B

$E%,E% $IDE

%emote Deskto8 Client

"OMM13."/4.O3 8.4( "+.E34

"(/4

Client

#.+E 4!/3S#E!

0"'" 1)O- C4A%T$

Introdu7tion6? @efore solving $ pro)lem wit t e elp of $ computer5 it is essenti$l to pl$n t e solution in $ step9)y9step m$nner. Suc $ pl$nning is represented sym)olic$lly wit t e elp of flow

c $rt. .t is $n import$nt tool of system $n$lysts $nd Progr$mmers for tr$cing t e inform$tion flow $nd t e logic$l se6uence in d$t$ processing +ogic is t e essence of $ flow c $rt. / flow c $rt is t e sym)olic represent$tion of step9)y9step solution of $ given pro)lem5 $nd it indic$tes flow of entire process5 t e se6uence of t e d$t$ input5 oper$tions5 comput$tions5 decisions5 results $nd ot er relev$nt inform$tion. Pert$ining to $ p$rticul$r pro)lem5 $ flow c $rt elps us in t e complete underst$nding of t e logic$l structure of $ complic$ted pro)lem $nd in documenting t e met od used. .t would )e seen t $t t e flow c $rt is $ very convenient met od of org$ni7ing t e logic$l steps $nd deciding w $t5 w en $nd ow to proceed wit v$rious processes. 4 e logic s ould )e depicted in t e flow c $rts. "omputeri7$tion of t e d$t$ wit out $ flow c $rt is li&e constructing t e )uilding wit out $ proper design $nd det$iled dr$wings. 5inds o t9e low 79arts

1.

System #low " $rt

4 e system $n$lyst to descri)e d$t$ flow $nd oper$tions for t e d$t$ processing cycle uses t ese. / system flow c $rt defines t e )ro$d processing in t e org$ni7$tions5 s owing t e origin of t e d$t$5 filling structure5 processing to )e performed5 output t $t is to gener$te $nd necessity of t e offline oper$tion. & . Progr$m #low " $rt >or? "omputer Procedure flow c $rt 4 e progr$mmers to descri)e t e se6uence of oper$tions $nd t e decision of $ p$rticul$r pro)lem norm$lly use t ese. / progr$m flow c $rt pl$ns t e progr$m structure $nd $lso serves t e purpose of document$tion for $ progr$m5 w ile c $rt is to )e ret$ined $nd used $t $ l$ter d$te eit er )y t e origin$l progr$mmer or ot ers. Ad;anta:es6

/p$rt from5 t e %#%S t e flow c $rts $s )een elping t e progr$mmer to develop t e progr$mming logic $nd to serve $s t e document$tion for $ "ompleted progr$m5 it $s t e following $dv$nt$ges 1. 4 ey elp for t e e$sy underst$nding of t e logic of $ process or $ procedure

2. .t is $ )etter communic$ting tool t $n writing in

8ords.

3. .t is e$sy to find t e conditions5 w ic $re responsi)le for t e $ctions. 4. .t is $n import$nt tool for pl$nning $nd designing t e new system. '. .t cle$rly indic$tes t e role9pl$yed $t e$c level. -. .t provides $n overview of t e system $nd $lso demonstr$tes t e rel$tion s ip )etween t e v$rious steps. 0. .t f$cilit$tes trou)les ooting. 2. .t promotes logic$l $ccur$cy.

%is$dv$nt$ges= 1. "ommunic$tion lines $re not $lw$ys e$sy to s ow. 2. 4 e c $rts $re sometimes complic$ted. 3. !eproduction is difficult. 4. 4 ey $re $rd to modify. Sym)ols used in t e flow c $rts= 4E!M.3/+ PO.34 >S4/!4LS4OP?

%E".S.O3 @OX

P!O"ESS

/+4E!3/4E P!O"ESS

%/4/

P!E %E#.3E% P!O"ESS

%O"1ME34 >P!.34 O14?

M1+4.%O"1ME34

"O33E"4O!

%.SP+/C

#+O8 +.3E

M/31/+ .3P14

0"*" UM) @UNI1IED MODE))ING )ANGUAGEA 4 e unified modeling l$ngu$ge is $ st$nd$rd l$ngu$ge for specifying5 Aisu$li7ing5 "onstructing $nd %ocumenting t e softw$re system $nd its components. .t is $ gr$p ic$l l$ngu$ge w ic provides $ voc$)ul$ry $nd set of sem$ntics $nd rules. 4 e 1M+ focuses on t e conceptu$l $nd p ysic$l represent$tion of t e system. .t c$ptures t e decisions $nd underst$ndings $)out systems t $t must )e constructed. .t is used to underst$nd5 design 5 configure5 m$int$in $nd control inform$tion $)out t e systems. ,isualiBin: 6 4 roug 1M+ we see or visu$li7e $n existing system $nd ultim$tely we visu$li7e ow t e system is going to )e $fter implement$tion. 1nless we t in& we c$nnot implement. 1M+ elps to visu$li7e ow t e components of t e system communic$te $nd inter$ct wit e$c ot er. $8e7i yin: 6 Specifying me$ns )uilding models t $t $re precise5 un$m)iguous $nd complete 1M+ $ddresses t e specific$tion of $ll t e import$nt /n$lysis %esign5 .mplement$tion decisions t $t must )e m$de in developing $nd deploying $ softw$re system. Constru7tin: 6 1M+;s models c$n )e directly connected to $ v$riety of progr$mming l$ngu$ge t roug m$pping $ model from 1M+ to $ progr$mming l$ngu$ge li&e ,$v$ or "GG or A@. #orw$rd Engineering $nd !everse Engineering is possi)le t roug 1M+. Do7umentin:6

4 e deliver$)les of $ pro*ect $p$rt from coding $re some $rtif$cts w ic $re critic$l in controlling5 me$suring $nd communic$ting $)out $ system during its development vi7. !e6uirements5 /rc itecture5 %esign5 Source code5 Pro*ect pl$ns5 4ests5 Prototypes5 !ele$ses etc. Dia:rams in UM) 6 %i$gr$ms $re gr$p ic$l present$tion of set of elements. %i$gr$ms visu$li7e $ system from different $ngles $nd perspectives. 4 e 1M+ $s 3ine di$gr$ms t ese di$gr$ms c$n )e cl$ssified into t e following groups. St$tic= 1. 2. 3. 4. %yn$mic= "l$ss di$gr$ms. O)*ect di$gr$ms. "omponent di$gr$ms. %eployment di$gr$ms

1. 2. 3. 4. '.
St$tic or structur$l di$gr$ms = "l$ss di$gr$m =

1se c$se di$gr$m. Se6uence di$gr$m. "oll$)or$tion di$gr$m. St$te c $rt di$gr$m. /ctivity di$gr$m.

4 is s ows $ set of cl$sses5 interf$ces5 coll$)or$tions $nd t eir rel$tions ips. 4 ere $re t e most common di$gr$ms in modeling t e o)*ect oriented systems $nd $re used to give t e st$tic view of $ system. O)*ect di$gr$m= S ows $ set of o)*ects $nd t eir rel$tions ips $nd $re used to s ow t e d$t$ structures5 t e st$tic sn$ps ots of inst$nces of t e elements in $ cl$ss di$gr$m. +i&e cl$ss di$gr$m5 t e o)*ect di$gr$ms $lso $ddress t e st$tic design view or process view of $ system. "omponent di$gr$m= S ows $ set of components $nd t eir rel$tions ips $nd $re used to illustr$te t e st$tic implememt$tion view of $ system. 4 ey $re rel$ted to cl$ss di$gr$ms w ere in components m$p to one or more cl$sses5 interf$ces of coll$)or$tions.

%eployment di$gr$m= S ows $ set of nodes $nd t eir rel$tions ips. 4 ey $re used to s ow t e st$tic deployment view of t e $rc itecture of $ system. 4 ey $re rel$ted to t e component di$gr$ms w ere $ node encloses one or more components. %yn$mic or )e $vior$l di$gr$ms= 1se "$se di$gr$m= S ows $ set of use c$ses $nd $ctors $nd t eir rel$tions ips. 4 ese di$gr$ms illustr$te t e st$tic use c$se view of $ system $nd $re import$nt in org$ni7ing $nd modeling t e )e $viors of $ system. Se6uence di$gr$m T coll$)or$tion di$gr$m= 4 ese two di$gr$ms $re sem$ntic$lly s$me i.e. t e dyn$mics of $ system c$n )e modeled using one di$gr$m $nd tr$nsform it to t e ot er &ind of di$gr$m wit out loss of inform$tion. @ot form t e5 .nter$ction di$gr$m. Se6uence di$gr$m= Se6uence di$gr$m is $n inter$ction di$gr$m w ic focuses on t e time ordering of mess$ges it s ows $ set of o)*ects $nd mess$ges exc $nge )etween t ese o)*ects. 4 is di$gr$m illustr$tes t e dyn$mic view of $ system. coll$)or$tion di$gr$m= 4 is di$gr$m is $n inter$ction di$gr$m t $t stresses or emp $si7es t e structur$l org$ni7$tion of t e o)*ects t $t send $nd receive mess$ges. .t s ows $ set of o)*ects5 lin&s )etween o)*ects $nd mess$ges send $nd received )y t ose o)*ects. 4 ere $re used to illustr$te t e dyn$mic vies of $ system. St$te " $rt %i$gr$m $nd /ctivity %i$gr$ms= 4 ese %i$gr$ms $re sem$ntic$lly simil$r. St$te c $rt di$gr$m s ows $ st$te m$c ine consisting of st$tes5 tr$nsitions $nd $ctivities t ese illustr$tes t e dyn$mic view of $ system. 4 ey focuses on t e event ordered @e $vior of $n o)*ect. /ctivity %i$gr$ms=

/ctivity di$gr$m s ows t e flow from one $ctivity to $not er wit in $ system. 4 e $ctivities m$y )e se6uenti$l or )r$nc ing o)*ects t $t $ct $nd $re $cted upon. 4 ese $lso s ow t e dyn$mic view of t e system.

1se "$se %i$gr$m

RemoteControl

Admin

File Transfer Control

RemoteServices

RemoteControlled

Client

FileReceiver

Actions(Shutdown and logoff)

Se6uence %i$gr$m

Admin

alid Connect

Chat

File Transfer

Shut!own

"ogoff

for Connect and !isconnect

for Chatting

for file Transfer

for Shutdown

for "ogoff

validate

Client

alid Connect

Chat

FileReciever

Re#uest for Connect

for Chatting

For Receiving the file

Shutdown and "ogoff

'ui Component &enu


(f rom "ogical iew) (f rom "ogical iew)

!ataStore ((uses))

$ptionScreen
(f rom "ogical iew)

((instantiate s)) %nputScreen


(f rom "ogical iew)

Start Report
(f rom "ogical iew)

Shut!own Secure

"ogoff

!ata &anipulation

Authentication

Remote File Transfer S*stem Start

S*stem Shutdown

S*stem "ogoff

alid %+Address UnAuthenti cation alidation

alid Connect

Start

Authenticat ion

end

3" Maintenan7e and Im8lementation 6 ? 3"!Corre7ti;e Maintenan7e 6 ?

4 is $cts to correct errors t $t $re uncovered $fter t e softw$re is in use .

3"& Ada8ti;e Maintenan7e 6 ? 4 is is $pplied w en c $nges is t e extern$l environment precipit$te modific$tions to softw$re .

3"' +re;enti;e Maintenan7e 6 ? 4 is improves future m$int$in$)ility $nd reli$)ility $nd provides )$sis for future en $ncements.

CONC)U$ION 3etwor& /dministr$tor 4ool is one of t e )est tools in t e m$r&et for remote $dministr$tion purposes. .t is f$st5 secure5 comfort$)le to use $nd pl$tform independent. 4 is en$)les $ networ& $dministr$tor to wor& on $ny computer in t e loc$l $re$ networ& >.ntr$net? or connected to t e .nternet. 8e c$n )e $)le to remotely control t e server wit out t e $id of $ t ird p$rty product.

También podría gustarte