What is networking?
Networking is the word basically relating to computers and their connectivity. It is very often
used in the world of computers and their use in different connections. The term networking
implies the link between two or more computers and their devices, with the vital purpose of
sharing the data stored in the computers, with each other. The networks between the
computing devices are very common these days due to the launch of various hardware and
computer software which aid in making the activity much more convenient to build and use.
Structure of Networking between the different computers
How networking works?
General Network Techniques - When computers communicate on a network, they
send out data packets without knowing if anyone is listening. omputers in a network all
have a connection to the network and that is called to be connected to a network bus. What
one computer sends out will reach all the other computers on the local network.
"bove diagrams show the clear idea about the networking functions
#or the different computers to be able to distinguish between each other, every computer has
a uni$ue I% called &"-address '&edia "ccess ontrol "ddress(. This address is not only
uni$ue on your network but uni$ue for all devices that can be hooked up to a network. The
&"-address is tied to the hardware and has nothing to do with I)-addresses. Since all
computers on the network receives everything that is sent out from all other computers the
&"-addresses is primarily used by the computers to filter out incoming network traffic that
is addressed to the individual computer.
When a computer communicates with another computer on the network, it sends out both the
other computers &"-address and the &"-address of its own. In that way the receiving
computer will not only recogni*e that this packet is for me but also, who sent this data packet
so a return response can be sent to the sender.
On an thernet network as described here, all computers hear all network traffic since they
are connected to the same bus. This network structure is called multi-drop.
,ne problem with this network structure is that when you have, let say ten '!-( computers on
a network and they communicate fre$uently and due to that they sends out there data packets
randomly, collisions occur when two or more computers sends data at the same time. When
that happens data gets corrupted and has to be resent. ,n a network that is heavy loaded even
the resent packets collide with other packets and have to be resent again. In reality this soon
becomes a bandwidth problem. If several computers communicate with each other at high
speed they may not be able to utili*e more than +./ of the total network bandwidth since the
rest of the bandwidth is used for resending previously corrupted packets. The way to
minimi*e this problem is to use network switches.
Characteristics o! Networking"
The following characteristics should be considered in network design and ongoing
!( #$aila%ilit&" is typically measured in a percentage based on the number of minutes
that e1ist in a year. Therefore, uptime would be the number of minutes the network is
available divided by the number of minutes in a year.
+( Cost includes the cost of the network components, their installation, and their
ongoing maintenance.
2( Relia%ilit& defines the reliability of the network components and the connectivity
between them. &ean time between failures '&T3#( is commonly used to measure
4( 'ecurit& includes the protection of the network components and the data they
contain and5or the data transmitted between them.
.( '(ee) includes how fast data is transmitted between network end points 'the data
6( 'cala%ilit& defines how well the network can adapt to new growth, including new
users, applications, and network components.
7( To(olog& describes the physical cabling layout and the logical way data moves
between components.
T&(es o! Networks"
,rgani*ations of different structures, si*es, and budgets need different types of networks.
Networks can be divided into one of two categories0
• peer-to-peer
• server-based networks
1. *eer+to+*eer Network"
" peer-to-peer network has no dedicated servers8 instead, a number of workstations are
connected together for the purpose of sharing information or devices. )eer-to-peer networks
are designed to satisfy the networking needs of home networks or of small companies that do
not want to spend a lot of money on a dedicated server but still want to have the capability to
share information or devices like in school, college, cyber cafe
,. 'er$er+-ase) Networks"
In server-based network data files that will be used by all of the users are stored on the one
server. With a server-based network, the network server stores a list of users who may use
network resources and usually holds the resources as well.
This will help by giving you a central point to set up permissions on the data files, and it will
give you a central point from which to back up all of the data in case data loss should occur.
Network Co..unications"
• omputer networks use signals to transmit data, and protocols are the languages
computers use to communicate.
• )rotocols provide a variety of communications services to the computers on the
• 9ocal area networks connect computers using a shared, half-duple1, baseband
medium, and wide area networks link distant networks.
• :nterprise networks often consist of clients and servers on hori*ontal segments
connected by a common backbone, while peer-to-peer networks consist of a small number
of computers on a single 9"N.
#)$antages o! Networking"
1. as& Co..unication"
It is very easy to communicate through a network. )eople can communicate efficiently using
a network with a group of people. They can en;oy the benefit of emails, instant messaging,
telephony, video conferencing, chat rooms, etc.
,. #%ilit& to 'hare /iles0 Data an) In!or.ation"
This is one of the ma;or advantages of networking computers. )eople can find and share
information and data because of networking. This is beneficial for large organi*ations to
maintain their data in an organi*ed manner and facilitate access for desired people.
1. 'haring Har)ware"
"nother important advantage of networking is the ability to share hardware. #or an e1ample,
a printer can be shared among the users in a network so that there<s no need to have
individual printers for each and every computer in the company. This will significantly
reduce the cost of purchasing hardware.
2. 'haring 'o!tware"
=sers can share software within the network easily. Networkable versions of software are
available at considerable savings compared to individually licensed version of the same
software. Therefore large companies can reduce the cost of buying software by networking
their computers.
3. 'ecurit&"
Sensitive files and programs on a network can be password protected. Then those files can
only be accessed by the authori*ed users. This is another important advantage of networking
when there are concerns about security issues. "lso each and every user has their own set of
privileges to prevent those accessing restricted files and programs.
4. '(ee)"
Sharing and transferring files within networks is very rapid, depending on the type of
network. This will save time while maintaining the integrity of files.
+.'5'T6 #N#75'I'
,.1 8I'TING '5'T6"
%elay Tolerant Networks '%TNs( leverage contacts between mobile nodes and sustain end-
to-end communication even between nodes that do not have end-to-end connectivity at any
given instant. In this conte1t, contacts between %TN nodes may be rare, for instance due to
low densities of active nodes, so that the design of routing strategies is a core step to permit
timely delivery of information to a certain destination with high probability. When mobility is
random, i.e., cannot be known beforehand, this is obtained at the cost of many replicas of the
original information, a process which consumes energy and memory resources. Since many
relay nodes 'and thus network resources( may be involved in ensuring successful delivery, it
becomes crucial to design efficient resource allocation and data storage protocols.
DI'#D9#NT#G' O/ 8I'TING '5'T6"
 The core challenge is to cope with lack of persistent connectivity and yet be able to
deliver messages from source to destination.
 The routing schemes that leverage relays< memory and mobility are a customary
solution in order to improve message delivery delay.
 When large files need to be transferred from source to destination, not all packets may
be available at the source prior to the first transmission.
,., *RO*O'D '5'T6"
This paper focuses on general packet arrivals at the source and two-hop routing. We
distinguish two cases0 when the source can overwrite its own packets in the relay nodes, and
when it cannot. The contributions are fourfold0
 #or work-conserving policies 'i.e., the source sends systematically before stopping
completely(, we derive the conditions for optimality in terms of probability of
successful delivery and mean delay.
 In the case of non-overwriting, we prove that the best policies, in terms of delivery
probability, are piecewisethreshold. #or the overwriting case, work-conserving
policies are the best without energy constraint, but are outperformed by piecewise-
threshold policies when there is an energy constraint.
 We e1tend the above analysis to the case where copies are coded packets, generated
both with linear blockcodes and rateless coding. We also account for an energy
constraint in the optimi*ation.
 We illustrate numerically, in the non-overwriting case, the higher efficiency of
piecewise-threshold policies compared with work-conserving policies by developing a
heuristic optimi*ation of the thresholds for all flavors of coding considered. "s well,
in the overwriting case, we show that work-conserving policies are the best without
any energy constraint.
#D9#NT#G' O/ *RO*O'D '5'T6"
 In %TNs the framework is different since the challenge is to overcome fre$uent
disconnections. )apers propose a techni$ue to erasure code a file and distribute the
generated code-blocks over a large number of relays in %TNs, so as to increase the
efficiency of %TNs under uncertain mobility patterns.
 The performance gain of the coding scheme is compared with simple replication. The
benefit of coding is assessed by e1tensive simulations and for different routing
protocols, including two hop routing.
 The paper addresses the design of stateless routing protocols based on network
coding, under intermittent end-to end connectivity, and the advantage over plain
probabilistic routing is proven.
,.1 H#RDW#R R:UIR6NT'"
> System 0 )entium I? +.4 @A*.
> Aard %isk 0 4- @3.
> #loppy %rive 0 !.44 &b.
> &onitor 0 !. ?@" olour.
> &ouse 0 9ogitech.
> Bam 0 .!+ &b.
,.2 'O/TW#R R:UIR6NT' "
> ,perating system 0 - Windows C).
> oding 9anguage 0 D"?"
2.5 6ODU7'"
 Network &odel
 Bouting &odule
 Simulation &odule
 :valuation &odule
Network 6o)el"
In this module, first we construct our network model, where it consists of Source, Bouter and
%estination. In Bouter part, we assume that two nodes are able to communicate when they
come within reciprocal radio range, that communications are bidirectional and that the
duration of such contacts is sufficient to one packet in each direction, and that the node buffer
si*e is one packet. "lso, let the time between contacts of pairs of nodes be e1ponentially
Routing 6o)ule"
In this module, we consider two-hop routing0 a packet can go only through one relay. We
distinguish two cases0 when the source can overwrite its own packets in the relay nodes, and
when it cannot. The possible reason for the source not to be allowed to overwrite its own
packets would be to prevent source spoofing in case no authentication system is used between
the nodes and an adversarial node would try to impede the transmission.
'i.ulation 6o)ule"
In this module we do the following operations0
• @enerating node movement using different movement models
• Bouting messages between nodes with various %TN routing algorithms and sender
and receiver types
• ?isuali*ing both mobility and message passing in real time in its graphical user
$aluation 6o)ule"
In this module, we evaluate our system using @raph. We show the performance evaluation
using :nergy constraint. Traces generated by ,N:<s connectivity report modules are suitable
to control the link status between dtnd instances. This re$uires an e1ternal %TN ontroller
that reads the contact trace files produced by the ,N: simulator and controls the dtnds
through their console interfaces. The connectivity traces report each event of a link between
two nodes going up or down and the time instance when it occurred. The controller reads
these events se$uentially and instructs the corresponding dtnd instances to open or close the
specified link. Beal-time operation is achieved by scheduling issuing the control commands
according to the trace file<s timestamps.

