Post Office Management System A Java Project
Post Office Management System A Java Project
Speedy and efficient information processing is crucial to our socially and highly developed technology. Computer can help the intolerable burden of handling the ever increasing amount or information with government department, public services and business concerns expected to contain because of their ability to analyze information as well as to retain, update and reproduce it because of their versality to present it in a variety of forms. This may also to some extent lead to problems occurring due to information explosion.
About Project
POST O !C" wor#s in every wal# of our life. Through the automation of this system one can easily generate the information about the customer available and also about the old records. or this efficient software the first and the foremost thing is that all the re$uirements should be #nown before hand and the developer should devote its effort for the completion of that re$uirement which are demanded by the customer should be fulfilled. This system can be used in various education departments and can distribute the copies of the system among the management and staff members for the re$uired information of their customer. This very handy pro%ect for any user and includes following features&' ( )aving customer information and total amount payable. ( for the help of user it displays each and every detail about re$uired topics ( *aintains all the old record for later reference ( )ave provision for automatic update as per the status ( System must handle user en$uiry
>2 P4-!*!874. ,"S!;8 9 This activity deals with certain design issues,
which are to be finalized in consultation with user. The two most common design issues of relevance to the user are the automation boundary and the human machine interface. The output of the activity is the user implementation model. The ma%or part of the user implementation model is the specification for the user interface of the proposed system. The user implementation model is also referred to as the physical model of the proposed system. The model, in addition to the essential model , defines the following for the proposed system& ( 7utomation boundary ( 4eport layouts ( -ayouts of the source documents ( Screen -ayouts for the data entry form ( *enu
>
7dvantages of POST O
+. This system will improve the performance of the company. 6. !t reduces the tedious %obs li#e reluctant wor#, long procedures, automated report generation, up to date information. >. !t will improve the Post Office *anagement, since all the information is available whenever re$uired. ?. !t provides $uic# processing thus helps in transaction and updating in master records can be performed in few records. @. !t allows easy generation of all types of reports. A. !t provides accurate output. B. !t gives fast answer of $ueries. 1. The amount of paper is reduced. 0. =etter security +D. "conomical. ++. =etter Control.
@. Planned approach toward wor#ing 9 The wor#ing is the service center information system will be well planned and organized. The data will be stored properly in the data store which will help in retrieval of information as well as in its storage. A. ;eneration of managerial and strategic reports 9 The new system would provide for regular generation of reports which would help the management in decisions ma#ing wor# and in controlling the over'all wor#ing of the organization. The generation of these reports would be possible only if the system is organized such that retrieval of information can be made on conditions. B. 7ccuracy 9 The level of accuracy in the new proposed system would be higher. 7ll operations and computations would be done correctly and this will ensure that whatever information is coming from the center, it is accurate. 1. 4eliability 9 The reliability of the proposed system would be high due to the above stated reasons. The reason for the increased reliability of the system is that now there would be proper storage of information, its maintenance would be well managed and retrieval would be possible in the desired manner. 0. 8on 4edundant !nformation 9 !n the new system, utmost care be ta#en that no information is repeated, any usage of storage or otherwise. This would assure economic usage of storage or space and consistency in the data stored. This will also help ma#e those changes easily as the change would have to be made only at that very place and no where else.
Introduction
#hat is java,
Gava is a general purpose ob%ect oriented programming language . !t is the first programming language that is not tied to any particular hardware or operating system .The language is based on the concept of an ob%ect. Gava is highly derived from CJJ . *ost stri#ing feature of the language is that it is platform neutral language. There were five primary goals in the creation of the Gava language& K !t should use the ob%ect'oriented programming methodology. K !t should allow the same program to be executed on multiple operating systems. K !t should contain built'in support for using computer networ#s. K !t should be designed to execute code from remote sources securely. K !t should be easy to use and borrow the good parts of older ob%ect'oriented languages li#e CJJ.
-ava tools
!n order to write %ava application or applets ,one need more than a language . The tools that lets one to write , test , debug programs.
-ava features
( Compiler and !nterpreted ( Platform independent ( Simple ( Secure ( amiliar ( Portable ( Ob%ect'Oriented ( 4obust ( *ultithreaded ( )igh performance ( ,istributed ( ,ynamic
Compiler and !nterpreted ' There is a %ava compiler , named %avac . The %ava
compiler ta#es input source code files /these files typically have the ext.%ava2 and converts them into compiled bytecode files.The %ava !nterpreter #nown as %avac can be used to execute %ava application .The interpreter translates bytecode directly into program actions.
Platform independent ' Gava programs can be easily moved from one computer to
another, anywhere and anytime.Changes and upgrades made in operating systems, processors and system resources will not force any changes in %ava programs.
Simple ' Gava is designed to be easy for programmer to learn and use efficiently.
Secure' <hen we use a %ava compatible web browser, we can safely download %ava
applets without fear of virus infection. Gava achieves this protection by confining a %ava program to %ava execution environment and not allowing it access to other parts of the computer.
amiliar' !t is modeled on C, CJJ languages. Gava code loo#s li#e CJJ. Portable' Gava compiler generates bytecode instructions that can be implemented on
any machine and also the size of the primitive data types are machine independent.
Ob%ect'Oriented ' Gava is a true ob%ect'oriented language. 7ll program code and
data reside within ob%ects and classes.
4obust '!t provides many safeguards to ensure reliable code. !t has strict compile
time and run time chec#ing for data types. ,esigned as a garbage'collected language relieving the programmers and also incorpates the concept of exception handling which captures series errors.
*ultithreaded ' Gava supports handling multiple tas#s simultaneously which greatly
improves the interactive performance of graphical applications.
,istributed ' !t has ability to share both data and programs. Gava applications can
open and access remote ob%ects on internet which enables multiple programmers at multiple remote locations to collaborate and wor# together on single pro%ect.
,ynamic ' Gava is capable of dynamically in new class libraries , methods and
ob%ects .!t supports functions written in other languages li#e C,CJJ called as native methods.
7utomatic garbage collection ' One idea behind GavaLs automatic memory
management model is that programmers should be spared the burden of having to perform manual memory management. !n some languages the programmer allocates memory to create any ob%ect stored on the heap and is responsible for later manually deallocating that memory to delete any such ob%ects. !f a programmer forgets to de' allocate memory or writes code that fails to do so in a timely fashion, a memory lea# can occur& the program will consume a potentially arbitrarily large amount of memory. !n addition, if a region of memory is de'allocated twice, the program can become unstable and may crash. !n Gava, this potential problem is avoided by automatic garbage collection. The programmer determines when ob%ects are created and the Gava runtime is responsible for managing the ob%ectsL lifecycle. The program or other ob%ects can reference an ob%ect by holding a reference to it /which, from a low'level point of view, is its
+D
address on the heap2. <hen no references to an ob%ect remain, the Gava garbage collector automatically deletes the unreachable ob%ect, freeing memory and preventing a memory lea#. *emory lea#s may still occur if a programmerLs code holds a reference to an ob%ect that is no longer neededMin other words, they can still occur but at higher conceptual levels. Comparing Gava and CJJ, it is possible in CJJ to implement similar functionality /for example, a memory management model for specific classes can be designed in CJJ to improve speed and lower memory fragmentation considerably2, with the possibly cost of extra development time and some application complexity. !n Gava, garbage collection is built in and virtually invisible to the developer. That is, developers may have no notion of when garbage collection will ta#e place as it may not necessarily correlate with any actions being explicitly performed by the code they write. ,epending on intended application, this can be beneficial or disadvantageous& the programmer is freed from performing low'level tas#s but at the same time lose the option of writing lower level code.
Gava Program
Gava Compiler
5irtual *achine
=ytecode
=ytecode
Gava !nterpreter
*achine code
5irtual *achine
4eal *achine
Ob%ects and Classes ' 7n ob%ect is a software bundle of variables and related
methods. Ob%ects are #ey to understanding ob%ect'oriented technology. 4eal'world ob%ects share two characteristics& They all have state and behavior. Software ob%ects ++
are modeled after real'world ob%ects in that they too have state and behavior. 7 software ob%ect maintains its state in one or more variables. 7 variable is an item of data named by an identifier. 7 software ob%ect implements its behavior with methods. 7 method is a function /subroutine2 associated with an ob%ect. !n the Gava programming language, an ob%ect can specify one of four access levels for each of its variables and methods. 7 class is a blueprint that defines the variables and the methods common to all ob%ects of a certain #ind. 7fter youLve created the class, you can create any number of ob%ects from that class. <hen you create an instance of a class, the system allocates enough memory for the ob%ect and all its instance variables. "ach instance gets its own copy of all the instance variables defined in the class. Classes can also define class variables. 7 class variable contains information that is shared by all instances of the class .7 class can also declare class methods. .ou can invo#e a class method directly from the class, whereas you must invo#e instance methods on a particular instance.
"ncapsulation ' <rapping of data and methods into a single unit is #nown as
encapsulation. !t is the most stri#ing feature of class. The data is not accessible to outside world and only those methods which are wrapped in the class can access it. The insulation of the data from direct access by the program is called data hiding.
!nheritance ' !nheritance is the process by which ob%ects of one class ac$uire the
property of ob%ects of another class. "ach subclass inherits state .)owever, subclasses are not limited to the states and behaviors provided to them by their superclass. Subclasses can add variables and methods to the ones they inherit from the superclass. !t supports the concept of hierarchical classification it also provides the use of reusability. .
Polymorphism ' This means the ability to ta#e more than one form. 7n operation
may exhibit different behaviour in different instances. The behaviour depends upon the types of data used in the operation. !t plays an important role in allowing ob%ects having different internal structures to share external interface.
+6
/$"SI&% !IS(&"0
G,N +.D/Ganuary 6>, +00A2 M !nitial release. G,N +.+/ ebruary +0, +00B2 ' !nner classes added to the language G6S" +.6/,ecember 1, +0012 M Codename Playground. G6S" @.D were rebranded Gava6 and the version name OG6S"O /Gava 6 Platform, Standard "dition2 replaced G,N to distinguish the base platform from G6"" /Gava 6 Platform, "nterprise "dition2 and G6*" /Gava 6 Platform, *icro "dition2. G6S" +.>/*ay 1, 6DDD2 M Codename Nestrel. G6S" +.?/ ebruary A, 6DD62 M Codename *erlin. G6S" @.D/September >D, 6DD?2 M Codename Tiger./Originally numbered +.@, which is still used as the internal version number.P+Q2 Gava S" A M Codename *ustang. 7s of 6DDA this is currently in development under GS4 6BD. 7 beta version was released on ebruary +@, 6DDA.=eta 6 was released on Gune +@, 6DDA and is available at http&RR%ava.sun.comR%avaseRdownloadsRea.%sp. The final release is expected autumn 6DDA. Gava S" B M Codename ,olphin. This is in the early planning stages. The ,olphin Pro%ect will start up in late Guly, with release estimated in 6DD1.P>Q
+>
The Gava ,atabase Connectivity /G,=C2 7P! is the industry standard for database' independent connectivity between the Gava programming language and a wide range of databases 9 SC- databases and other tabular data sources, such as spreadsheets or flat files. The G,=C 7P! provides a call'level 7P! for SC-'based database access. G,=C technology allows you to use the Gava programming language to exploit O<rite Once, 4un 7nywhereO capabilities for applications that re$uire access to enterprise data. <ith a G,=C technology'enabled driver, you can connect all corporate data even in a heterogeneous environment. The G,=C 7P! is the industry standard for database'independent connectivity between the Gava programming language and a wide range of databases. The G,=C 7P! provides a call'level 7P! for SC-'based database access. G,=C technology allows you to use the Gava programming language to exploit O<rite Once, 4un 7nywhereO capabilities for applications that re$uire access to enterprise data.
-D.C Architecture
The G,=C 7P! contains two ma%or sets of interfaces& the first is the G,=C 7P! for application writers, and the second is the lower'level G,=C driver 7P! for driver writers. G,=C technology drivers fit into one of four categories. 7pplications and applets can access databases via the G,=C 7P! using pure Gava G,=C technology'based drivers, as shown in this figure&
+?
Left side, Type 4: Direct-to-Database Pure Java Driver This style of driver converts G,=C calls into the networ# protocol used directly by ,=*Ss, allowing a direct call from the client machine to the ,=*S server and providing a practical solution for intranet access. Right side, Type 3: Pure Java Driver for Database Middle are This style of driver translates G,=C calls into the middleware vendorLs protocol, which is then translated to a ,=*S protocol by a middleware server. The middleware provides connectivity to many different databases. The graphic below illustrates G,=C connectivity using O,=C drivers and existing database client libraries.
Left side, Type !: JD"#-$D"# "ridge plus $D"# Driver This combination provides G,=C access via O,=C drivers. O,=C binary code '' and in many cases, database client code '' must be loaded on each client machine that uses a G,=C'O,=C =ridge. Sun provides a G,=C'O,=C =ridge driver, which is appropriate for experimental use and for situations in which no other driver is available.
+@
Right side, Type %: & 'ative &P( partly Java tech'ology-e'abled driver This type of driver converts G,=C calls into calls on the client 7P! for Oracle, Sybase, !nformix, ,=6, or other ,=*S. 8ote that, li#e the bridge driver, this style of driver re$uires that some binary code be loaded on each client machine. or comparison of driver types, please see the article published in Computerworld.
Industry +omentum
-eading database, middleware and tool vendors have been building support for G,=C technology into many new products. This ensures that customers can build portable Gava applications while choosing from a wide range of competitive products for the solution best suited to their needs. See the Industry Support page for a list of companies that are shipping products with support for G,=C technology.
+A
access databases using O,=C drivers from G,=C . G,=C 9O,=C bridge effectively translate the G,=C 7P! calls into the corresponding O,=C calls . O,=C drivers are available for almost all types of databases. G,=C can access almost all databases . =ecause of their common ancestry they share some important components&'
-oads database drivers and manages the connections between the application and the driver Translates 7P! calls into operations for a specific data source 7 session between an application and a database 7 SC- statement to perform a $uery or update operation !nformation about returned data , database and driver -ogical set of columns and rows of data returned by executing a statement
Connection Statement 4esultSet
,river *anager
,river
,atabase ,atabase
The G,=C architecture is based on a collection of %ava interfaces and classes that together enable you to connect to data sources , to create and execute SC- statements and to retrieve and modify data in a database.
+B
4ey 'eatures
The G,=C 7P! provides metadata access that enables the development of sophisticated applications that need to understand the underlying facilities and capabilities of a specific database connection.
No nstallation
7 pure G,=C technology'based driver does not re$uire special installation: it is automatically downloaded as part of the applet that ma#es the G,=C calls.
!n addition to this important advantage, ,ataSource ob%ects can provide connection pooling and distributed transactions, essential for enterprise database computing. This functionality is provided transparently to the programmer.
+1
+0
( ,ata ,efination -anguage /,,-2 9 ,,- statements are used to describe the
tables and the data they contain. The subset of SC- statements used for modeling the structure /rather than the contents2 of a database or cube. The ,,- gives you the ability to create, modify, and remove databases and database ob%ects. ( ,ata *anipulation -anguage /,*-2 9 ,*- statements that are used to operate on data in the database. These are statements that allow you to create or alter ob%ects /such as tables, indexes, views, and so on2 in the database. The subset of SCstatements used to retrieve and manipulate data. ,*- can be further divided into 6 groups&' ( Select Statements 9 Statements that return a set of results. ( "verything else 9 Statements that donFt return a set of results. )ere are some of the $uries defined&'
S$L$C( 1 SC- statement used to re$uest a selection, pro%ection, %oin, $uery, and
so on, from a SC- Server database5
Primary 6ey 9 Primary #ey constraints identify the column or set of columns
whose values uni$uely identify a row in a table. 8o two rows in a table can have the same primary #ey value. .ou cannot enter a 83-- value for any column in a primary #ey.
6D
Insert 1 (he !nsert logical operator inserts each row from its input into the ob%ect
specified in the 7rgument column. To insert the data into a relation we either specify a tuple to be inserted or write a $uery.
Delete 1 The ,elete logical operator deletes from an ob%ect rows that satisfy the
optional predicate in the 7rgument column. <e can delete only whole tuples: we cannot delete values on only particular attributes5
*pdate 1 The 3pdate logical operator updates each row from its input in the ob%ect
specified in the 7rgument column. !t provides a way of modifying existing data in a table update statement do not return a result set, they merely modify data in the database. !f a <)"4" &/2 predicates is present, only those rows that satisfy this predicate are updated. !f a S"T &/2 predicate is present, it indicates the value to which each updated column is set. !f a ," !8" &/2 predicate is present, this lists the values that this operator defines.
Alter - 7dds or removes files, file groups, table. *odifies a table definition by
altering, adding or dropping columns and constraints, or by disabling or enabling constraints and triggers. Can also be used to modify the attributes of files and file groups, such as changing the name or size of a file.
6+
APPL$(S
#hat is an Applet,
7pplets are small applications that are accessed on an internet server, transported over the internet, automatically installed and as a part of web document. !t can perform arithmetic operations, display graphics, play sounds, accept user input, and create animation and interactive games.
Capabilities
Gava applets can be used to build full featured graphical user interface. 7pplets can communicate over the internet to a host server and even communicate with other applets on a form.
-imitation
or %ava to be truly successful. )owever, the client security has to be completely assured because of this security measures place some limitations on %ava applets. =y default, applets cannot communicate with any server other than the originating server. 7pplets also cannot read or write files to the local file system.
=orn or initialization state& ' 7pplet enters the initialization state when it is first
loaded. This is achieved by calling the init /2 method of applet class. The applet is born. !f we want then we can override the initialization more than once in the applet program.
4unning state ' 7pplet enters the running state when the system calls the start /2
method of applet class. This occurs automatically after the applet is initialized. <e can override the start /2 method to create a thread to control the applet.
!dle or stopped state ' 7n applet becomes idle when it is stopped from running.
Stopping occurs automatically when we leave the page containing running applet. <e can also do so by calling the stop /2 method explicitly. Stop /2 method can be overridden.
66
,ead or destroyed state ' 7n applet is said to be dead when it is removed from
memory. This occurs automatically by invo#ing the destroy /2 method when we $uit the browser.
,isplay state ' 7pplet moves to the display state whenever it has to perform some
output operations on the screen. This happens immediately after the applet enters into running state. The paint /2 method is called to accomplish this tas#. 7lmost every applet will have a paint method. <e can override this method.
6>
The 7<T pac#age allows you to develop window'li#e applications. !t allows your applications to run on different windowing systems. The classes in 7<T pac#age will allow you to&' K ;enerate Colors. K ,raw graphics. K 7dd ;3! components li#e push buttons, scrollbars etc to your applications. K )andle user input from mouse and #eyboard. K Create Containers. K Classes li#e -ayout *anagers helps in automatically positioning a ;3! ob%ect when we add it to the container.
6?
S#I%
S<!8; is a set of classes that provides powerful and flexible functionality. !n addition with several components provided by 7<T, swing supplies several exciting additions, including tabbed panes, scroll panes, trees and tables. !t also changes the images as the state of any component changes. Swing is built upon the foundation of the 7<T. Swing components are written entirely in Gava and therefore are Platform' independent .Swing is also termed also light'weight and provide pluggable loo# and feel. There are 6 Swing classes that are $uite important&
Gframe and Component 9 Gframe extends the 7<T class rame. !t contains
additional features that enable it to support Swing components. GComponent extends the 7<T component and Container classes. !t is the top level class for all Swing components and provides Swing pluggable loo# and feel. )ere are some of the Swing component classes&
C-7SS 7bstract =utton =utton ;roup !mage !con G7pplet G=utton GChec#=ox GCombo=ox G-abels G4adio=utton GScrollPane GTabbedPane GText ield GTree
,"SC4!PT!O8 7bstract super class for Swing buttons. "ncapsulates a mutually exclusive set of buttons. "ncapsulates an icon. The S<!8; version of 7PP-"T. The S<!8; push button class. The S<!8; chec# box class. "ncapsulates a combo box . The S<!8; version of a label. The S<!8; version of a radio button. "ncapsulates a scrollable window. "ncapsulates a tabbed window. The S<!8; version of Text field. "ncapsulates a tree based'control.
( Icons 9 !cons are encapsulated by the !mage !con class, which paints an icon from
an image.
6@
( -Label 9 -abels are the instances of the G-abel class which extends GComponent.
!t can display text or icon. These are passive controls that do not support any interaction with the user.
( -(ree ' !t is a component that presents a hierarchical view of data. 7 user has
ability to expand individual subtrees. These are implemented in Swing by GTree class.
6A
6B
'&"+S LA0&*(
61
#$LC&+$ #I%D&#
60
*S$"1ID
>D
&P(I&% #I%D&#
>+
PA"C$L '&"+
>6
>>
>?
>@
$1CA"D '&"+
>A
'&"AI % +AIL
>B
>1
LI+I(A(I&%S
7lthough ! have tried to do the best and try to do well all the things that are possible in a Payroll System, but still the system contains some of the limitations. The reason of these limitations is the time constraints. Time is the ma%or problem. ! have to deliver the pro%ect in a particular time period. ThatFs why ! have to leave some topics that actually ! want to cover, ! am still wor#ing on this software and my next goal is to remove these limitations and develop a more efficient and elegant system. -imitations of the system&' ( this pro%ect does not support *ulti'3ser System. ( the information of expenses is not included in this pro%ect. 7fter removing these and other minor limitations ! hope this pro%ect will be very efficient and effective.
>0
Conclusion
The computer program (')S* )FF CE MANA+EMEN* S,S*EM- has been designed basically for the government departments, private companies and other institutions. =y entering the re$uired data one can easily generate the information about the customer and all the old records as well as other services provided through the system. 7s provided in the introduction we can do many re$uired wor#s on it but it is not based on a particular post office management system as common idea is ta#en into consideration while preparing this pro%ect so to implement it to any post office it may re$uire some modifications as per the re$uirements. Still surely it will be provided as a great help to any post office system and will automate hisRher wor# completely motivating them to wor# more efficiently.
?D
.I.LI& "AP!0
+. G6S" Specification 9 www.sun.com 6. G7576 9 )erbert Schildt >. =eginning G7576/G,N+.@2 9 !vor )orton ?. Gava Programming =lac#=oot 9 )olzner @. Gava developer )and =oo# 9 =P= publication A. Programming Gava Swing 9 Shen So#owas#i B. Gava6 9 C*C 1. Programming with Gava '"'balaguruSwamy
?+