Upload
conversehelpdesk
View
221
Download
0
Embed Size (px)
Citation preview
8/10/2019 Introdution About Project 1
1/32
Page | 1
PROJECT REPORT
ON
TELEPHONE DIRECTORY
IN ADVANCED JAVA
SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENT FOR
THE AWARD OF MASTER COMPUTER APPLICATION
(mCA)
PUNJABI UNIVERSITY PATIALA
(2013-2014)
SUBMITTED BY
NISHTHA GANDHI
NEHA SUBMITTED TO
8/10/2019 Introdution About Project 1
2/32
Page | 2
INTRODUCTION TO JAVA
Java is the most happening career option in IT as Java
professionals are premium class professionals. According to the
recently published industry reports, Java is the fastest growing
programming environment in the world. The demand for Java
professionals has increased tremendously and is further expected
to grow exponentially. The driving force behind is the Javas
cross-platform functionality, which makes it the ideal platform
for network computing from servers to cell phones to smart cards.
So, career opportunities in Java exist in the areas of Mobile
Computing, Wireless Applications, Web-Development and
Application Development. A casual survey of job sites will show
the tremendous job potential coming in the sector of Java-
Development. While Core Java Programming provides only the
basics of the subject, Advanced Java Development prepares
students to do actual programming in Java. After studying at theadvanced level, students can take up Java as their career. For
such career, they must also obtain certification in this sector
certification is strong evidence of your efficient knowledge of the
subject. Certification for Java is provided by Sun Microsystems.
8/10/2019 Introdution About Project 1
3/32
Page | 3
Characteristics of Java
Object Oriented:
Java is object oriented to the truest sense of the word.
Everything in Java is represented as objects. Variables andmethods both are encapsulated in objects. Java is the purestobject-oriented language.
Robust:
1.Java is a very robust language owing to the followingfeatures.
2.
Excellent exception handling facilities.3. Memory management relief for the user. User does not haveto worry about allocation and deallocation of memory.
4.Strict compile-time and runtime checks for data types.
Portable and Architecture-neutral Platform
Independent):
J
ava is portable and platform independent so much that theysatisfy write once;run anywhere, anytime, forever. This featureis implemented in the following ways:
5. Compiler generates machine independent byte-codeinstructions which can be run on any machine supportingJava Virtual Machine.
6.Size of primitive data type is machine independent.
Multithreaded:
7. Programs can do many things simultaneously using differentthreads.
8.Provides a solution for multiprocess synchronization.9.Allows the creation of networked and interactive programs.
8/10/2019 Introdution About Project 1
4/32
Page | 4
Distributed:
10. Open access to remote objects by the use of RMI(RemoteMethod Invocation).
11.Brings a level of abstraction to client/server programming.
Secure:
12.Security is achieved by confining a java program to the javaexecution environment and not allowing access to otherparts of the user computer.
13.Absence of pointers provide memory related security asencroachment of memory is avoided Proper measures for
prevention of viral infection and malicious intent.Dynamic and Extensible:
14. Facilitates linking in of new classes, objects andmethods.
15.Supports native methods (methods written in other languageslike C ,C++).
16. Programs carry with them a substantial amount of
runtime type information that is used to verify and resolveaccesses to objects at run-time.
High Performance:
Just-In-Time (JIT) compilers are used to convert byte-code into native machine code resulting in very highperformance. These JIT compilers can be used on a real time, piece
by piece demand basis to perform on-the-fly compilation of byte-code into native-code.
8/10/2019 Introdution About Project 1
5/32
Page | 5
JAVA SWINGS
"Swing" refers to the new library of GUI controls (buttons, sliders,checkboxes, etc.) that replaces the somewhat weak and inflexibleAWT controls.
The Swing classes eliminate Java's biggest weakness: its relativelyprimitive user interface toolkit. Java Swing helps you to take fulladvantage of the Swing classes, providing detailed descriptions ofevery class and interface in the key Swing packages. It shows youhow to use all of the new components, allowing you to build state-of-the-art user interfaces and giving you the context you need tounderstand what you're doing. It's more than documentation;
Java Swing helps you develop code quickly and effectively.
1. Main New Features
1. Lightweight. Not built on native window-system windows.2. Much bigger set of built-in controls.: Trees, image buttons,
tabbed panes, sliders, toolbars, color choosers, tables, textareas to display HTML or RTF, etc.
3.
Much more customizable. Can change border, text alignment,or add image to almost any control. Can customize howminor features are drawn. Can separate internalrepresentation from visual appearance.
4."Pluggable" look and feel. Can change look and feel atruntime, or design own look and feel.
5. Many miscellaneous new features. Double-buffering built in,tool tips, dock able tool bars, keyboard accelerators, custom
cursors, etc.2. Components are named JXxx.
E.g. JFrame, JPanel, JApplet, JDialog, JButton, etc.
8/10/2019 Introdution About Project 1
6/32
Page | 6
J Component
The J Component class is the root of the Visual component classhierarchy in JFC. All Swing components are implemented assubclass of J components class, which inherits from the Container
class. Swing component inherit the following functionality from JComponent
a). Borders- Using the setBorder() method, you can specify theborder that a component displays around its edges. You canspecify that component have extra space around its edges usingan EmptyBorder instance.
b). Double Buffering- It can improve the appearance of frequentlychanging components. Now you do not have to write the doublebuffering code because Swing provides it for you. By defaultSwing components are double buffered.
c).Tool Tips- By specifying a string with the setToolTipNext()method, you can provide help to users of a components. When thecursor pauses over the components, the specified string isdisplayed in small window near the component.
d).Look and Feel- Subject to the security restriction, you canchoose the look and feel used by all Swing components by invokingthe UIManager.setLookAndFeel() method.
3. There is an almost-equivalent Swing component for most AWTcomponents.
4. Instead of adding components directly to frames or applets, wecan use the content pane.
1. Add to content pane via getContentPane().add2. Replace content pane via setContentPane
8/10/2019 Introdution About Project 1
7/32
Page | 7
5. Model-View-Controller architecture let us change the internaldata representation for lists, trees, tables, etc.
6. Swing was in the com.sun.java.swing package in beta releasesof 1.2. Switched to javax.swing in 1.2 final.
7. Default "look and feel" is a Java-specific one.
1. Need special call to get native look2. Default called "Java look & feel"
8. Mixing AWT and Swing is doomed.
AWT components are always on top, and z-ordering problems
catch you in many unexpected ways. Stick with the AWT or movecompletely to Swing.
JDBC
The JDBC is a set of the database access classes. The very termJDBC stands for Java Database Connectivity. It was developedby Java Soft. JDBC technology is an API (Application Program
Interface) that allows virtual access to any tabular data sourcefrom the Java programming language by means of someconnecting software called Drivers. It provides cross-DBMSconnectivity to a wide range of SQL databases. JDBC defines a setof interfaces to enable developers to access data independently ofthe actual database product used to store the data. JDBC allowJava applets, Servlets, and application to access data in famousdatabase management systems.
It also provides access to other tabular data sources, such asspreadsheets or flat files. The JDBC API allows developers to takeadvantage of the Java platform's "Write Once, Run Anywhere"capabilities for industrial strength, cross-platform applicationsthat require access to enterprise data. With a JDBC technology-enabled driver, a developer can easily connect all corporate data
8/10/2019 Introdution About Project 1
8/32
Page | 8
even in a heterogeneous environment. The JDBC API is theindustry standard for database-independent connectivity betweenthe Java programming language and a wide range of databases.The JDBC API makes it possible to do three things:
1.
Establish a connection with a database or access any tabulardata source
2. Send SQL statements3. Process the results
Steps in using JDBC
1. Create a Connection type of object (A) denoting a connectionto the database.
2.
Create a Statement type of object (B) using the A.3. Use B to execute either update the database or send a query
request.4.The result of the query operation in step 3 is a Result Set type
of object(C)5. C is actually a small table (D) consisting of the result of the
query.6.D can be handled according to the user needs7.
Close C,B and A
SQL
SQL stands for Structured Query Language, better known assequel. It is used for:
1. querying a database by editing the SQL statements.
2. querying a database within a program
3. defining data organization.
4. administrating data
8/10/2019 Introdution About Project 1
9/32
Page | 9
5. accessing multiple data servers
6. managing transaction.
JDBC ARCHITECTURE
The JDBC API contains two major sets of interfaces:
1.JDBC API for application writers2. Lower-level JDBC driver API for driver writers
JDBC drivers are divided into four types or levels. Each typedefines a JDBC driver implementation with increasingly higherlevels of platform independence, performance, and deployment
administration. The four types are:
1. Type 1: JDBC-ODBC Bridge2. Type 2: Native-API/partly Java driver3. Type 3: Net-protocol/all-Java driver4.Type 4: Native-protocol/all-Java driver
Type 1: JDBC-ODBC Bridge
The type 1 driver, JDBC-ODBC Bridge, translates all JDBC callsinto ODBC (Open Database Connectivity) calls and sends them tothe ODBC driver. As such, the ODBC driver, as well as, in manycases, the client database code, must be present on the clientmachine. Figure 1 shows a typical JDBC-ODBC Bridgeenvironment.
AVA APPLICATION
DBC DRIVER MANAGER
DBC/ODBC
8/10/2019 Introdution About Project 1
10/32
Page | 10
BRIDGE
ODBC
DRIVER
DATABASE
Figure 1. Type 1: JDBC-ODBC Bridge
Pros: The JDBC-ODBC Bridge allows access to almost anydatabase, since the database's ODBC drivers are alreadyavailable. Type 1 drivers may be useful for those companies thathave an ODBC driver already installed on client machines.
Cons: The performance is degraded since the JDBC call goesthrough the bridge to the ODBC driver, then to the nativedatabase connectivity interface. The result comes back throughthe reverse process. Considering the performance issue, type 1drivers may not be suitable for large-scale applications.
The ODBC driver and native connectivity interface must alreadybe installed on the client machine. Thus any advantage of using
Java applets in an intranet environment is lost, since thedeployment problems of traditional applications remain. We have
used JDBC-ODBC Bridge Type Drivers
REQUIRED ANALYSIS
For analysis of requirement for the software to be developed firstof all we set some guidelines and following those only we start
analyzing in specific manner. The whole analysis work is dividedin following activities:
1. Problem Recognition2. Problem Evaluation and Solution Synthesis3. Modeling
8/10/2019 Introdution About Project 1
11/32
Page | 11
4.Creation Of Specification5. Review Of Analysis
Problem Recognition:
1.
We deeply assess the use and technical feasibility of thesoftware to be developed2. We meet the users and select all the persons who will be
helping in specifying requirements and then understandtheir organizational bias.
3. Then we define the technical environment into which theproduct or system was to be placed of the software.
4.Then we identify the Domain Constraints i.e the specific
environment needed for effective application. This helps us tolimit the functionality and performance of the software.5. We choose the team meeting with users to elect one or more
requirement.
Problem Evaluation and Solution Synthesis:
1. We observe all the data objects to be used by us andaccording to requirement.
2.
Then according to the objects and functions we haveanalyzed we now decided the flow of the information as perthe requirements
3. Then we define the software functions which we must maketo obtain the flow and results with the data and achieve theprojects objective.
4.
Now we analyze the behavior of the software in context withthe software after defining all above tasks so as to fix the
performance.5. Now we planned and analyzed the way which we must
apply to have the asked type of user interface as per demandof the functions and data flow we have decided to use.
6.Now we decide the requirements keeping in mind the systemspecifications. Also keeping in mind the information which
8/10/2019 Introdution About Project 1
12/32
Page | 12
we have to input to and output from the system so as toachieve the proper connectivity and transparency regardingthe data.
Modeling:
1. The modeling is performed by designing the DFDs for all thepossible states of the software.
Creation Of Specification:
The specifications were made as per the design analysis. It wasconfirmed that:
2.
Is each requirement consistent with the product design?3. Is the requirement really necessary or just the add-onfeature?
4.Does any requirement conflicts with the other requirements?5. Is the requirement achievable in the specific technical
environment?
Review Of Requirements:
In this stage we just review all the requirements listed by us andsee arent we missing any one during our calculation and logicplannings. Here also we follow some basic guidelines:
1. Here we study the function and performance of computerbased system and the constraints.
2. The final statement of requirement was examined by theoriginal sources.
3.
All the requirements related with a particular are listed independency traceability.
4.The requirements which were testable were marked withtests to exercise the requirements later.
5. It was made clear that the requirement is traceable tooverall system/product objectives.
8/10/2019 Introdution About Project 1
13/32
Page | 13
FEASIBILITY ANALYSIS
Introduction of Feasibility Study:
Many feasibility studies are disillusions for both user and
analysts. First , the study often presupposed that when thefeasibility of a document is being prepared, the analyst is in aposition to evaluate solution. Second, most studies tend to overlookthe confusion inherent in the system development. If thefeasibility study is to serve as a decision document, it mustanswer three questions
1. Is there a new and better way to do the job that will benefit
the user?2. What are the costs and saving of the alternative(s)?3. What is recommended?
The most successful system projects are not necessarily the biggestor most visible in a business but rather those that truly meet userexpectations. Most projects fail because of inflated expectationthan for any other reason.
Feasibility Study:
As not every imagination is feasible, not even in software,evanescent a sit may appear to outsiders. On the contrary,software feasibility has five solid dimensions:
Technical Feasibility
Is the prepared technology practical? Technical feasibility centersaround the existing computer system and to what extent it cansupport the proposed addition. But in this case since earlier all thework was manual and there was no existing system, so the systemproposed is technically feasible. Also, the new system should bebrought according to the specification of the product beingdesigned.
8/10/2019 Introdution About Project 1
14/32
Page | 14
Operational Feasibility
Is the problem worth solving? Will the solution to problem work?The answer to the above question is yes. As the problem is worthsolving because the manual work is very inefficient and from the
statement of the problem gives us a clue that there is a solution tothe problem and there are pretty good chances that the solutionwill work.
Economic Feasibility
It is used to measure the cost effectiveness of a project which iscommonly known as cost-benefit analysis. The project is alsoeconomically feasible as the only requirement involving expensesare related to the cost of buying a new system and a printer forthe hard copies. And the maintenance involved in this is only themaintenance of the computer and that does not cost much. Soaccording to the requirements the system is economically fit.
Legal Feasibility
Legal feasibility means that the software developed is legal; it isnot violating any governmental constraints and it is following allthe legal laws. Since the project is developed for use within aparticular college only, it can by no mean violate any legal laws.
Therefore, it is said to be legally feasible too.
Behavioral Feasibility
Behavioral feasibility is an estimate of how strong reaction theuser staff is likely to have towards the development of a computersystem. Since this project lightens the burden of the manual workin the cell, so the end users of the software will always be
8/10/2019 Introdution About Project 1
15/32
Page | 15
encouraging towards the use of computer. Also, no jobs are goingto be replaced in this case.
DESIGN ANALYSIS
Designing is the most important part of the software developmentlifecycle. It requires careful planning and logical thinking on thepart of the software designer. Designing the software means howthe various parts of the software are going to meet the userrequirement and goals. It should be done with utmost care as asimple mistake or miscalculation at this stage can result in errorswhich can be compounded manifold as the development processmoves up the development hierarchy. This compounded error can
result in low performance, more processing time, and more codingand extra load.
System Design attempts to accomplish the following:
1. Improve productivity of analysts and programmers.2. Improve documentation and subsequent maintenance and
enhancements.3. Cut down drastically on cost over runs and delays.4.
Improved communication among the users ,analysts,designers and programmers
5. Standardize the approach to analysis and design6.Simplify design by segmentation
The java.sql PACKAGE
The implementation of JDBC is made through the java.sql
package. This package contain all the JDBC classes and methodthat allows the developers to create databases application .Thetopmost class in the class hierarchy of JDBC classes is theDriverManager, which keeps the driver information, stateinformation and more. When each driver is loaded, it is registeredwith the DriverManager. Whenever a connection is made, the DriverManager selectsthe driver depending on JDBC URL.
8/10/2019 Introdution About Project 1
16/32
Page | 16
CREATING DATA SOURCE NAME (DSN)
Before starting the program using JDBC ODBC bridge drivers, create tables inMicrosoft Access according to requirement. Let its name be emp and fields ename,
design, hiredate, deptno.
Now lets create a DSN by name empdb, which we will use in the program based onJDBC ODBC drivers. The steps to create DSN are given below
1. Goto Control panel, click on Administrative Tool and then click on ODBC DataSources as shown in figure 2 and 3.
Figure 2. Selecting Administrative Tool
8/10/2019 Introdution About Project 1
17/32
Page | 17
Figure 3. Selecting ODBC
2. Click on Add button of User DSN as shown in figure 4
Figure 4
3. Select Microsoft Access Driver & then click Finish as shown in figure 5
8/10/2019 Introdution About Project 1
18/32
Page | 18
Figure 5. Selecting Microsoft Access Driver
4. Write Data Source name as db and click on Select button then select .mdb file where
it is stored and click on OK as shown in figure 6 and 7.
Figure 6
8/10/2019 Introdution About Project 1
19/32
Page | 19
Figure 7
5. Now at last click on OK as shown in figure 8.
Figure 8
8/10/2019 Introdution About Project 1
20/32
Page | 20
8/10/2019 Introdution About Project 1
21/32
Page | 21
1.Open the first page of project.show many
buttons..show,insert,delete,update,search,exit. Click any button
open the information
2.click show button .open telephone directory data.
8/10/2019 Introdution About Project 1
22/32
Page | 22
3.click the insert button.than enter name and password.than enter
insert the data.
8/10/2019 Introdution About Project 1
23/32
8/10/2019 Introdution About Project 1
24/32
Page | 24
5.click the update button.than update telephone dirtectory data.
Click the update button
8/10/2019 Introdution About Project 1
25/32
Page | 25
6.click the search button.enter user id.than show the data.if userid
is exit than show .if userid is not exit than no show data.
8/10/2019 Introdution About Project 1
26/32
Page | 26
7.click the exit button than exit the project.
QUALITY ASSURANCE
There are basically three levels of Quality Assurance, namely,testing, validation and certification. Each of these is describedbelow:
1 Testing
The purpose of system testing is to identify and correct errors inthe system and also to judge if the system meets therequirements of the user or not. There are three levels of systemtesting. They are as follows:
8/10/2019 Introdution About Project 1
27/32
Page | 27
Unit Testing:
This type of testing focuses on the verification of the smallest unitof software design namely the module. Using the proceduraldescription as a guide, important control paths are tested to
uncover the errors within the boundary of a module. Unit testingis normally white-box oriented, and the steps can be conducted inparallel for multiple modules. In this project the sub-modules havebeen individually tested.
Following checks were made:
1. Given set of data was taken as input to the module and theoutput was observed
2.
Logic and boundary conditions for input and output werealso checked
3. Interfaces between two modules were also checked4.Runtime Exceptions were thrown which were detected and
rectified by taking the Stack Trace5. Also all the possible situation were anticipated with the help
of the user to conduct thorough tests of the system.
Integration Testing:
In this type of testing the main aim is to take the unit testedmodules and build a program structure which can be directed anddictated by the design.
This includes:
1. Top-down Testing
2.
Bottom-up testing3.
Regression Testing
The last of the above was particularly important in this projectwhich helped in ensuring changes without introducingunintended behavior in addition.
8/10/2019 Introdution About Project 1
28/32
Page | 28
System Testing:
This type of testing consists of a series of tests whose primarypurpose is to fully exercise the computer based system all workto verify that system elements have been properly integrated and
that they perform specified functions.
When the individual program modules are working, we combinedthe modules into single working system. This integration wasplanned and conducted in such a way that whenever an erroroccurs we get an idea about the source of it.
The entire system was viewed as a hierarchy of modules. Webegan with the module at the highest level of design and workeddown. Then the next modules to be tested were those that calledpreviously tested modules.
Functional Testing:
Once it was certain that information passed between modulesaccording to the design description, the system was tested toassure whether the functions describing the requirement
specification were performed by the system.
Acceptance Testing:
When the functional test completes. The user gets involved tomake sure that the system works according to the usersexpectation.
2 Validation
System validation checks the quality of the software in bothsimulated and live environments.
IMPLEMENTATION
1 Hardware Requirements:
8/10/2019 Introdution About Project 1
29/32
Page | 29
Pentium III / IV Processor
256 MB RAM or higher
Printer
Mouse
Keyboard
2 Software Requirements:-
Microsoft Access
Jdk1.3 or higher version
Notepad
3 Installation:
The component comprises of several Java Classes, some image files(Java Archive).
To start using this component,
- we will save the java files in bin folder of jdk1.5.
- Provide necessary database connection details and informationabout the URLs.
- Install Microsoft-Access in system.
- And save the various tables used in the project.
UNIQUE FEATURES OF THE COMPONENT
Platform independent
The component is mostly developed using Java Technology whichis essentially Platform Independent. The fact that on compilation
8/10/2019 Introdution About Project 1
30/32
Page | 30
java files get converted into machine independent byte-codemakes it a cross-platform technology. The byte code can then berun on any machine having the JVM (Java virtual Machine).
It becomes very easy to reuse the component .Thus it is a
completely pluggable component which can be plugged into anyother related system with very little modification.
Users can perform their operations asynchronously as relationaldatabase tables are used at the back end, which support dataintegrity and uniformity
Concurrent access anomaly problem is also taken care of.
Highly flexible and customizable
This component can work with any database connection as priorto installation; users have to provide their database configuration
When the application is first started, the user is asked to provideall the information regarding the kind of database, username,
password etc.
Enterprise Independent
This is a Enterprise Independent Product. So the component canwork for any legacy system. The users just have to provide theconnection (Database) name where their tables are stored. Thecomponent can then easily customize itself so as to work in
conjunction with the legacy system.Any no. of connections can be used in the component. The tablecan have any number of fields. Irrespective of the type andnumber of columns in the legacy table, the component can worksuccessfully.
8/10/2019 Introdution About Project 1
31/32
Page | 31
The extensive use of graphical representation makes thecomponent simple and easy to work with. The GUI is simple yetpowerful. The whole hierarchy of the product is represented as atree. The various branches of the tree represent the physicalbranches of the organization. The root of the tree represents the
Database of the organization. The leaf nodes represent the tablespresent in a store -room. The layout of a particular node is
represented graphically on a simple mouse click. The view can beeither front-view, back-view or cross-sectional view. The racks,levels and the cells can be customized graphically; the results aredisplayed in Graphical form
SECURITY OF THE SYSTEM
The following levels of security were provided in order to guardagainst unauthorized and malicious use, modification anddestruction of data.
Data Level:
At each functional stage the users have access to only those
portions of the data that are necessary for those functions.
Application /Functionality Level:
Only authorized users are allowed to get involved in thisapplication. Moreover a particular functionality on theapplication is allowed to be used by only those users to whom
permission has been granted to access and use it.
8/10/2019 Introdution About Project 1
32/32
CONCLUSION
The preparing of the project we realized it that today world
is full of the cut throat competition and the fittest is the todaymantra. For one survival in the corporate world, one has to
honest and has to satisfy his senior and contemporize by
showing supreme dedication and intelligence. Thus it is very
important that one is emergence of the new technologies at very
sort intervals to each other further increase the competition
and fascinated me as an student of the computer engineering.
As Member of the project we have study the advanced java and
new technologies for preparing the project .We easily analyzed
the working atmosphere of the project was very good and
vibrant. All the members of the project show good interest and
heartily complete the project successfully.