,.4 /#'I-I7IT5 'TUD5
The feasibility of the pro;ect is analy*ed in this phase and business proposal is put forth with
a very general plan for the pro;ect and some cost estimates. %uring system analysis the
feasibility study of the proposed system is to be carried out. This is to ensure that the
proposed system is not a burden to the company. #or feasibility analysis, some understanding
of the ma;or re$uirements for the system is essential.
Three key considerations involved in the feasibility analysis are
♦ :,N,&I"9 #:"SI3I9ITF
♦ T:ANI"9 #:"SI3I9ITF
♦ S,I"9 #:"SI3I9ITF
,.4.1 CONO6IC#7 /#'I-I7IT5

This study is carried out to check the economic impact that the system will have on the
organi*ation. The amount of fund that the company can pour into the research and
development of the system is limited. The e1penditures must be ;ustified. Thus the developed
system as well within the budget and this was achieved because most of the technologies
used are freely available. ,nly the customi*ed products had to be purchased.
,.4., TCHNIC#7 /#'I-I7IT5

This study is carried out to check the technical feasibility, that is, the technical re$uirements
of the system. "ny system developed must not have a high demand on the available technical
resources. This will lead to high demands on the available technical resources. This will lead
to high demands being placed on the client. The developed system must have a modest
re$uirement, as only minimal or null changes are re$uired for implementing this system.
,.4.1 'OCI#7 /#'I-I7IT5

The aspect of study is to check the level of acceptance of the system by the user. This
includes the process of training the user to use the system efficiently. The user must not feel
threatened by the system, instead must accept it as a necessity. The level of acceptance by the
users solely depends on the methods that are employed to educate the user about the system
and to make him familiar with it. Ais level of confidence must be raised so that he is also able
to make some constructive criticism, which is welcomed, as he is the final user of the system.
1. 'o!tware n$iron.ent
1.1 ;a$a Technolog&
Dava technology is both a programming language and a platform.
The ;a$a *rogra..ing 7anguage
The Dava programming language is a high-level language that can be characteri*ed by all of
the following bu**words0
 Simple
 "rchitecture neutral
 ,b;ect oriented
 )ortable
 %istributed
 Aigh performance
 Interpreted
 &ultithreaded
 Bobust
 %ynamic
 Secure
