You are on page 1of 34

A TRAINING FILE ON JAVA

Rajiv Gandhi Proudyogiki Vishwavidyalaya, ho!al "#$P$% "&niv'rsi(y O) T'*hnology o) #adhya Prad'sh%
In the partial fulfillment of the requirement for the award of the degree of Bachelor of Engineering In Computer Science & Engineering

2009-2013 Su mitted to Su mitted B! #uidance of "nder the $n%ali &au'hi(

)rof* " +utta 0903CS09100, (HOD OF CSE) ,(h -'ar
-$.$/$0$ )/$1$) C233E#E 24 1EC.0232#5 #6$3I2/ 7-*)*8 9 :;:00,

E+

+ECE-BE/< 2013

6EE&35 +I$/5
Na.' o) (h' (rain'': Sargam Saxena /oll'g'0 Maharana Pratap Collage Of Technology, Gwalior Indus(ry12ork!la*'0 M/S Hue ser ices P t! "t#!,Guwahati To(al days0 $ wee%s &'( )uly ($ to *' )uly ($+ 3'!ar(.'n(14'*(ion0 Computer Science , -ngineering
.ee%/( 0ntro#uction, 1e2uirements, Types of networ%s&"34,.34, M34+, OS0 mo#el, Ca5les &Twiste#, Coaxial, 6i5re+ 4etwor%ing #e ices&Hu5, Switch, 1outer+ 0P a##ressing &Pri ate 0P, Mas%ing+ 1outer &Components, 0nterfaces, 1outing protocol+ 6irewall &0ntro#uction, Topologies, Configuring+ ."34 &Stan#ar#s, Topologies, 0nfrastructure+, 0ntrusion #etection system &H07S, 407S+, 0ntegrate# ser ices #igital networ%&Channels, 0nterfaces, 6unctional group+, .34 Solution

.ee%/*

.ee%/$

&Signe# 5y trainee+
8888888888888888

& 7ate+
88888888888888

5/L /3/ T'*hnologi's
5/L T'*hnologi's Li.i('d is a glo5al 0T ser ices company, offering an integrate# portfolio of ser ices inclu#ing software/le# 0T solutions, enterprise transformation, remote infrastructure management, engineering an# 1,7 ser ices, an# 5usiness process outsourcing &9PO+! HC" Technologies is on the 6or5es Glo5al *''' list an# is one of 3sia:s 6a5 ;' Companies!

HC" has a networ% of offices in *< countries to pro i#e ser ices across in#ustry erticals, inclu#ing aerospace , #efense, energy , utilities, in#epen#ent software en#ors, manufacturing, professional ser ices, ser ers , storage, automoti e, financial ser ices, in#ustrial manufacturing, me#ia , entertainment, retail , consumer, telecom, consumer electronics, go ernment, life sciences , healthcare, me#ical #e ices, semicon#uctors, an# tra el, transportation , logistics! HC" ta%es pri#e in its philosophy of =-mployee 6irst,> which empowers its ?;,;'; employees to create real alue for customers! HC" Technologies, along with its su5si#iaries, ha# consoli#ate# re enues of @SA B!< 5illion &1s! *;,C$B crores as on $' Dune *'($!+ HC" Technologies is one of two companies un#er HC" -nterprise / a glo5al technology an# 0T company with annual re enues of o er @SA <!$ 5illion! The secon# company is HC" 0nfosystems!HC" #e elope# 0n#ia:s first in#igenous micro/computer at the same time as 3pple! The company has

em5ar%e# on an all/out effort to transform the company into a high/ performing organiIation! 4ayar:s efforts commence# with a simple premise: putting employees first in the or#er of 5usiness! 9y #oing this.5een in the forefront of technological inno ation e er since with many worl# firsts to its cre#it. HC" create# a culture that attracte# an# retaine# creati e employees. an# *'('. Singapore. Malaysia. passionate a5out what they were #oing! 3lthough putting customers secon# soun#e# heretical at the time. an# fine/graine# multi/ processor @40F installation in (E?E! HC"Gs 1. 0srael. Hineet 4ayar. inclu#ing the first 1elational 7ata5ase Management System in (E?$. M-3. @3. Dapan. client/ser er architecture in (E?B. the strategy wor%e#! HC" transforme# its 5usiness 5y practicing ra#ical transparency an# increasing the autonomy of in#i i#ual #e elopment teams! HC" also turne# the tra#itional organiIational pyrami# on its hea# 5y ma%ing share#/ser ice organiIations such as tech support an# management accounta5le to frontline #e elopers! 7e elopers are respon#ing with inno ati e i#eas an# creating a self/sustaining =can/#o> culture! The financial results were also impressi e: a $.J compoun# annual growth rate &C3G1+ through the *''? to *'(' recession! Global Reach HC" has its networ% of offices in *< countries across the glo5e! 0n 3P3C . China.J growth in re enue per employee an# a sector/lea#ing *. 0n#onesia. 4ew Lealan#. South 3frica. CIech . 0n#ia. Sau#i 3ra5ia. HC":s now non/executi e Hice Chairman.an# Matar! 0n -urope. HC" has offices in 9elgium. Hong Kong.7 was spun off as HC" Technologies in (EE( to mar% its a# ent into the software ser ices arena! 9etween *''. HC" has offices in 3ustralia.

7enmar%. 4etherlan#s. C/S3T sur eys. HC" has offices in 9raIil. 0taly. Swe#en SwitIerlan# an# the @K! 3n# in the 3mericas. in estors an# analysts! Other initiati es inclu#e the Ser ice 7eli ery Platform. HC" allocates special #ialogue #ays. Germany. Halue Portal. Mexico. 6inlan#. 3# isory Councils an# G11P! A**olad's on Trans!ar'n*y • 3siamoney ote# HC" as the 5est company for in estor relations in 0n#ia INTRO3&/TION .1epu5lic. -xchange 9oar# of 0n#ia &S-90+ gui#elines / Clause BE *! 0s certifie# 5y Statutory 3u#itors $! Complies with OrganiIation of -conomic . trust an# transparency. 4orway. Corporate 7e elopment &O-C7+ Principles B! 3#heres to Corporate Go ernance Gui#elines *''' To promote openness. Puerto 1ico an# the @S3! Corporate Governance Framework (! Strictly a#heres to Security . Polan#. =HC" Glo5al Meet> for its customers. such as the annual =7irections> meet for its employees. 6rance.

Proj'*( 3's*ri!(ion The pro)ect =-xam Suite> is #e elope# in Da a. #ata collecte# on the arious files.hat must 5e #one to sol e the pro5lemN 3nalysis 5egins when a user or manager 5egins a stu#y of the program using existing system! 7uring analysis. etc! Training. . which mainly focuses on 5asic -xam operations! =-xam Suite> is a win#ows application written for $*5it .in#ows operating systems. #ecision points an# transactions han#le# 5y the present system! The commonly use# tools in the system are 7ata 6low 7iagram. inter iews. #esigne# to help users to write exams! The software -xam Suite has $ main mo#ules!  "ogin Mo#ule  0nsertion to 7ata5ase Mo#ule  -xtracting from 7ata5ase Mo#ule E6I4TING 4-4TE#0 System 3nalysis is a #etaile# stu#y of the arious operations performe# 5y a system an# their relationships within an# outsi#e of the system! Here the %ey 2uestion is what all pro5lems exist in the present systemN .

writing exam using that account! Our propose# system has the following a# antages!  @ser frien#ly 0nterface  6ast access to #ata5ase  "ess error  Storage Capacity .experience an# common sense are re2uire# for collection of rele ant information nee#e# to #e elop the system! The success of the system #epen#s largely on how clearly the pro5lem is #efine#. thoroughly in estigate# an# properly carrie# out through the choice of solution! 3 goo# analysis mo#el shoul# pro i#e not only the mechanisms of pro5lem un#erstan#ing 5ut also the frame wor% of the solution! Thus it shoul# 5e stu#ie# thoroughly 5y collecting #ata a5out the system! Then the propose# system shoul# 5e analyIe# thoroughly in accor#ance with the nee#s! PROPO4E3 4-4TE#0 Propose# system is an -xam Suite! 3ccor#ing to #esignate we can create an account.

response time re2uirement an# num5er of copies nee#e#! INP&T FOR# 3E4IGN 0nput 7esign is the process of con erting user originate# computer 5ase# format! 0naccurate input #ata are the most common cause of errors in #ata processing !-rrors entere# 5y #ata entry operators can 5e controlle# 5y input #esign! The goal of #esigning input #ata is to ma%e #ata entry as easy. the input screens are #e elope# accor#ing to the user re2uirements! . intelligi5le output #esign shoul# impro e the system relationship with the user an# help in #ecision/ma%ing! The outputs pro i#e in the system are the softcopy report a aila5le for printing! Printouts shoul# 5e #esigne# aroun# the output re2uirement of the user! The output #e ices to consi#er #epen# on the factor such as compati5ility of the #e ice with the system. logical an# free from errors as far as possi5le! 0n this system.O&TP&T FOR# 3E4IGN Computer output is the most important an# #irect source of information to the user! -fficient.

#odul' I Login #odul' II 4ign &! #odul' III E7a. #odul' IV R'sul( R'gis('r'd &s'r R'gis(ra(ion 8u's(ions R'sul( !u9lish'd .#EN& TREE #ain #odul' 4ys('.

easy 2uic%. inexpensi e an# flexi5le for other users! 7uring #ata5ase #esign the following o5)ecti es are concerne#:/  Controlle# 1e#un#ancy  -asy to learn an# use  More information an# low cost  3ccuracy  0ntegrity . the analyst must concentrate on #ata5ase #esign or how #ata shoul# 5e organiIe# aroun# user re2uirements! The general o5)ecti e is to ma%e information access.3ATA A4E 3E4IGN The general theme 5ehin# a #ata5ase is to han#le information as an integrate# whole! 3 #ata5ase is a collection of interrelate# #ata store# with minimum re#un#ancy to ser e many users 2uic%ly an# effecti ely! 3fter #esigning the input an# output.

'0 8u's(ion Pri. (. (' (.'0 R'sul( Fi'ldna. *. $' $' $' $' Na.' Sco#e Mno M#esc Choice( Choice* Choice$ 3nswer Na.ail Fi'ldna. :no Fi'ldna.ary k'y0 E.' E. P'r*'n( 4(a(us Ty!' Harchar* Harchar* 4um5er Harchar* 4i. .' . . (' Ty!' Harchar* Harchar* Harchar* Harchar* Harchar* Harchar* Harchar* 4i.' -mail 6name "name 7o5 Muali Ph passwor# Ty!' Harchar* Harchar* Harchar* 4um5er Harchar* 4um5er Harchar* 4i.' .' <= <= > <= .TA LE4 &4E3 Na.ail E7a.ary k'y0 s*od'. *.'0 R'gis(ra(ion Pri.

3ATA FLO2 3IAGRA# /on('7( 3iagra. @ser System 1esult LEVEL <0 4k'l'(on 4(ru*(ur' Login =$< 3a(a9as' /onn'*(ion =$@ #ain 4ys('. =$? .

LEVEL @0 7ata 9ase 3## Sing up -mployee users -#it -xam -mplyee 7elete -xam -mployee 1esults LEVEL ?0 7ata5ase System Passwor# / @ser name .

in#ows FP Professional x<B -#ition for x?</<B processors! .in#ows Me. which has a##itional features such as support for .in#ows FP Ta5let PC -#ition is #esigne# to run the in%/aware Ta5let PC platform! Two separate <B/5it ersions of .4-4TE# I#PLE#ENTATION A O&T OPERATING 4-4TE# . an# .in#ows *''' an# .in#ows FP is a line of operating systems #e elope# 5y Microsoft for use on general/purpose computer systems. an# is the first consumer/oriente# operating system pro#uce# 5y Microsoft to 5e 5uilt on the .in#ows 4T %ernel an# architecture The most common e#itions of the operating system are .in#ows FP is the successor to 5oth .in#ows FP were also release#.in#ows! 4ew software re#esigne# graphical user interface. inclu#ing home an# 5usiness #es%tops. which is targete# at home users.in#ows FP Professional.in#ows FP Home -#ition. an# is targete# at power users an# 5usiness clients! . an# me#ia centers! The letters OFPO stan# for experience! .in#ows FP is %nown for its impro e# sta5ility an# efficiency o er pre ious ersions of Microsoft . note5oo% computers. a change Microsoft promote# as more user/frien#ly than pre ious management capa5ilities were intro#uce# to a oi# the O7"" hellO that .in#ows! 0t presents a significantly ersions of .in#ows Ser er #omains an# two physical processors. .in#ows FP <B/5it -#ition for 03/<B &0tanium+ processors an# .

in#ows FP has also 5een criticiIe# 5y some users for security ulnera5ilities. a restriction That #i# not sit well with some users an# pri acy a# ocates! . platform in #epen#a5le language. it too% some time for the final wor%ing ersion to reach the mar%et! The 5asic o5)ecti e 5ehin# #e eloping the language was to create software that coul# 5e em5e##e# in consumer electronic #e ices! -fforts were ta%en to pro#uce a porta5le. tight 0ntegration of applications such as 0nternet -xplorer an# .in#ows Me#ia Player. an# for aspects of its user interface! A O&T T5E LANG&AGE Java is a programming language #e elope# 5y Sun Microsystems an# is 5ase# on the concepts of C an# CPP! The syntax for Da a is similar to C! 5I4TOR.in#ows to use pro#uct acti ation to com5at software piracy. an# the result of this le# to the 5irth of a new language! Dames Gosling an# a team of other programmers were the pioneers 5ehin# this #e elopment! 0t was initially calle# = 2a(> 5ut was later .Plague# ol#er consumer ersions of ..OF JAVA 0n 4o em5er (EE. Sun Microsystems intro#uce# a new programming language to the worl#/ Da a! @ntil then the wor# = =a>a> coul# only mean an islan# in 0n#onesia or a particular 5len# of coffee! Though its initial #e elopment 5egan as early as (EE(.in#ows! 0t is also the first ersion of .

which was initially #e elope# to cater To small/scale pro5lems. secure an# porta5le! Thus Da a.rename# to ==a>a?! Slowly 5ut gra#ually it was foun# that 0nternet users ha# similar pro5lems of porta5ility an# platform in#epen#ence an# were loo%ing for software that coul# a##ress these issues! Da a language was foun# to 5e small. operator . for ease of migration! Hence the Da a #esigners remo e# a num5er of complex features that existe# in C an# CPP! Da a #oes not ha e features such as pointer manipulation. was foun# capa5le of a##ressing large/scale pro5lems across the 0nternet! FEAT&RE4 OF JAVA The Da a "anguage is • Simple • O5)ect Oriente# • Platform/0n#epen#ent • 1o5ust • Secure • 7istri5ute# • Multithrea#e#  Simple The #esigners of Da a were trying to #e elop a language that a programmer coul# learn 2uic%ly! They also wante# the language to 5e familiar to most programmers.

compile the co#e. platform in#epen#ence at the source le el allows the user to mo e the source co#e from one system to another. an# run it clearly on the system! Platform in#epen#ence at the 5inary le el allows the user to run the compile# 5inary file on multiple platforms without recompiling the co#e!  /o u't Da a is strictly a type# language! Hence it re2uires explicit metho# #eclaration! Da a chec%s your co#e at the time of compilation an# also at the time of interpretation! Thus it eliminates certain types of programming errors! . or hea#er file#! Constructs li%e Qstruct: an# Qunion: ha e also 5een remo e# from Da a!  )latform-Independent Platform/in#epen#ence refers to the a5ility of the program to migrate from one computer to another without any 7ifficulty! Da a is platform in#epen#ent at the source le el as well as at the 5inary le el! Da a is strongly type# language! This means that you nee# to #eclare the type for any aria5le! The )a a #ata types are consistent across all the #e elopment platforms! Da a has its own foun#ation class li5raries! This allows the programmer to write co#e that can 5e mo55e# from one machine to another. with out ha ing to rewrite it! 0n short.o erloa#ing etc! Da a #oes not use the Qgo to: statement.

5efore #ownloa#ing an# executing them! Often this precaution was no guarantee against iruses! 3lso there were many malicious programs that programmers nee# to loo% out for! These programs coul# search the contents of your local file system an# retrie e sensiti e #ata! Da a pro i#es a controlle# en ironment for the execution of the program! 0t ne er assumes that the co#e is safe for execution! 3n# since )a a is more than a programming language.Da a #oes not ha e pointers an# pointer arithmetic! 0t chec%s all access to arrays an# strings at the runtime! 0t also chec%s the casts of o5)ects from one type to another at runtime! 0n tra#itional programming en ironments. it pro i#es se eral layers of security control! 0n the first layer. the programmer ha# to explicitly free this memory! Pro5lems arose when the programmer forgot to #e allocate the memory! 0n Da a the programmer #oesn:t nee# to 5other a5out memory #e allocation! 0t:s #one automatically. as Da a pro i#es Gar5age collections for un use# o5)ects! Da a:s exception han#ling feature simplifies the tas% of error han#ling an# reco ery!  Secure: Hiruses are a great cause of worry in the worl# of computers! Prior to the a# ent of Da a. programmers ha# to first scan files. the programmer ha# to manually allocate memory! 9y the en# of the program. the #ata an# metho#s are encapsulate# in the class! They can 5e accesse# only through the interface that the class pro i#es! Da a #oes not allow any pointer arithmetic! Hence it #oes not allow #irect access .

an# pro i#es gar5age collection! 3ll these features help minimiIe safety an# porta5ility pro5lems! 0n the secon# layer the compiler ensures that the co#e is safe an# follows the protocols set 5y Da a 5efore compiling the co#e! The thir# layer is safety pro i#e# 5y the 0nterpreter! The erifier thoroughly screens the 5yte co#es to ensure they o5ey the rules 5efore executing them! The fourth layer ta%es care of loa#ing the classes! The class loa#er ensures that the class #oesn:t iolate the access restrictions.to the memory! 0t #isallows array o erflow. 5efore loa#ing it to the system!  +i'tri uted Da a can 5e use# to #e elop applications that are porta5le across multiple platforms an# operating systems! Da a is #esigne# to support networ% applications!  -ultithreaded Da a programs use a process calle# Qmultithrea#ing: to perform many tas%s simultaneously! Da a pro i#es the master solution for synchroniIing multiple processes! The 5uilt in support for threa#s ena5les interacti e applications on the internet to run simultaneously . pre ents rea#ing memory out of 5oun#s.

S FP SP* Da a 1untime -n ironment (!.'' MHL $* 5its *. .<M9 of 13M B' G9 or higher SHG3 ('?Keys * 5utton mouse CO"O1 4OFT2ARE RE8&IRE#ENT4 OS -n ironment : : MS .4-4TE# /ONFIG&RATION 5AR32ARE RE8&IRE#ENT4 Processor Cloc% spee# System 5us 13M H77 Monitor Key5oar# Mouse : : : : : : : : 0ntel Pentium 0H *!B GHL or a5o e .047O.

6ront en# 9ac% en# : : Core Da a D*S7K(!. Microsoft 3ccess *''$ A O&T #4+A//E44 3ccess is a relational #ata5ase program !3ccess is use# to enter. an# analyIe lists of #ata! 1elational #ata5ases minimiIe re#un#ant #ata 3# antages of 3ccess • 7uplicate #ata is minimiIe# • 0nformation is more accurate • 7ata entry is faster an# easier • 0nformation can 5e iewe# an# sorte# in multiple ways! • 0nformation is more secure • 0nformation can 5e share# among se eral users • 0nformation retrie al is faster an# easier . e#it.

4ui('0 Login .4/REEN 45OT4 E7a.

E7a. 4ui('0 4ign u! .

4ui('0 Rul's .E7a.

. 4ui('0 4'l'*( E7a.E7a.

. 4ui('0 4(ar( E7a.E7a.

.E7a. 4ui('0 E7a.

.E7a. 4ui('0 E7a.

E7a. 4ui('0 E7a. .

E7a. . 4ui('0 E7a.

E7a. 4ui('0 R'sul( .

/ON/L&4ION The AE7a. 4ui('B is a great impro ement o er the manual system li%e han# written exams! The computeriIation of the system has spee# up the process an# it is time consuming! 0t is ery #ifficult to %eep answer papers an# all such things! The system was thoroughly chec%e# an# teste# with #ummy #ata! The system a oi#s #ata re#un#ancy an# inconsistency! 0t pro i#es security an# integrity! 7ata is easily retrie e#! Thus the system is user frien#ly! .

F&T&RE EN5AN/E#ENT The propose# system is purely an -xam Suite we will ma%e this pro)ect as online where e ery customer using their -/mail 07 can iew their result #etailsR they can:t e#it or ma%e changes in their account! 3lso.hen ma%ing online. we can inclu#e online. up#ating 5y the authoriIe# person! . -xam proce#ures an# latest news a5out the -xam will 5e seen in our software! 3ny comments can 5e inclu#e# 5y the user! .

y$ • Progra.!l'(' R')'r'n*'$ • /or' Java @ 4'v'n(h Edi(ion 9y /ay 4$ 5ors(.ann and Gary /orn'll$ • Advan*'d Java 9y alaguruswa..REFEREN/E ooks • Java @ /o.ing using Java 9y 3avid$ J$ E/C • Java 3'sign Pa(('rns 9y Ja.'s 2$ /oo!'r .