Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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 OFFICE works in every walk 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. For this
efficient software the first and the foremost thing is that all the requirements should be known before
hand and the developer should devote its effort for the completion of that requirement 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 required information of their customer.
This very handy project for any user and includes following features: -
For the help of user it displays each and every detail about required topics
The Software Development Life Cycle, as outlined by Edward Yourdon in his book modern structure
analysis (1989) has been followed in this project with minor modifications. The modified life cycle
is shown overleaf.
1. SURVEY - This activity is also known as feasibility study. It begins with a request from the
user for a new system. It involves the following: -
Identify the responsible user for a new system
Clarify the user request
Identify deficiencies in the current system
Establish goals and objectives of new system
Determine the feasibility for new system
Prepare the project charter which will guide about the remainder of the project
PRLIMINARY DESIGN – 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 major 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:
1. Automation boundary
2. Report layouts
3. Layouts of the source documents
4. Screen Layouts for the data entry form
5. Menu
The project Post office management system is created in 4GL GUI based system so that it is easy
to handle. It also increases the efficiency of the end user, because it will reduce the reluctant jobs,
which are tedious to complete. The Post office management system also has automated capability
to complete job.
2. It reduces the tedious jobs like reluctant work, long procedures, automated report generation,
up to date information.
3. It will improve the Post Office Management, since all the information is available whenever
required.
4. It provides quick processing thus helps in transaction and updating in master records can be
performed in few records.
8. Better security
9. Economical.
3. Prompts updating not possible – Changes are quite natural in all walks of life. Information
and stored data also changes from time to time. These changes should be incorporated in the
working also to keep the information up to date. However, bringing about changes through
the manual system is a slow and tedious process because of which inaccurate information
storage occurs.
4. Unplanned working – The manual system lacks the element of planned working. Records
are not properly maintained. This creates a lot of problems at times like during information
retrieval and storage.
5. Accuracy – The manual system lacks accuracy in working and a number of operations may
be performed incorrectly, the computations that are done in the organization may be incorrect
and whatever is generated in the system may be inaccurate.
6. Reliability – The reliability of the manual system is considered to be low because of the
above given reasons including the fact that ‘TO error is human’. Any task that is performed
by men, always contain the risk of errors.
3. Prompt updating of information – In the proposed system, the information will always
remain up to date as the updating will be prompt and without any efforts. This factor will be
of great importance in the proposed system as it determines the integrity of the information
stored.
4. Fast computation of information – The computation of information will be quite fast in the
proposed system. Not only mathematical calculations, but also logical comparisons will be
quick in the new system.
5. Planned approach toward working – The working 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.
6. Accuracy – The level of accuracy in the new proposed system would be higher. All
operations and computations would be done correctly and this will ensure that whatever
information is coming from the center, it is accurate.
7. Reliability – 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.
8. Non-Redundant Information – In the new system, utmost care be taken 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 make those changes easily as
the change would have to be made only at that very place and no where else.
128 MB of RAM
Java Run Time Environment (JRE) – jdk1.5 (As Front End Tool)
The Front end is the software, which manages the logical representation of data, which Back end
manages to manipulate and store data.
Introduction
What is java?
Java tools
In order to write java application or applets, one needs more than a language. The tools that lets one
to write, test, debug programs.
Java features
Compiler and Interpreted
Platform independent
Simple
Secure
Familiar
Portable
Object-Oriented
Robust
Multithreaded
High performance
Distributed
Dynamic
Compiler and Interpreted - There is a java compiler, named javac. The java compiler takes input
source code files (these files typically have the ext.java) and converts them into compiled bytecode
files. The java Interpreter known as javac can be used to execute java application .The interpreter
translates bytecode directly into program actions.
Platform independent - Java 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 java programs.
Simple - Java is designed to be easy for programmer to learn and use efficiently.
Secure- When we use a java compatible web browser, we can safely download java applets without
fear of virus infection. Java achieves this protection by confining a java program to java execution
environment and not allowing it access to other parts of the computer.
Portable- Java compiler generates bytecode instructions that can be implemented on any machine
and also the size of the primitive data types are machine independent.
Object-Oriented - Java is a true object-oriented language. All program code and data reside within
objects and classes.
Robust -It provides many safeguards to ensure reliable code. It has strict compile time and run time
checking for data types. Designed as a garbage-collected language relieving the programmers and
also incorpates the concept of exception handling which captures series errors.
Multithreaded - Java supports handling multiple tasks simultaneously, this greatly improves the
interactive performance of graphical applications.
High performance - Java performance is impressive for an interpreted language, mainly due to use
of immediate bytecode. Use of multithreaded and further its architecture are also designed to reduce
overheads during runtime.
Distributed - It has ability to share both data and programs. Java applications can open and access
remote objects on Internet, which enables multiple programmers at multiple remote locations to
collaborate and work together on single project.
Dynamic - Java is capable of dynamically in new class libraries, methods and objects .It supports
functions written in other languages like C, C++ called as native methods.
Automatic garbage collection - One idea behind Java's automatic memory management model is
that programmers should be spared the burden of having to perform manual memory management.
In some languages the programmer allocates memory to create any object stored on the heap and is
responsible for later manually reallocating that memory to delete any such objects. If a programmer
forgets to reallocate memory or writes code that fails to do so in a timely fashion, a memory leak can
occur: the program will consume a potentially arbitrarily large amount of memory. In addition, if a
region of memory is de allocated twice, the program can become unstable and may crash.
In Java, this potential problem is avoided by automatic garbage collection. The programmer
determines when objects are created and the Java runtime is responsible for managing the objects'
lifecycle. The program or other objects can reference an object by holding a reference to it (which,
from a low-level point of view, is its address on the heap). When no references to an object remain,
the Java garbage collector automatically deletes the unreachable object, freeing memory and
preventing a memory leak. Memory leaks may still occur if a programmer's code holds a reference
to an object that is no longer needed—in other words, they can still occur but at higher conceptual
levels.
Comparing Java and C++, it is possible in C++ to implement similar functionality (for example, a
memory management model for specific classes can be designed in C++ to improve speed and lower
memory fragmentation considerably), with the possibly cost of extra development time and some
application complexity. In Java, garbage collection is built in and virtually invisible to the developer.
That is, developers may have no notion of when garbage collection will take place as it may not
necessarily correlate with any actions being explicitly performed by the code they write. Depending
on intended application, this can be beneficial or disadvantageous: the programmer is freed from
performing low-level tasks but at the same time lose the option of writing lower level code.
Objects and Classes - An object is a software bundle of variables and related methods. Objects are
key to understanding object-oriented technology. Real-world objects share two characteristics: They
all have state and behavior. Software objects are modeled after real-world objects in that they too
have state and behavior. A software object maintains its state in one or more variables. A variable is
an item of data named by an identifier. A software object implements its behavior with methods. A
method is a function (subroutine) associated with an object. In the Java programming language, an
object can specify one of four access levels for each of its variables and methods. A class is a
blueprint that defines the variables and the methods common to all objects of a certain kind. After
you've created the class, you can create any number of objects from that class. When you create an
instance of a class, the system allocates enough memory for the object and all its instance variables.
Each instance gets its own copy of all the instance variables defined in the class.
Classes can also define class variables. A class variable contains information that is shared by all
instances of the class .A class can also declare class methods. You can invoke a class method directly
from the class, whereas you must invoke instance methods on a particular instance.
Encapsulation - Wrapping of data and methods into a single unit is known as encapsulation. It is the
most striking 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.
Inheritance - Inheritance is the process by which objects of one class acquire the property of objects
of another class. Each subclass inherits state .However, 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. It supports the concept of hierarchical classification it also provides
the use of reusability.
Polymorphism - This means the ability to take more than one form. An operation may exhibit
different behavior in different instances. The behavior depends upon the types of data used in the
operation. It plays an important role in allowing objects having different internal structures to share
external interface.
The Java Database Connectivity (JDBC) API is the industry standard for database independent
connectivity between the Java programming language and a wide range of databases – SQL
databases and other tabular data sources, such as spreadsheets or flat files. The JDBC API provides a
call-level API for SQL-based database access.
JDBC technology allows you to use the Java programming language to exploit "Write Once, Run
Anywhere" capabilities for applications that require access to enterprise data. With a JDBC
technology-enabled driver, you can connect all corporate data even in a heterogeneous environment.
The JDBC API is the industry standard for database-independent connectivity between the Java
programming language and a wide range of databases. The JDBC API provides a call-level API for
SQL-based database access. JDBC technology allows you to use the Java programming language to
exploit "Write Once, Run Anywhere" capabilities for applications that require access to enterprise
data.
JDBC Architecture
The JDBC API contains two major sets of interfaces: the first is the JDBC API for application
writers, and the second is the lower-level JDBC driver API for driver writers. JDBC technology
drivers fit into one of four categories. Applications and applets can access databases via the JDBC
API using pure Java JDBC technology-based drivers, as shown in this figure:
Left side, Type 4: Direct-to-Database Pure Java Driver
This style of driver converts JDBC calls into the network protocol used directly by DBMSs,
allowing a direct call from the client machine to the DBMS server and providing a practical solution
for intranet access.
This style of driver translates JDBC calls into the middleware vendor's protocol, which is then
translated to a DBMS protocol by a middleware server. The middleware provides connectivity to
many different databases.
The graphic below illustrates JDBC connectivity using ODBC drivers and existing database client
libraries.
This type of driver converts JDBC calls into calls on the client API for Oracle, Sybase, Informix,
DB2, or other DBMS. Note that, like the bridge driver, this style of driver requires that some binary
code be loaded on each client machine.
Sun worked with an array of companies in the industry to create and rapidly establish the JDBC API
as the industry-standard, open interface for Java applications to access databases.
Industry Momentum
Leading database, middleware and tool vendors have been building support for JDBC technology
into many new products. This ensures that customers can build portable Java applications while
choosing from a wide range of competitive products for the solution best suited to their needs.
There is a very close relationship between API and JDBC architecture and (open database
connectivity) ODBC counterparts. The JDBC –ODBC Bridge enables you to access databases using
ODBC drivers from JDBC. JDBC –ODBC Bridge effectively translate the JDBC API calls into the
corresponding ODBC calls. ODBC drivers are available for almost all types of databases. JDBC can
access almost all databases. Because of their common ancestry they share some important
components:-
Driver Manager: Loads database drivers and manages the connections between the
application and the driver
Driver: Translates API call into operations for a specific data source
ResultSet: Logical set of columns and rows of data returned by executing a statement
Key Features
Full Access to Metadata: The JDBC API provides metadata access that
enables the development of sophisticated applications that need to understand the underlying
facilities and capabilities of a specific database connection.
In addition to this important advantage, Data Source objects can provide connection pooling and
distributed transactions, essential for enterprise database computing. This functionality is provided
transparently to the programmer.
As a core part of the Java 2 Platform, the JDBC API is available anywhere that the platform is. This
means that your applications can truly write database applications once and access data anywhere.
The JDBC API is included in the Java 2 Platform, Standard Edition (J2SE) and the Java 2 Platform,
Enterprise Edition (J2EE), providing server-side functionality for industrial strength scalability.
Data Definition Language (DDL) –DDL statements are used to describe the tables
and the data they contain. The subset of SQL statements used for modeling the structure
(rather than the contents) of a database or cube. The DDL gives you the ability to create,
modify, and remove databases and database objects.
Data Manipulation Language (DML) – DML statements that are used to operate on
data in the database. These are statements that allow you to create or alter objects (such as
tables, indexes, views, and so on) in the database. The subset of SQL statements used to
retrieve and manipulate data. DML can be further divided into 2 groups:-
Select - SQL statement used to request a selection, projection, join, query, and so on, from a SQL
Server database.
Primary key – Primary key constraints identify the column or set of columns whose values
uniquely identify a row in a table. No two rows in a table can have the same primary key value. You
cannot enter a NULL value for any column in a primary key.
Insert - The Insert logical operator inserts each row from its input into the object specified in the
Argument column. To insert the data into a relation we either specify a tuple to be inserted or write a
query.
Delete - The Delete logical operator deletes from an object rows that satisfy the optional predicate in
the Argument column. We can delete only whole tuples; we cannot delete values on only particular
attributes.
Update - The Update logical operator updates each row from its input in the object specified in the
Argument column. It 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.
The AWT package allows you to develop window-like applications. It allows your applications to
run on different windowing systems. The classes in AWT package will allow you to:-
Generate Colors.
Draw graphics.
Add GUI components like push buttons, scrollbars etc to your applications.
Handle user input from mouse and keyboard.
Create Containers.
Classes like Layout Managers helps in automatically positioning a GUI object when we add
it to the container.
SWING
SWING is a set of classes that provides powerful and flexible functionality. In addition with several
components provided by AWT, swing supplies several exciting additions, including tabbed panes,
scroll panes, trees and tables. It also changes the images as the state of any component changes.
Swing is built upon the foundation of the AWT. Swing components are written entirely in Java and
therefore are Platform-independent .Swing is also termed also light-weight and provide pluggable
look and feel. There are 2 Swing classes that are quite important:
Jframe and Component – Jframe extends the AWT class Frame. It contains additional features that
enable it to support Swing components. JComponent extends the AWT component and Container
classes. It is the top level class for all Swing components and provides Swing pluggable look and
feel.
Here are some of the Swing component classes:
Sr.
Control & Description
No.
JLabel
1
A JLabel object is a component for placing text in a container.
JButton
2
This class creates a labeled button.
JCheckBox
3
A JCheckBox is a graphical component that can be in either an on (true) or off (false) state.
4 JRadioButton
The JRadioButton class is a graphical component that can be in either an on (true) or off
(false) state. In a group.
JList
5
A JList component presents the user with a scrolling list of text items.
JCombox
6
A JComboBox component presents the user with a to show up menu of choices.
JTextField
7
A JTextField object is a text component that allows for the editing of a single line of text.
JPasswordField
8
A JPasswordField object is a text component specialized for password entry.
JTextArea
9
A JTextArea object is a text component that allows for the editing of a multiple lines of text.
ImageIcon
10 A ImageIcon control is an implementation of the Icon interface that paints Icons from
Images
JScrollbar
11 A Scrollbar control represents a scroll bar component in order to enable user to select from
range of values.
JOptionPane
12 JOptionPane provides set of standard dialog boxes that prompt users for a value or informs
them of something.