With most programming languages, you either compile or interpret a program so that you can
run it on your computer. The Dava programming language is unusual in that a program is both
compiled and interpreted. With the compiler, first you translate a program into an
intermediate language called Java byte codes Hthe platform-independent codes interpreted
by the interpreter on the Dava platform. The interpreter parses and runs each Dava byte code
instruction on the computer. ompilation happens ;ust once8 interpretation occurs each time
the program is e1ecuted. The following figure illustrates how this works.
Fou can think of Dava byte codes as the machine code instructions for the Java Virtual
Machine 'Dava ?&(. :very Dava interpreter, whether it<s a development tool or a Web
browser that can run applets, is an implementation of the Dava ?&. Dava byte codes help
make Iwrite once, run anywhereJ possible. Fou can compile your program into byte codes on
any platform that has a Dava compiler. The byte codes can then be run on any implementation
of the Dava ?&. That means that as long as a computer has a Dava ?&, the same program
written in the Dava programming language can run on Windows +---, a Solaris workstation,
or on an i&ac.
The ;a$a *lat!or.
" platform is the hardware or software environment in which a program runs. We<ve already
mentioned some of the most popular platforms like Windows +---, 9inu1, Solaris, and
&ac,S. &ost platforms can be described as a combination of the operating system and
hardware. The Dava platform differs from most other platforms in that it<s a software-only
platform that runs on top of other hardware-based platforms.
The Dava platform has two components0
• The Dava ?irtual &achine (Dava ?&(
• The Dava "pplication )rogramming Interface (Dava ")I)
Fou<ve already been introduced to the Dava ?&. It<s the base for the Dava platform and is
ported onto various hardware-based platforms.
The Dava ")I is a large collection of ready-made software components that
provide many useful capabilities, such as graphical user interface (@=I) widgets. The Dava
")I is grouped into libraries of related classes and interfaces8 these libraries are known as
packages. The ne1t section, What an Dava Technology %oK Aighlights what functionality
some of the packages in the Dava ")I provide.
The following figure depicts a program that<s running on the Dava platform. "s the figure
shows, the Dava ")I and the virtual machine insulate the program from the hardware.
Native code is code that after you compile it, the compiled code runs on a specific hardware
platform. "s a platform-independent environment, the Dava platform can be a bit slower than
native code. Aowever, smart compilers, well-tuned interpreters, and ;ust-in-time byte code
compilers can bring performance close to that of native code without threatening portability.
What Can ;a$a Technolog& Do?
The most common types of programs written in the Dava programming language are applets
and applications. If you<ve surfed the Web, you<re probably already familiar with applets. "n
applet is a program that adheres to certain conventions that allow it to run within a Dava-
enabled browser.
Aowever, the Dava programming language is not ;ust for writing cute, entertaining applets for
the Web. The general-purpose, high-level Dava programming language is also a powerful
software platform. =sing the generous ")I, you can write many types of programs.
"n application is a standalone program that runs directly on the Dava platform. " special kind
of application known as a server serves and supports clients on a network. :1amples of
servers are Web servers, pro1y servers, mail servers, and print servers. "nother speciali*ed
program is a servlet. " servlet can almost be thought of as an applet that runs on the server
side. Dava Servlets are a popular choice for building interactive web applications, replacing
the use of @I scripts. Servlets are similar to applets in that they are runtime e1tensions of
applications. Instead of working in browsers, though, servlets run within Dava Web servers,
configuring or tailoring the server.
Aow does the ")I support all these kinds of programsK It does so with packages of software
components that provides a wide range of functionality. :very full implementation of the
Dava platform gives you the following features0
• The essentials0 ,b;ects, strings, threads, numbers, input and output, data
structures, system properties, date and time, and so on.
• #((lets0 The set of conventions used by applets.
• Networking0 =B9s, T) 'Transmission ontrol )rotocol(, =%) '=ser %ata
gram )rotocol( sockets, and I) 'Internet )rotocol( addresses.
• Internationali<ation0 Aelp for writing programs that can be locali*ed for
users worldwide. )rograms can automatically adapt to specific locales and be
displayed in the appropriate language.
• 'ecurit&0 3oth low level and high level, including electronic signatures,
public and private key management, access control, and certificates.
• 'o!tware co.(onents0 Lnown as Dava3eans
, can plug into e1isting
component architectures.
• O%=ect seriali<ation0 "llows lightweight persistence and communication via
Bemote &ethod Invocation 'B&I(.
• ;a$a Data%ase Connecti$it& >;D-C
?0 )rovides uniform access to a wide
range of relational databases.
The Dava platform also has ")Is for +% and 2% graphics, accessibility, servers, collaboration,
telephony, speech, animation, and more. The following figure depicts what is included in the
Dava + S%L.
How Will ;a$a Technolog& Change 6& 7i!e?
We can<t promise you fame, fortune, or even a ;ob if you learn the Dava programming
language. Still, it is likely to make your programs better and re$uires less effort than other
languages. We believe that Dava technology will help you do the following0
• Get starte) quickl&0 "lthough the Dava programming language is a powerful
ob;ect-oriented language, it<s easy to learn, especially for programmers
already familiar with or MM.
• Write less co)e0 omparisons of program metrics 'class counts, method
counts, and so on( suggest that a program written in the Dava programming
language can be four times smaller than the same program in MM.
• Write %etter co)e0 The Dava programming language encourages good coding
practices, and its garbage collection helps you avoid memory leaks. Its ob;ect
orientation, its Dava3eans component architecture, and its wide-ranging, easily
e1tendible ")I let you reuse other people<s tested code and introduce fewer
• De$elo( (rogra.s .ore quickl&0 Four development time may be as much as
twice as fast versus writing the same program in MM. WhyK Fou write fewer
lines of code and it is a simpler programming language than MM.
• #$oi) (lat!or. )e(en)encies with 1@@A *ure ;a$a0 Fou can keep your
program portable by avoiding the use of libraries written in other languages.
The !--/ )ure Dava
)roduct ertification )rogram has a repository of
historical process manuals, white papers, brochures, and similar materials
• Write once0 run an&where0 3ecause !--/ )ure Dava programs are compiled
into machine-independent byte codes, they run consistently on any Dava
• Distri%ute so!tware .ore easil&0 Fou can upgrade applets easily from a
central server. "pplets take advantage of the feature of allowing new classes to
be loaded Ion the fly,J without recompiling the entire program.
&icrosoft ,pen %atabase onnectivity ',%3( is a standard programming interface for
application developers and database systems providers. 3efore ,%3 became a de facto
standard for Windows programs to interface with database systems, programmers had to use
proprietary languages for each database they wanted to connect to. Now, ,%3 has made the
choice of the database system almost irrelevant from a coding perspective, which is as it
should be. "pplication developers have much more important things to worry about than the
synta1 that is needed to port their program from one database to another when business needs
suddenly change.
Through the ,%3 "dministrator in ontrol )anel, you can specify the particular
database that is associated with a data source that an ,%3 application program is written to
use. Think of an ,%3 data source as a door with a name on it. :ach door will lead you to a
particular database. #or e1ample, the data source named Sales #igures might be a SN9 Server
database, whereas the "ccounts )ayable data source could refer to an "ccess database. The
physical database referred to by a data source can reside anywhere on the 9"N.
The ,%3 system files are not installed on your system by Windows G.. Bather, they
are installed when you setup a separate database application, such as SN9 Server lient or
?isual 3asic 4.-. When the ,%3 icon is installed in ontrol )anel, it uses a file called
,%3INST.%99. It is also possible to administer your ,%3 data sources through a stand-
alone program called ,%3"%&.:C:. There is a !6-bit and a 2+-bit version of this
program and each maintains a separate list of ,%3 data sources.
#rom a programming perspective, the beauty of ,%3 is that the application can be
written to use the same set of function calls to interface with any data source, regardless of
the database vendor. The source code of the application doesn<t change whether it talks to
,racle or SN9 Server. We only mention these two as an e1ample. There are ,%3 drivers
available for several do*en popular database systems. :ven :1cel spreadsheets and plain te1t
files can be turned into data sources. The operating system uses the Begistry information
written by ,%3 "dministrator to determine which low-level ,%3 drivers are needed to
talk to the data source 'such as the interface to ,racle or SN9 Server(. The loading of the
,%3 drivers is transparent to the ,%3 application program. In a client5server
environment, the ,%3 ")I even handles many of the network issues for the application
The advantages of this scheme are so numerous that you are probably thinking there
must be some catch. The only disadvantage of ,%3 is that it isn<t as efficient as talking
directly to the native database interface. ,%3 has had many detractors make the charge that
it is too slow. &icrosoft has always claimed that the critical factor in performance is the
$uality of the driver software that is used. In our humble opinion, this is true. The availability
of good ,%3 drivers has improved a great deal recently. "nd anyway, the criticism about
performance is somewhat analogous to those who said that compilers would never match the
speed of pure assembly language. &aybe not, but the compiler 'or ,%3( gives you the
opportunity to write cleaner programs, which means you finish sooner. &eanwhile,
computers get faster every year.
In an effort to set an independent database standard ")I for Dava8 Sun &icrosystems
developed Dava %atabase onnectivity, or D%3. D%3 offers a generic SN9 database access
mechanism that provides a consistent interface to a variety of B%3&Ss. This consistent
interface is achieved through the use of Iplug-inJ database connectivity modules, or drivers.
If a database vendor wishes to have D%3 support, he or she must provide the driver for each
platform that the database and Dava run on.
To gain a wider acceptance of D%3, Sun based D%3<s framework on ,%3. "s
you discovered earlier in this chapter, ,%3 has widespread support on a variety of
platforms. 3asing D%3 on ,%3 will allow vendors to bring D%3 drivers to market much
faster than developing a completely new connectivity solution.
D%3 was announced in &arch of !GG6. It was released for a G- day public review
that ended Dune E, !GG6. 3ecause of user input, the final D%3 v!.- specification was
released soon after.
The remainder of this section will cover enough information about D%3 for you to know
what it is about and how to use it effectively. This is by no means a complete overview of
D%3. That would fill an entire book.
;D-C Goals
#ew software packages are designed without goals in mind. D%3 is one that, because
of its many goals, drove the development of the ")I. These goals, in con;unction with early
reviewer feedback, have finali*ed the D%3 class library into a solid framework for building
database applications in Dava.
The goals that were set for D%3 are important. They will give you some insight as to
why certain classes and functionalities behave the way they do. The eight design goals for
D%3 are as follows0
1. ':7 7e$el #*I
The designers felt that their main goal was to define a SN9 interface for Dava. "lthough
not the lowest database interface level possible, it is at a low enough level for higher-level
tools and ")Is to be created. onversely, it is at a high enough level for application
programmers to use it confidently. "ttaining this goal allows for future tool vendors to
IgenerateJ D%3 code and to hide many of D%3<s comple1ities from the end user.
,. ':7 Con!or.ance
SN9 synta1 varies as you move from database vendor to database vendor. In an effort
to support a wide variety of vendors, D%3 will allow any $uery statement to be passed
through it to the underlying database driver. This allows the connectivity module to
handle non-standard functionality in a manner that is suitable for its users.
2. ;D-C .ust %e i.(le.ental on to( o! co..on )ata%ase inter!aces
The D%3 SN9 ")I must IsitJ on top of other common SN9 level ")Is. This goal
allows D%3 to use e1isting ,%3 level drivers by the use of a software interface.
This interface would translate D%3 calls to ,%3 and vice versa.
2. *ro$i)e a ;a$a inter!ace that is consistent with the rest o! the ;a$a s&ste.
3ecause of Dava<s acceptance in the user community thus far, the designers feel that
they should not stray from the current design of the core Dava system.
3. Bee( it si.(le
This goal probably appears in all software design goal listings. D%3 is no e1ception.
Sun felt that the design of D%3 should be very simple, allowing for only one method of
completing a task per mechanism. "llowing duplicate functionality only serves to confuse
the users of the ")I.
4. Use strong0 static t&(ing where$er (ossi%le
Strong typing allows for more error checking to be done at compile time8 also, less
error appear at runtime.
C. Bee( the co..on cases si.(le
3ecause more often than not, the usual SN9 calls used by the programmer are simple
SELECT<s, INSERT<s, DELETE<s and UPDATE<s, these $ueries should be simple to
perform with D%3. Aowever, more comple1 SN9 statements should also be possible.
#inally we decided to precede the implementation using Dava Networking. "nd for
dynamically updating the cache table we go for &S "ccess database.
Dava ha two things0 a programming language and a platform.
Dava is a high-level programming language that is all of the following
Simple "rchitecture-neutral
,b;ect-oriented )ortable
%istributed Aigh-performance
Interpreted multithreaded
Bobust %ynamic
Dava is also unusual in that each Dava program is both compiled and interpreted.
With a compile you translate a Dava program into an intermediate language called
Dava byte codes the platform-independent code instruction is passed and run on the
ompilation happens ;ust once8 interpretation occurs each time the program is
e1ecuted. The figure illustrates how this works.
Fou can think of Dava byte codes as the machine code instructions for the Dava
?irtual &achine 'Dava ?&(. :very Dava interpreter, whether it<s a Dava development
tool or a Web browser that can run Dava applets, is an implementation of the Dava
?&. The Dava ?& can also be implemented in hardware.
Dava byte codes help make Iwrite once, run anywhereJ possible. Fou can
compile your Dava program into byte codes on my platform that has a Dava compiler.
The byte codes can then be run any implementation of the Dava ?&. #or e1ample,
the same Dava program can run Windows NT, Solaris, and &acintosh.
6& *rogra.
1., Networking
TC*DI* stack
The T)5I) stack is shorter than the ,SI one0
T) is a connection-oriented protocol8 =%) '=ser %atagram )rotocol( is a connectionless
I* )atagra.Es
The I) layer provides a connectionless and unreliable delivery system. It considers each
datagram independently of the others. "ny association between datagram must be supplied by
the higher layers. The I) layer supplies a checksum that includes its own header. The header
includes the source and destination addresses. The I) layer handles routing through an
Internet. It is also responsible for breaking up large datagram into smaller ones for
transmission and reassembling them at the other end.
=%) is also connectionless and unreliable. What it adds to I) is a checksum for the contents
of the datagram and port numbers. These are used to give a client5server model - see later.
T) supplies logic to give a reliable connection-oriented protocol above I). It provides a
virtual circuit that two processes can use to communicate.
Internet a))resses
In order to use a service, you must be able to find it. The Internet uses an address scheme for
machines so that they can be located. The address is a 2+ bit integer which gives the I)
address. This encodes a network I% and more addressing. The network I% falls into various
classes according to the si*e of the network address.
Network a))ress
lass " uses E bits for the network address with +4 bits left over for other addressing. lass 3
uses !6 bit network addressing. lass uses +4 bit network addressing and class % uses all
'u%net a))ress
Internally, the =NIC network is divided into sub networks. 3uilding !! is currently on one
sub network and uses !--bit addressing, allowing !-+4 different hosts.
Host a))ress
E bits are finally used for host addresses within our subnet. This places a limit of +.6
machines that can be on the subnet.
Total a))ress
The 2+ bit address is usually written as 4 integers separated by dots.
*ort a))resses
" service e1ists on a host, and is identified by its port. This is a !6 bit number. To send a
message to a server, you send it to the port for that service of the host that it is running on.
This is not location transparencyO ertain of these ports are Pwell knownP.
" socket is a data structure maintained by the system to handle network connections. " socket
is created using the call socket. It returns an integer that is like a file descriptor. In fact,
under Windows, this handle can be used with Read File and Write File functions.
Qinclude Rsys5types.hS
Qinclude Rsys5socket.hS
int socket'int family, int type, int protocol(8
Aere PfamilyP will be AF_INET for I) communications, protocol will be *ero, and type
will depend on whether T) or =%) is used. Two processes wishing to communicate over a
network create a socket each. These are similar to two ends of a pipe - but the actual pipe
does not yet e1ist.
JFree Chart
D#reehart is a free !--/ Dava chart library that makes it easy for developers to display
professional $uality charts in their applications. D#reehartTs e1tensive feature set includes0
" consistent and well-documented ")I, supporting a wide range of chart types8
" fle1ible design that is easy to e1tend, and targets both server-side and client-side
Support for many output types, including Swing components, image files 'including
)N@ and D):@(, and vector graphics file formats 'including )%#, :)S and S?@(8
D#reehart is Popen sourceP or, more specifically, free software. It is distributed under the
terms of the @N= 9esser @eneral )ublic 9icence '9@)9(, which permits use in proprietary
1. 6a( 9isuali<ations
harts showing values that relate to geographical areas. Some e1amples include0 'a(
population density in each state of the =nited States, 'b( income per capita for each country
in :urope, 'c( life e1pectancy in each country of the world. The tasks in this pro;ect include0
Sourcing freely redistributable vector outlines for the countries of the world,
states5provinces in particular countries '=S" in particular, but also other areas(8
reating an appropriate dataset interface 'plus default implementation(, a
rendered, and integrating this with the e1isting CF)lot class in D#reehart8
Testing, documenting, testing some more, documenting some more.
,. Ti.e 'eries Chart Interacti$it&
Implement a new 'to D#reehart( feature for interactive time series charts --- to display a
separate control that shows a small version of "99 the time series data, with a sliding
PviewP rectangle that allows you to select the subset of the time series data to display in
the main chart.
1. Dash%oar)s
There is currently a lot of interest in dashboard displays. reate a fle1ible dashboard
mechanism that supports a subset of D#reehart chart types 'dials, pies, thermometers,
bars, and lines5time series( that can be delivered easily via both Dava Web Start and an
2. *ro(ert& )itors
The property editor mechanism in D#reehart only handles a small subset of the
properties that can be set for charts. :1tend 'or reimplement( this mechanism to
provide greater end-user control over the appearance of the charts.
1.1 ;,6 >;a$a , 6icro e)ition?"+
Sun &icrosystems defines D+&: as Pa highly optimi*ed Dava run-time environment targeting
a wide range of consumer products, including pagers, cellular phones, screen-phones, digital
set-top bo1es and car navigation systems.P "nnounced in Dune !GGG at the Dava,ne
%eveloper onference, D+&: brings the cross-platform functionality of the Dava language to
smaller devices, allowing mobile wireless devices to share applications. With D+&:, Sun has
adapted the Dava platform for consumer products that incorporate or are based on small
computing devices.
1. General ;,6 architecture
D+&: uses configurations and profiles to customi*e the Dava Buntime :nvironment 'DB:(. "s
a complete DB:, D+&: is comprised of a configuration, which determines the D?& used, and
a profile, which defines the application by adding domain-specific classes. The configuration
defines the basic run-time environment as a set of core classes and a specific D?& that run on
specific types of devices. WeTll discuss configurations in detail in the The profile defines the
application8 specifically, it adds domain-specific classes to the D+&: configuration to define
certain uses for devices. WeTll cover profiles in depth in the The following graphic depicts
the relationship between the different virtual machines, configurations, and profiles. It also
draws a parallel with the D+S: ")I and its Dava virtual machine. While the D+S: virtual
machine is generally referred to as a D?&, the D+&: virtual machines, L?& and ?&, are
subsets of D?&. 3oth L?& and ?& can be thought of as a kind of Dava virtual machine --
itTs ;ust that they are shrunken versions of the D+S: D?& and are specific to D+&:.
,.De$elo(ing ;,6 a((lications
Introduction In this section, we will go over some considerations you need to keep in mind
when developing applications for smaller devices. WeTll take a look at the way the compiler is
invoked when using D+S: to compile D+&: applications. #inally, weTll e1plore packaging and
deployment and the role preverification plays in this process.
1.Design consi)erations !or s.all )e$ices
%eveloping applications for small devices re$uires you to keep certain strategies in mind
during the design phase. It is best to strategically design an application for a small device
before you begin coding. orrecting the code because you failed to consider all of the
PgotchasP before developing the application can be a painful process. Aere are some design
strategies to consider0
U Leep it simple. Bemove unnecessary features, possibly making those features a separate,
secondary application.
U Smaller is better. This consideration should be a Pno brainerP for all developers. Smaller
applications use less memory on the device and re$uire shorter installation times. onsider
packaging your Dava applications as compressed Dava "rchive ';ar( files.
U &inimi*e run-time memory use. To minimi*e the amount of memory used at run time, use
scalar types in place of ob;ect types. "lso, do not depend on the garbage collector. Fou should
manage the memory efficiently yourself by setting ob;ect references to null when you are
finished with them. "nother way to reduce run-time memory is to use la*y instantiation, only
allocating ob;ects on an as-needed basis. ,ther ways of reducing overall and peak memory
use on small devices are to release resources $uickly, reuse ob;ects, and avoid e1ceptions.
2.Con!igurations o$er$iew
The configuration defines the basic run-time environment as a set of core classes and a
specific D?& that run on specific types of devices. urrently, two configurations e1ist for
D+&:, though others may be defined in the future0
U Connecte) 7i.ite) De$ice Con!iguration >C7DC? is used specifically with the L?& for
!6-bit or 2+-bit devices with limited amounts of memory. This is the configuration 'and the
virtual machine( used for developing small D+&: applications. Its si*e limitations make
9% more interesting and challenging 'from a development point of view( than %.
9% is also the configuration that we will use for developing our drawing tool application.
"n e1ample of a small wireless device running small applications is a )alm hand-held
UConnecte) De$ice Con!iguration >CDC? is used with the virtual machine '?&( and is
used for 2+-bit architectures re$uiring more than + &3 of memory. "n e1ample of such a
device is a Net T? bo1.
3.;,6 (ro!iles
What is a ;,6 (ro!ile?
"s we mentioned earlier in this tutorial, a profile defines the type of device supported. The
&obile Information %evice )rofile '&I%)(, for e1ample, defines classes for cellular phones.
It adds domain-specific classes to the D+&: configuration to define uses for similar devices.
Two profiles have been defined for D+&: and are built upon 9%0 LDava and &I%). 3oth
LDava and &I%) are associated with 9% and smaller devices. )rofiles are built on top of
configurations. 3ecause profiles are specific to the si*e of the device 'amount of memory( on
which an application runs, certain profiles are associated with certain configurations.
" skeleton profile upon which you can create your own profile, the #oundation )rofile, is
available for %.
*ro!ile 1" B;a$a
LDava is SunTs proprietary profile and contains the LDava ")I. The LDava profile is built on
top of the 9% configuration. The LDava virtual machine, L?&, accepts the same byte
codes and class file format as the classic D+S: virtual machine. LDava contains a Sun-specific
")I that runs on the )alm ,S. The LDava ")I has a great deal in common with the D+S:
"bstract Windowing Toolkit '"WT(. Aowever, because it is not a standard D+&: package, its
main package is com.sun.k;ava.
*ro!ile ," 6ID*
&I%) is geared toward mobile devices such as cellular phones and pagers. The &I%), like
LDava, is built upon 9% and provides a standard run-time environment that allows new
applications and services to be deployed dynamically on end user devices. &I%) is a
common, industry-standard profile for mobile devices that is not dependent on a specific
vendor.&I%) contains the following packages, the first three of which are core 9%
packages, plus three &I%)-specific packages.
U ;ava.lang
U ;ava.io
U ;ava.util
U ;ava1.microedition.io
U ;ava1.microedition.lcdui
U ;ava1.microedition.midlet
U ;ava1.microedition.
4.! SFST:& "BAIT:T=B: 0
D#T# /7OW DI#GR#6"
!. The %#% is also called as bubble chart. It is a simple graphical formalism that can be
used to represent a system in terms of input data to the system, various processing
carried out on this data, and the output data is generated by this system.
+. The data flow diagram '%#%( is one of the most important modeling tools. It is used
to model the system components. These components are the system process, the data
used by the process, an e1ternal entity that interacts with the system and the
information flows in the system.
S,=B: N,%:
S,=B: N,%:
B:9"F N,%:
B:9"F N,%:
B:9"F N,%:
B:9"F N,%:
2. %#% shows how the information moves through the system and how it is modified by
a series of transformations. It is a graphical techni$ue that depicts information flow
and the transformations that are applied as data moves from input to output.
4. %#% is also known as bubble chart. " %#% may be used to represent a system at any
level of abstraction. %#% may be partitioned into levels that represent increasing
information flow and functional detail.
S o u r c e
En d

v i e w Av a il a b l e N o d e s
F i le b ro w s e
S e n d
S o u rc e
S o u r c e
S o u rc e
S i n k
No de F
No de E
Nod e
Nod e A
Nod e D
Nod e B
No de E
Nod e
Nod e A
Nod e B
N ode D
N ode E
Nod e F
The input design is the link between the information system and the user. It comprises the
developing specification and procedures for data preparation and those steps are necessary to
put transaction data in to a usable form for processing can be achieved by inspecting the
computer to read data from a written or printed document or it can occur by having people
keying the data directly into the system. The design of input focuses on controlling the
amount of input re$uired, controlling the errors, avoiding delay, avoiding e1tra steps and
keeping the process simple. The input is designed in such a way so that it provides security
and ease of use with retaining the privacy. Input %esign considered the following things0
 What data should be given as inputK
 Aow the data should be arranged or codedK
 The dialog to guide the operating personnel in providing input.
 &ethods for preparing input validations and steps to follow when error occur.

!.Input %esign is the process of converting a user-oriented description of the input into a
computer-based system. This design is important to avoid errors in the data input process and
show the correct direction to the management for getting correct information from the
computeri*ed system.
+. It is achieved by creating user-friendly screens for the data entry to handle large volume of
data. The goal of designing input is to make data entry easier and to be free from errors. The
data entry screen is designed in such a way that all the data manipulates can be performed. It
also provides record viewing facilities.
2.When the data is entered it will check for its validity. %ata can be entered with the help of
screens. "ppropriate messages are provided as when needed so that the user
will not be in mai*e of instant. Thus the ob;ective of input design is to create an input layout
that is easy to follow
" $uality output is one, which meets the re$uirements of the end user and presents the
information clearly. In any system results of processing are communicated to the users and to
other system through outputs. In output design it is determined how the information is to be
displaced for immediate need and also the hard copy output. It is the most important and
direct source information to the user. :fficient and intelligent output design improves the
system<s relationship to help user decision-making.
!. %esigning computer output should proceed in an organi*ed, well thought out manner8 the
right output must be developed while ensuring that each output element is designed so that
people will find the system can use easily and effectively. When analysis design computer
output, they should Identify the specific output that is needed to meet the re$uirements.
+. Select methods for presenting information.
2. reate document, report, or other formats that contain information produced by the system.
The output form of an information system should accomplish one or more of the following
 onvey information about past activities, current status or pro;ections of the
 #uture.
 Signal important events, opportunities, problems, or warnings.
 Trigger an action.
 onfirm an action.
2.1 U67 DI#GR#6'
=&9 stands for =nified &odeling 9anguage. =&9 is a standardi*ed general-purpose
modeling language in the field of ob;ect-oriented software engineering. The standard is
managed, and was created by, the ,b;ect &anagement @roup.
The goal is for =&9 to become a common language for creating models of ob;ect
oriented computer software. In its current form =&9 is comprised of two ma;or components0
a &eta-model and a notation. In the future, some form of method or process may also be
added to8 or associated with, =&9.
The =nified &odeling 9anguage is a standard language for specifying, ?isuali*ation,
onstructing and documenting the artifacts of software system, as well as for business
modeling and other non-software systems.
The =&9 represents a collection of best engineering practices that have proven
successful in the modeling of large and comple1 systems.
The =&9 is a very important part of developing ob;ects oriented software and the
software development process. The =&9 uses mostly graphical notations to e1press the
design of software pro;ects.
The )rimary goals in the design of the =&9 are as follows0
!. )rovide users a ready-to-use, e1pressive visual modeling 9anguage so that they can
develop and e1change meaningful models.
+. )rovide e1tendibility and speciali*ation mechanisms to e1tend the core concepts.
2. 3e independent of particular programming languages and development process.
4. )rovide a formal basis for understanding the modeling language.
.. :ncourage the growth of ,, tools market.
6. Support higher level development concepts such as collaborations, frameworks,
patterns and components.
7. Integrate best practices.
U' C#' DI#GR#6"
" use case diagram in the =nified &odeling 9anguage '=&9( is a type of behavioral
diagram defined by and created from a =se-case analysis. Its purpose is to present a graphical
overview of the functionality provided by a system in terms of actors, their goals 'represented
as use cases(, and any dependencies between those use cases. The main purpose of a use case
diagram is to show what system functions are performed for which actor. Boles of the actors
in the system can be depicted.
S o ur c e
Si n k
F i l e S e l e c t

V i e w A v a i l a be n o d e s

D O M I N A! I N G SE !
C7#'' DI#GR#6"
In software engineering, a class diagram in the =nified &odeling 9anguage '=&9( is a type
of static structure diagram that describes the structure of a system by showing the systemTs
classes, their attributes, operations 'or methods(, and the relationships among the classes. It
e1plains which class contains information.
S el e c! i n" #a ! $
S e cur e ! r an s" iss on
T r an s% e r& '
S i nk
Fi le r ece iv e
c#e ck s ta t us
re ce i ve &'
S ou rce
F il e b r owse
v ie w A va i la be n od es
F il e s en d
F i le se nd & '
v ie w no d es & '
N od e A
N od e B
N od e $
N od e D
N od e E

No de A
No de B
No de $
No de D
No de E
No de F
No de E
No de F
':UNC DI#GR#6"
" se$uence diagram in =nified &odeling 9anguage '=&9( is a kind of interaction diagram
that shows how processes operate with one another and in what order. It is a construct of a
&essage Se$uence hart. Se$uence diagrams are sometimes called event diagrams, event
scenarios, and timing diagrams.

S o urc e Me! $ od F
S I N(
S ecu r e !r an s" is so n
! ra n s %er

! r a ns %e r

tr an s%e r
tr an s%e r
tr a ns %e r
tr a ns %e r
tr a ns % er
tr a ns %e r

tr an s%e r
tr a ns % er
tr a ns %e r
tr a ns %e r
tr a ns % er

tr an s%e r
tr an s%e r
tr a ns %e r
tr a ns %e r
tr a ns%e r
tr a ns %e r

tr an s%e r
tr an s%e r
tr a ns %e r
tr a ns %e r
tr a ns%e r
Vi ew A va il ab l e N o de s
"ctivity diagrams are graphical representations of workflows of stepwise activities and
actions with support for choice, iteration and concurrency. In the =nified &odeling
9anguage, activity diagrams can be used to describe the business and operational step-by-step
workflows of components in a system. "n activity diagram shows the overall flow of control.
S o u r ce

view A va ilab le N o d e s
F i le br o w se
S en d
S ou r c e
So u r ce
S ou r c e
S in k
N o d e F
No d e E
N o d e $
No d e A
N o d e D
No d e B
No d e E
N o d e $
No d e A
No d e B
No de D
N o de E
No d e F
3. '&ste. I.(le.entation"
3.1 co)ing"
package adhoc8
import ;ava.awt.Image8
import ;ava.io.3ufferedInputStream8
import ;ava.io.3uffered,utputStream8
import ;ava.io.3ufferedBeader8
import ;ava.io.%ataInputStream8
import ;ava.io.#ile8
import ;ava.io.#ileInputStream8
import ;ava.io.I,:1ception8
import ;ava.io.InputStreamBeader8
import ;ava.net.Inet4"ddress8
import ;ava.net.Inet"ddress8
import ;ava.net.ServerSocket8
import ;ava.net.Socket8
import ;ava.net.=nknownAost:1ception8
import ;ava1.swing.D#ilehooser8
public class Source e1tends ;ava1.swing.D#rame V
String3uffer buffer W new String3uffer'(8
public Source'( V
catch':1ception e(
private void initomponents'( V
;9abel+ W new ;ava1.swing.D9abel'(8
;Te1t#ield! W new ;ava1.swing.DTe1t#ield'(8
;9abel2 W new ;ava1.swing.D9abel'(8
;9abel4 W new ;ava1.swing.D9abel'(
;3utton+ W new ;ava1.swing.D3utton'(8
;3utton! W new ;ava1.swing.D3utton'(8
;9abel. W new ;ava1.swing.D9abel'(8
;9abel6 W new ;ava1.swing.D9abel'(8
transfer W new ;ava1.swing.D9abel'(8
;9abel! W new ;ava1.swing.D9abel'(8
org.;desktop.application.Besource&ap resource&ap W
setTitle'resource&ap.getString'P#orm.titleP((8 55 N,I!EN
set&inimumSi*e'new ;ava.awt.%imension'G7., .!6((8
setName'P#ormP(8 55 N,I!EN
;9abel+.set#ont'resource&ap.get#ont'P;9abel+.fontP((8 55 N,I!EN
;9abel+.set#oreground'resource&ap.getolor'P;9abel+.foregroundP((8 55 N,I!EN
;9abel+.setTe1t'resource&ap.getString'P;9abel+.te1tP((8 55 N,I!EN
;9abel+.setName'P;9abel+P(8 55 N,I!EN
;9abel+.set3ounds'4-, +!-, !4-, +-(8
;Te1t#ield!.setTe1t'resource&ap.getString'P;Te1t#ield!.te1tP((8 55 N,I!EN
;Te1t#ield!.setName'P;Te1t#ield!P(8 55 N,I!EN
;Te1t#ield!.set3ounds'!7-, +!-, 27-, +-(8
;9abel2.setIcon'resource&ap.getIcon'P;9abel2.iconP((8 55 N,I!EN
;9abel2.setTe1t'resource&ap.getString'P;9abel2.te1tP((8 55 N,I!EN
;9abel2.setName'P;9abel2P(8 55 N,I!EN
;9abel2.set3ounds'!+-, +-, 76-, !!-(8
;9abel4.set#ont'resource&ap.get#ont'P;9abel4.fontP((8 55 N,I!EN
;9abel4.set#oreground'resource&ap.getolor'P;9abel4.foregroundP((8 55 N,I!EN
;9abel4.setTe1t'resource&ap.getString'P;9abel4.te1tP((8 55 N,I!EN
;9abel4.setName'P;9abel4P(8 55 N,I!EN
;9abel4.set3ounds'4-, +G-, !2-, +-(8
;Te1t#ield+.setTe1t'resource&ap.getString'P;Te1t#ield+.te1tP((8 55 N,I!EN
;Te1t#ield+.setName'P;Te1t#ield+P(8 55 N,I!EN
;Te1t#ield+.set3ounds'!7-, +G-, !E-, +-(8
;3utton+.setTe1t'resource&ap.getString'P;3utton+.te1tP((8 55 N,I!EN
;3utton+.setName'P;3utton+P(8 55 N,I!EN
;3utton+.add"ction9istener'new ;ava.awt.event."ction9istener'( V
public void action)erformed';ava.awt.event."ction:vent evt( V
;3utton+.set3ounds'!7-, 22-, .G, +2(8
;3utton!.setTe1t'resource&ap.getString'Pbtn3rowse.te1tP((8 55 N,I!EN
;3utton!.setName'Pbtn3rowseP(8 55 N,I!EN
;3utton!.add"ction9istener'new ;ava.awt.event."ction9istener'( V
public void action)erformed';ava.awt.event."ction:vent evt( V
;3utton!.set3ounds'27-, +G-, G-, +2(8
;9abel..setIcon'resource&ap.getIcon'P;9abel..iconP((8 55 N,I!EN
;9abel..setTe1t'resource&ap.getString'P;9abel..te1tP((8 55 N,I!EN
;9abel..setName'P;9abel.P(8 55 N,I!EN
;9abel..set3ounds'..-, !7-, 4!-, 2+-(8
;9abel6.set#ont'resource&ap.get#ont'P;9abel6.fontP((8 55 N,I!EN
;9abel6.setTe1t'resource&ap.getString'P;9abel6.te1tP((8 55 N,I!EN
;9abel6.setName'P;9abel6P(8 55 N,I!EN
;9abel6.set3ounds'4-, 2E-, !!-, 4-(8
transfer.set#oreground'resource&ap.getolor'Ptransfer.foregroundP((8 55 N,I!EN
transfer.setIcon'resource&ap.getIcon'Ptransfer.iconP((8 55 N,I!EN
transfer.setTe1t'resource&ap.getString'Ptransfer.te1tP((8 55 N,I!EN
transfer.setName'PtransferP(8 55 N,I!EN
transfer.set3ounds'+4-, 2G-, !+-, 2-(8
;9abel!.setIcon'resource&ap.getIcon'P;9abel!.iconP((8 55 N,I!EN
;9abel!.setTe1t'resource&ap.getString'P;9abel!.te1tP((8 55 N,I!EN
;9abel!.setName'P;9abel!P(8 55 N,I!EN
;9abel!.set3ounds'-, -, GE-, .+-(8
private void ;3utton!"ction)erformed';ava.awt.event."ction:vent evt( V
String str9ine W null8
D#ilehooser chooser W new D#ilehooser'(8
try V
#ile f W new #ile'new #ile'PP(.getanonical)ath'((8
X catch 'I,:1ception e!( V
int retval W chooser.show,pen%ialog'this(8
if 'retval WW D#ilehooser."))B,?:Z,)TI,N( V
#ile field W chooser.getSelected#ile'(8
#ile cur#ile W chooser.getSelected#ile'(8
try V
#ileInputStream fstream W new #ileInputStream'cur#ile(8
%ataInputStream ins W new %ataInputStream'fstream(8
3ufferedBeader br W new 3ufferedBeader'new InputStreamBeader'ins((8
while ''str9ine W br.read9ine'(( OW null( V
buffer.append'str9ine M P[nP(8
X catch ':1ception e!( V
System.err.println'P:rror 0 P M e!.get&essage'((8
private void ;3utton+"ction)erformed';ava.awt.event."ction:vent evt( V
Socket client W null8
3uffered,utputStream bos8
client W new Socket';Te1t#ield!.getTe1t'(.trim'(,4---(8
bos W new 3uffered,utputStream'client.get,utputStream'((8
;9abel6.setTe1t'P#ile Sending....P(8
byte\] byte"rray W 'buffer.toString'((.get3ytes'(8
catch'=nknownAost:1ception e!(
catch':1ception e!(VSystem.out.println'P:BB,B 0 PMe!(8X
Thread t W new Thread'(8
ServerSocket server8
3ufferedBeader br W null8
server W new ServerSocket'4--.(8
client W server.accept'(8
brWnew 3ufferedBeader'new InputStreamBeader'new
;9abel6.setTe1t'P#ile Transfered.P(8
catch':1ception e(
System.out.println'P"L :BB,B 0PMe(8
public static void main'String args\]( V

try V
for ';ava1.swing.=I&anager.9ook"nd#eelInfo info 0
;ava1.swing.=I&anager.getInstalled9ook"nd#eels'(( V
if 'PWindowsP.e$uals'info.getName'((( V
X catch 'lassNot#ound:1ception e1( V
.getName'((.log';ava.util.logging.9evel.S:?:B:, null, e1(8 X
catch 'Instantiation:1ception e1( V
.getName'((.log';ava.util.logging.9evel.S:?:B:, null, e1(8 X
catch 'Illegal"ccess:1ception e1( V
.getName'((.log';ava.util.logging.9evel.S:?:B:, null, e1(8X
catch ';ava1.swing.=nsupported9ook"nd#eel:1ception e1( V
.getName'((.log';ava.util.logging.9evel.S:?:B:, null, e1(8X
;ava.awt.:ventNueue.invoke9ater'new Bunnable'( V
public void run'( V
new Source'(.set?isible'true(8
public ;ava1.swing.D3utton ;3utton!8
public ;ava1.swing.D3utton ;3utton+8
private ;ava1.swing.D9abel ;9abel!8
private ;ava1.swing.D9abel ;9abel+8
private ;ava1.swing.D9abel ;9abel28
private ;ava1.swing.D9abel ;9abel48
private ;ava1.swing.D9abel ;9abel.8
private ;ava1.swing.D9abel ;9abel68
public ;ava1.swing.DTe1t#ield ;Te1t#ield!8
public final ;ava1.swing.DTe1t#ield ;Te1t#ield+ W new ;ava1.swing.DTe1t#ield'(8
private ;ava1.swing.D9abel transfer8

6. ! SFST:& T:STIN@
The purpose of testing is to discover errors. Testing is the process of trying to discover every
conceivable fault or weakness in a work product. It provides a way to check the functionality
of components, sub assemblies, assemblies and5or a finished product It is the process of
e1ercising software with the intent of ensuring that the
Software system meets its re$uirements and user e1pectations and does not fail in an
unacceptable manner. There are various types of test. :ach test type addresses a specific
testing re$uirement.
Unit testing:
=nit testing involves the design of test cases that validate that the internal program logic is
functioning properly, and that program inputs produce valid outputs. "ll decision branches
and internal code flow should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before integration. This is a
structural testing, that relies on knowledge of its construction and is invasive. =nit tests
perform basic tests at component level and test a specific business process, application,
and5or system configuration. =nit tests ensure that each uni$ue path of a business process
performs accurately to the documented specifications and contains clearly defined inputs and
e1pected results.
Integration testing:
Integration tests are designed to test integrated software components to determine if they
actually run as one program. Testing is event driven and is more concerned with the basic
outcome of screens or fields. Integration tests demonstrate that although the components were
individually satisfaction, as shown by successfully unit testing, the combination of
components is correct and consistent. Integration testing is specifically aimed at e1posing
the problems that arise from the combination of components.
Functional test
#unctional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical re$uirements, system documentation, and user
#unctional testing is centered on the following items0
?alid Input 0 identified classes of valid input must be accepted.
Invalid Input 0 identified classes of invalid input must be re;ected.
#unctions 0 identified functions must be e1ercised.
,utput 0 identified classes of application outputs must be e1ercised.
Systems5)rocedures0 interfacing systems or procedures must be invoked.
,rgani*ation and preparation of functional tests is focused on re$uirements, key functions,
or special test cases. In addition, systematic coverage pertaining to identify 3usiness process
flows8 data fields, predefined processes, and successive processes must be considered for
testing. 3efore functional testing is complete, additional tests are identified and the effective
value of current tests is determined.
System Test
System testing ensures that the entire integrated software system meets re$uirements. It tests
a configuration to ensure known and predictable results. "n e1ample of system testing is the
configuration oriented system integration test. System testing is based on process descriptions
and flows, emphasi*ing pre-driven process links and integration points.
White -oF Testing
White 3o1 Testing is a testing in which in which the software tester has knowledge of the
inner workings, structure and language of the software, or at least its purpose. It is purpose. It
is used to test areas that cannot be reached from a black bo1 level.
Black Box Testing
3lack 3o1 Testing is testing the software without any knowledge of the inner workings,
structure or language of the module being tested. 3lack bo1 tests, as most other kinds of tests,
must be written from a definitive source document, such as specification or re$uirements
document, such as specification or re$uirements document. It is a testing in which the
software under test is treated, as a black bo1 .you cannot IseeJ into it. The test provides
inputs and responds to outputs without considering how the software works.
Unit Testing"
=nit testing is usually conducted as part of a combined code and unit test phase of the
software lifecycle, although it is not uncommon for coding and unit testing to be conducted as
two distinct phases.
6.2 Test strategy an a!!roac":
#ield testing will be performed manually and functional tests will be written in detail.
Test o%=ecti$es
• "ll field entries must work properly.
• )ages must be activated from the identified link.
• The entry screen, messages and responses must not be delayed.
/eatures to %e teste)
• ?erify that the entries are of the correct format
• No duplicate entries should be allowed
• "ll links should take the user to the correct page.
Integration Testing
Software integration testing is the incremental integration testing of two or more integrated
software components on a single platform to produce failures caused by interface defects.
The task of the integration test is to check that components or software applications,
e.g. components in a software system or ^ one step up ^ software applications at the company
level ^ interact without error.
Test Results" "ll the test cases mentioned above passed successfully. No defects
#cce!tance Testing
=ser "cceptance Testing is a critical phase of any pro;ect and re$uires significant
participation by the end user. It also ensures that the system meets the functional
Test Results" "ll the test cases mentioned above passed successfully. No defects
7. ,=T)=T SB::NS0
!(Source0- It browse and select where the file to send0
+( Bouter0 -select the optimal path and then send the file
2( Select a file to send from sender0
4(Sending a file from sender0
.(%estination0- hoose and conform a Beceiving path0
6( Select and Set the path0
7(Sending a file from source to destination successfully0
E(%isplaying file transfered to destination0
We have addressed the problem of optimal transmission and scheduling policies in %TN with
two-hop routing under memory and energy constraints, when the packets of the file to be
transmitted get available at the source progressively. We solved this problem when the source
can or cannot overwrite its own packets, and for W and non W policies. We e1tended the
theory to the case of fi1ed rate systematic erasure codes and rateless random linear codes.
,ur model includes both the case when coding is performed after all the packets are available
at the source, and also the important case of random linear codes, that allows for dynamic
runtime coding of packets as soon as they become available at the source.
\!] :. "ltman, #. %e )ellegrini, and 9. Sassatelli, I%ynamic control of coding in delay
tolerant networks,J in Proc. 2010 !!! "#$%$M, pp. !^..
] :. "ltman and #. %e )ellegrini, I#orward correction and #ountain codes in delay tolerant
networks,J in Proc. 200& !!! "#$%$M, pp. !^..
] T. Spyropoulos, L. )sounis, and . Baghavendra, I:fficient routing in intermittently
connected mobile networks0 the multi-copy case,J '%M(!!! )rans. "et*., vol. !6, no. !,
pp. 77^G-, #eb. +--E.
] :. "ltman, T. 3as_ar, and #. %e )ellegrini, I,ptimal monotone forwarding policies in
delay tolerant mobile ad-hoc networks,J in Proc. 200+ '%M(%,) nter-Perf.
\.] D. &et*ner, I"n improved broadcast retransmission protocol,J !!! )rans. %o..un.,
vol. 2+, no. 6, pp. 67G^6E2, Dune !GE4.
] D. Nonnenmacher, :. 3iersack, and %. Towsley, I)arity-based loss recovery for reliable
multicast transmission,J !!!('%M )rans. "et*., vol. 6, no. 4, pp. 24G^26!, !GGE.
] S. Dain, &. %emmer, B. )atra, and L. #all, I=sing redundancy to cope with failures in a
delay tolerant network,J ,/%$MM %o.put. %o..un. 0ev., vol. 2., no. 4, pp. !-G^!+-,
\E] F. Wang, S. Dain, &. &artonosi, and L. #all, I:rasure-coding based routing for
opportunistic networks,J in Proc. 2001 '%M ,/%$MM 2orkshop 3elay-)olerant "et*., pp.
\G] D. Widmer and D.-F. 9e 3oudec, INetwork coding for efficient communication in e1treme
networks,J in Proc. 2001 '%M ,/%$MM 2orkshop on 3elay-)olerant "et*orking, pp.
\!-] F. 9in, 3. 9iang, and 3. 9i, I)erformance modeling of network coding in epidemic
routing,J in Proc. 2004 '%M Mobi,ys 2orkshop Mobile $pportunistic "et*., pp. 67^74.
\!!] F. 9in, 3. 9i, and 3. 9iang, I:fficient network-coded data transmissions in disruption
tolerant networks,J in Proc. 200+ !!! "#$%$M, pp. !.-E^!.!6.
\!+] B. @roenevelt and ). Nain, I&essage delay in &"N:Ts,J in Proc. 2001 '%M
,/M!)0%,, pp. 4!+^4!2.
\!2] C. `hang, @. Neglia, D. Lurose, and %. Towsley, I)erformance modeling of epidemic
routing,J !lsevier %o.put. "et*., vol. .!, pp. +E67^+EG!, Duly +--7.
\!4] T. @. Lurt*, ISolutions of ordinary differential e$uations as limits of pure ;ump &arkov
processes,J J. 'pplied Probability, vol. 7, no. !, pp. 4G^.E, !G7-.
\!.] &. 3enaabm and D.-F. 9e 3oudec, I" class of mean field interaction models for computer
and communication systems,J Perfor.ance !valuation, +--E.
\!6] :. "ltman, @. Neglia, #. %e )ellegrini, and %. &iorandi, I%ecentrali*ed stochastic
control of delay tolerant networks,J in Proc. 200& !!! "#$%$M, pp. !!24^!!4+.