70
 Submitted to Punjab Technical University UNIVERSITY , For the partial fulfillment of requirement for the Degree of Supervised By: Submitted By:  Mr.Sandeep Singh Academic Head Reg.No

Placement Office

Embed Size (px)

Citation preview

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 1/70

 

Submitted to Punjab Technical University UNIVERSITY ,

For the partial fulfillment of requirement for 

theDegree of 

Supervised By:

Submitted By:  Mr.Sandeep SinghAcademic HeadReg.No

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 2/70

 

Computek Educational Services

 Jalandhar

CERTIFICATE

   This is to certify that the application software 

” ”Placement Cell is a bonified work carried out 

  jointly by abc under my guidance and hence are 

eligible to appear in the practical Examination 

.under ptu university

 roject Incharge

( . )Mr Sandeep Singh

 Academic Head

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 3/70

ACKNOWLEGEMENT

 A  person always requires guidance and help of  

others being a Social animal to achieve success in 

/ .his her mission

, . ,First we thank my teacher Mr Sandeep Singh for 

.his continuous support in the project work Sir was 

.always there to listen and to give advice He is 

responsible for involving this project in the first 

.place He taught us how to ask questions and 

.express my ideas He showed us different ways to 

approach a research problem and the need to be 

.persistent to accomplish any goal Special thanks goes to our friends who is most responsible for 

helping us to complete the writing of this 

dissertation as well as the challenging research 

.that lies behind it They brought out the good 

. ,ideas in us in project work More importantly they 

.taught us how to work hard and play hard

abc

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 4/70

 YSTEM DESIGN

 HARDWARE REQUIREMENTS

• :-Processor Requirement

-P IV or Dual Core

• :-HDD Requirements

  40 1Min GB for system and GB for application

• :-RAM

512Minimum of MB or higher is 

.recommended

• :-Monitor

 Intel or another better graphics mode

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 5/70

• :-Secondary Devices

  - 52 ( )CD ROM x For installation of program

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 6/70

 SOFTWARE REQUIREMENTS

• :-Platform Requirement

98/ /2000/ /Windows ME XP NT

• :-Front End Software

  6 Java

• / :-Back End Package Database

2003Microsoft Access

:-Internet Browser

  It required minimum Microsoft Internet 

Explorer

• :-Application Run Mode

  Dos prompt

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 7/70

 ntroduction to Java

-  Java is an object oriented programming language 

-with a built in application programming interface 

( )API that can handle graphics and user interfaces 

and that can be used to create applications or 

. ' ,applets Because of its rich set of API s similar to 

,Macintosh and Windows and its platform 

,independence Java can also be thought of as a 

.platform in itself Java also has standard libraries 

.for doing mathematics

 Much of the syntax of Java is the same as C and 

++.C One major difference is that Java does not 

. ,have pointers However the biggest difference is 

.that you must write object oriented code in Java  

Procedural pieces of code can only be embedded 

.in objects In the following we assume that the 

reader has some familiarity with a programming 

. ,language In particular some familiarity with the 

/ ++ .syntax of C C is useful

,In Java we distinguish between applications which 

are programs that perform the same functions as 

,those written in other programming languages and 

,applets which are programs that can be 

embedded in a Web page and accessed over the 

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 8/70

.Internet Our initial focus will be on writing 

. ,applications When a program is compiled a byte 

code is produced that can be read and executed 

.by any platform that can run Java

,Compared to other programming languages Java is 

.most similar to C However although Java shares 

' , .much of C s syntax it is not C Knowing how to 

, , ++,program in C or better yet C will certainly help 

, 'you to learn Java more quickly but you don t need 

. ++to know C to learn Java Unlike C Java is not a 

. 'superset of C A Java compiler won t compile C 

,code and most large C programs need to be 

changed substantially before they can become 

.  Java programs

'What s most special about Java in relation to other 

programming languages is that it lets you write 

special programs called applets   that can be 

downloaded from the Internet and played safely 

.within a web browser Traditional computer 

programs have far too much access to your 

- .system to be downloaded and executed willy nilly  

Although you generally trust the maintainers of  various ftp archives and bulletin boards to do 

basic virus checking and not to post destructive 

, .software a lot still slips through the cracks Even 

more dangerous software would be promulgated if  

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 9/70

 any web page you visited could run programs on 

.your system You have no way of checking these 

- -programs for bugs or for out and out malicious 

.behavior before downloading and running them

   Java solves this problem by severely restricting 

.what an applet can do A Java applet cannot write 

.to your hard disk without your permission It 

cannot write to arbitrary addresses in memory and 

.thereby introduce a virus into your computer It 

should not crash your system

 eature of Java

Platform. .Independent

- - - (  The concept of Write once run anywhere known 

)as the Platform independent is one of the 

important key feature of java language that makes 

.  java as the most powerful language Not even a 

single language is idle to this feature but java is 

.more closer to this feature The programs written 

on one platform can run on any platform provided 

.the platform must have the JVM  

Simple

   There are various features that makes the java as 

.a simple language Programs are easy to write and 

debug because java does not use the pointers 

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 10/70

.explicitly It is much harder to write the java 

programs that can crash the system but we can 

.not say about the other programming languages  

  Java provides the bug free system due to the .strong memory management It also has the 

automatic memory allocation and deallocation 

.system

Object. .Oriented

,  To be an Object Oriented language any language 

.must follow at least the four characteristics

Inheritance :

It is the process of creating the new classes and 

using the behavior of the existing classes by 

extending them just to  

reuse  the existing code and adding the additional features as 

.needed

Encapsulation:

It is the mechanism of combining the 

.information and providing the abstraction

:olymorphism  

,As the name suggest one name multiple form  

Polymorphism is the way of providing the different 

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 11/70

 functionality by the 

functions  having 

the same name based on the signatures of the 

.methods

 ynamic binding:

'Sometimes we don t have the knowledge of  

objects about their specific types while writing our 

.code It is the way  

of providing the maximum functionality to a .program about the specific type at runtime  

, ++As the languages like Objective C C fulfills the 

above four characteristics yet they  are not fully 

object oriented languages because they are 

.structured as well as object oriented languages  

,But in case of java   it is a fully Object Oriented language because object is at the outer most level 

. ,of data structure in java No stand alone methods  

, .constants and variables are there in java  

Everything in java is object even the primitive 

data types can also be converted into object by 

.using the wrapper class

Robust

   Java has the strong memory allocation and 

.automatic garbage collection mechanism It 

provides the powerful exception handling and type 

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 12/70

 checking mechanism as compare to other 

.programming languages Compiler checks the 

program whether there any error and interpreter 

checks any run time error and makes the system .secure from crash All of the above features 

.makes the java language robust

Distributed

   The widely used protocols like HTTP and FTP are 

.developed in java Internet programmers can call 

functions on these protocols and can get access 

the files from any remote machine on the internet 

.rather than writing codes on their local system

Portable

- - -  The feature Write once run anywhere  makes the 

  java language portable provided that the system 

.must have interpreter for the JVM Java also have 

the standard data size irrespective of operating 

.system or the processor These features makes the 

.  java as a portable language

Dynamic

 While executing the java program the user can 

get the required files dynamically from a local 

drive or from a computer thousands of miles away 

.from the user just by connecting with the Internet

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 13/70

Secure

.  Java does not use memory pointers explicitly All 

the programs in java are run under an area known 

.as the sand box Security manager determines the accessibility options of a class like reading and 

.writing a file to the local disk Java uses the public 

key encryption system to allow the java 

applications to transmit over the internet in the 

.secure encrypted form The bytecode Verifier 

.checks the classes after loading  

Performance

,  Java uses native code usage and lightweight 

process called .threads In the beginning 

interpretation of bytecode resulted the 

performance slow but the advance version of JVM 

uses the adaptive and just in time compilation .technique that improves the performance  

Multithreaded

 As we all know several features of Java like 

, , , ;Secure Robust Portable dynamic etc you will be 

more delighted to know another feature of Java 

.which is Multithreaded   Java is also a Multithreaded programming 

.language Multithreading means a single program 

having different threads executing independently 

.at the same time Multiple threads execute 

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 14/70

 instructions according to the program code in a 

.process or a program Multithreading works the 

similar way as multiple processes run on one 

.computer  Multithreading programming is a very interesting 

.concept in Java In multithreaded programs not 

even a single thread disturbs the execution of  

.other thread Threads are obtained from the pool 

of available ready to run threads and they run on 

.the system CPUs This is how Multithreading works 

in Java which you will soon come to know in 

.details in later chapters

Interpreted

 We all know that Java is an interpreted language 

. ,as well With an interpreted language such as Java  

.programs run directly from the source code    The interpreter program reads the source code 

.and translates it on the fly into computations  

,  Thus Java as an interpreted language depends on 

.an interpreter program

   The versatility of being platform independent 

.makes Java to outshine from other languages The 

source code to be written and distributed is 

.platform independent  

Another advantage of Java as an interpreted 

.language is its error debugging quality Due to this 

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 15/70

.any error occurring in the program gets traced  

.  This is how it is different to work with Java

/rchitecture Neutral

,  The term architectural neutral seems to be weird 

but yes Java is an architectural neutral language 

.as well The growing popularity of networks makes 

.developers think distributed In the world of  

network it is essential that the applications must 

be able to migrate easily to different computer 

.systems Not only to computer systems but to a 

wide variety of hardware architecture and 

.Operating system architectures as well     The Java 

compiler does this by generating byte code 

,instructions to be easily interpreted on any 

machine and to be easily translated into native 

.machine code on the fly The compiler generates -an architecture neutral object file format to enable 

a Java application to execute anywhere on the 

network and then the compiled code is executed 

,on many processors given the presence of the 

.  Java runtime system Hence Java was designed to 

.support applications on network This feature of  

.  Java has thrived the programming language

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 16/70

 ntroduction to Microsoft 

Access

,Microsoft Office Access previously known as 

,Microsoft Access is a  relational database 

management system from Microsoft that combines 

the relational  Microsoft Jet Database Engine with a 

graphical user interface and software development 

. 2007tools It is a member of the  Microsoft Office 

.system

 Access can use data / ,stored in Access Jet Microsoft 

SQL Server, Oracle, or any ODBC-compliant data 

(container including MySQL  and PostgreSQL).

Skilled  software developers  and  data architects 

use it to develop  application software. Relatively 

unskilled programmers -and non programmer 

" "power users can use it to build simple 

.applications It supports some -object oriented 

-techniques but falls short of being a fully object

.oriented development tool

 Access was also the name of a communications 

,program from Microsoft meant to compete with 

ProComm .and other programs This proved a 

.failure and was dropped [1]    Years later Microsoft 

.reused the name for its database software

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 17/70

 A database is a collection of information relegated 

,to a particular subject or purpose such as tracking 

customer order or maintaining a music collection 

,or novels written by authors in a alphabetic order  .pin code of cities in alphabetic order etc Using 

,Microsoft access you can manage all your 

information from a single database file within the 

:dividing your data into

1. .Separate storage container called tables

2. ,View add and update table data by using online 

.forms

3. Find and retrieve the data you want by using 

.quires

4. Analyze or print data in a specific layout by 

.using reports

History

1.0 1992,Access version was released in November  

1993 1.1followed in May of by an Access release 

to improve compatibility with other Microsoft 

.products

 Microsoft specified the minimum operating system 

2.0 3.0 4for Version as Microsoft Windows v with  

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 18/70

. 6MB of RAM MB RAM was recommended along 

8with a minimum of MB of available hard disk 

(14 ).space MB hard disk space recommended The 

1.44 .product was shipped on seven MB diskettes  1993 .  The manual shows a copyright date

   The software worked well with very large records 

sets but testing showed some circumstances 

. ,caused data corruption For example file sizes 

700 (over MB were problematic note that most 

700hard disks were smaller than MB at the time 

).this was in wide use The Getting Started manual 

warns about a number of circumstances where 

obsolete device drivers or incorrect configurations 

.can cause data loss

' ;Access s initial codename was Cirrus the forms 

.engine was called Ruby This was before Visual 

Basic - Bill Gates saw the prototypes and decided 

that the BASIC -language component should be co

,developed as a separate expandable application a 

.project called Thunder The two projects were 

developed separately as the underlying forms 

;engines were incompatible with each other  ,however these were merged together again after 

VBA.

Uses

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 19/70

,Access is used by small businesses within 

,departments of large corporations and by hobby 

programmers to create  ad hoc customized desktop 

systems for handling the creation and .manipulation of data Access can be used as a 

database for basic web based applications hosted 

'on Microsoft s  Internet Information Services  and 

utilizing Microsoft Active Server Pages ASP.

 Some professional application developers use 

Access for  rapid application development,

especially for the creation of prototypes and 

-standalone applications that serve as tools for on

- .the road salesmen Access does not scale  well if  

,data access is via a network so applications that 

are used by more than a handful of people tend 

to rely on -Client Server based solutions.[citation needed] , " " (However an Access front end the 

, ,forms reports queries and VB )code can be used 

against a host of database backends, including JET 

( - ,file based database engine used in Access by 

), , ,default Microsoft SQL Server Oracle and any 

other ODBC- .compliant product

Features

 One of the benefits of Access from a 

'programmer s perspective is its relative 

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 20/70

 compatibility with SQL ( )structured query language  

—queries may be viewed and edited as SQL 

,statements and SQL statements can be used 

directly in Macros and VBA Modules to manipulate .Access tables Users may mix and use both VBA 

" "and Macros for programming forms and logic 

- .and offers object oriented possibilities

MSDE ( ) 2000,Microsoft SQL Server Desktop Engine  

- 2000,a mini version of Microsoft SQL Server is 

included with the developer edition of Office XP 

and may be used with Access as an alternative to 

the    Jet Database Engine.

-Unlike a server based RDBMS ,such as SQL Server  

Access does not implement  database triggers  or 

stored procedures. However Access provides a rich 

-programming environment through its event driven 

.forms and reports which utilize VBA Starting in 

2000 ( 4.0),Access Jet there is a new syntax for 

,creating queries with parameters in a way that 

,looks like creating stored procedures but these 

procedures are still limited to one statement per 

.procedure [2] Microsoft Access does allow forms to contain code that is triggered as changes are 

(made to the underlying table as long as the 

),modifications are done only with that form and it 

-is common to use pass through queries and other 

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 21/70

 techniques in Access to run stored procedures in 

RDBMSs .that support these

 In ADP ( 2000 ),files supported in Access and later  

-the database related features are entirely 

,different because this type of file connects to a 

,MSDE or Microsoft SQL Server instead of using the 

. ,  Jet Engine Thus it supports the creation of nearly 

(all objects in the underlying server tables with 

, ,constraints and triggers views stored procedures 

- ). , , ,and UDF s However only forms reports macros 

(and modules are stored in the ADP file the other 

- ).objects are stored in the back end database  

Creation of ADP files has been dropped in Access 

2007 ;however ADP files can still be opened and 

.run

Development

 Access allows relatively quick development 

,because of very good GUI design tools and high 

.level integration of GUI design and data objects  

, , ,All database tables queries forms and reports are 

. ,stored in the database For query development  ,Access utilizes the Query Design Grid a graphical 

user interface that allows users to create queries 

without knowledge of the SQL programming 

. ,language In the Query Design Grid users can 

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 22/70

" "show the source tables of the query and select 

the fields they want returned by clicking and 

.dragging them into the grid Joins can be created 

by clicking and dragging fields in tables to fields .in other tables Access allows users to view and 

.manipulate the SQL code if desired

,  The programming language available in Access is 

as in other products of the  Microsoft Office ,suite  

Microsoft  Visual Basic for Applications.  Two 

database access libraries of  COM components are 

:provided the legacy  Data Access Objects ( ),DAO  

(which was superseded for a time but still 

)accessible by  ActiveX Data Objects ( );ADO  

( )however DAO has been reintroduced in the latest 

, 2007.version Microsoft Access

 Many developers who use Access use the 

Leszynski naming convention, though this is not 

; ,universal it is a programming convention not a 

- .DBMS enforced rule [3] ,Except in VBA it is also 

made redundant by the fact that Access 

categorises each object automatically and always 

, :shows the object type by prefixing Table or :Query before the object name when referencing a 

.list of different database objects

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 23/70

 Microsoft Access can be applied to small projects 

( 97the Access speed characterization was done for 

32 )users [4]  but scales poorly to larger projects with 

100more than several MB of data or many users because of the way indexing and locking are 

.handled As a Microsoft Access database can be 

,cached locally when used on network processing 

speed may be substantially better when there is 

.only a single user Because of the effect of packet 

,latency on the record locking system Access 

databases are effectively too slow to be used on a 

.Virtual Private Network or a Wide Area Network  

Access includes an Upsizing Wizard that allows 

users to upsize  their database to  Microsoft SQL 

Server -if they want to move to an ODBC client

.server database

 One recommended technique is to migrate to SQL 

.Server and utilize Access Data Projects This allows 

, ,stored procedures views and constraints using 

. -standard SQL Additionally this full client server 

design significantly reduces maintenance and 

.availability problems

,Access allows no relative paths when linking so 

the development environment should have the 

(same path as the production environment though 

" - "it is possible to write a dynamic linker routine in 

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 24/70

VBA).   This technique also allows the developer to 

.divide the application among different files

Protection

 If the database design needs to be secured to 

,prevent from changes Access databases can be 

/ (locked protected and the source code compiled)

. .by converting the database to an MDE file All 

( , ,changes to the database structure tables forms  

, .)macros etc need to be made to the original MDB 

.and then reconverted to MDE

 Some tools are available for unlocking and 

'decompiling', although certain elements including 

original VBA comments and formatting are 

.normally irretrievable

 Microsoft Access calls anything that can have a 

. ,name an object Within an Access Database the 

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 25/70

, , , ,main objects are tables queries forms reports  

, , .data access pages macros and modules

 Main Components of MSAccess

 Database

 A database is files in which you store data include 

;all the major objects related to the stored data  

including objects you define to automat the use of  

. ,your data In other database systems the term 

database used to refer to only those files in which 

.you store data

  Table

.An object you define and use to store data Each 

table contains information

,about a particular subject such as customers or 

.orders

( )  Table contains Fields or columns that store 

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 26/70

,different kinds of data such as a name or an 

, , ( )address and Records or rows that collect all the 

information about a particular instance of the 

.subject

. .E g All the information about a company

(  You can define a primary key one or more fields 

) ,that have a unique value for each record and  

one or more indexes on each table to help 

.retrieve your data more quickly

 Query

 Query in an object that provides a custom view of  

. ,data from one or more tables In Access you can 

( )use the graphical query by example QBE facility 

or you can write SQL statements to create your 

. , ,queries You can define queries to select update  

, .insert or delete data You can also define queries 

that create new tables from data in one or more 

.existing tables

 Form

 An object designed primarily for data input or 

; .display or for control of application execution You 

use forms to customize the presentation of data 

.that your application extracts for queries or tables  

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 27/70

.  You can also print forms You can design a form 

to run a macro or a Visual Basic procedure in 

-response to any of a number of events for 

,example to run a procedure when the value of  .data changes

 Report

, ,An object designed for formatting calculating  

, .printing and summarizing selected data You can 

.view a report on your screen before you print it

 Data Access Page

 An object that includes an HTML file and 

supporting files to provide custom access to your 

.data from Microsoft Internet Explorer You can 

publish these files on your company intranet to 

allow other users on your network who also have 

2000 5Office and Internet Explorer version or later 

, , .to view search and edit your data

 Macro

 Macro is an object that is a structured definition of  

one or more actions that you want Access to 

.perform in response to a defined event

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 28/70

,For example you might design a macro that 

opens a second form in response to the selection 

.of an item on a main form You might have 

another macro that validate the content of a field .whenever the value in the field changes You can 

include simple conditions in macros to specify 

when one or more actions in the macro should be 

.performed or skipped You can use macros to 

, ,open and execute queries to open tables or to 

.print or view reports You can also run other 

macros or visual Basic procedures from within a 

.macro

 Module

 It is an object containing custom procedures that .you code using Visual Basic Modules provide a 

more discrete flow of actions and allow you to 

' .trap errors something you can t do with macros  

-Modules can be stand alone objects containing 

functions that can be called from anywhere in 

,your application or they can be directly associated with a form or a report to respond to events on 

.the associated form or report

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 29/70

   Table stores the data that you can extract with 

queries and display in reports or that you can 

.display and update in forms or data access pages  

, ,Notice that forms reports and data access pages can use data either directly from tables or from a 

" "filtered view of the data created by using 

. ;queries Queries can use Visual Basic functions to 

provide customized calculations on data in your 

. -database Access also has many built in functions 

that allow you to summaries and format your data 

.in queries

" "Events on forms and reports can trigger either 

.macros or Visual Basic procedures

 ontrol Control is an object on a form or report that 

.contains data You can even design a macro or a 

Visual Basic procedure that responds to the user 

pressing individual keys on the keyboard when 

.entering data

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 30/70

 creen Designs

login

 rong Password

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 31/70

 pplicant Joining Form

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 32/70

 mployer Form

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 33/70

 mployers details

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 34/70

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 35/70

.ogin Java

. .*;import javax swing

. .*;import java awt

. . .*;import java awt event

. .*;import java sql

 public class login extends JFrame implements 

{ActionListener

= ();  JPanel butpan new JPanel

= ();  JPanel logpan new JPanel

= ();  JPanel selpan new JPanel

= (" - ");  JLabel un new JLabel Login ID

= (10);  JTextField usr new JTextField

= (" ");  JLabel pd new JLabel Password

= (10);  JTextField pwd new JTextField

= (" ");  JButton reset new JButton Reset

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 36/70

= (" ");  JButton log new JButton Login

= (" ");  JButton join new JButton Join

= (" ");  JRadioButton app new JRadioButton Applicants

= (" ");  JRadioButton emp new JRadioButton Employers

= ();ButtonGroup bg new ButtonGroup

;Connection clog

;Statement st

=0;int flag

=0;int i

 

( []){public static void main String args

();new login

}

(){public login

(). ( , . );getContentPane add butpan BorderLayout SOUTH

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 37/70

(). ( , . );getContentPane add logpan BorderLayout WEST

(). ( , . );getContentPane add selpan BorderLayout EAST

. ( );logpan add un

. ( );logpan add usr

. ( );logpan add pd

. ( );logpan add pwd

. ( );butpan add reset

. ( );butpan add log

. ( );butpan add join

. ( );selpan add app

. ( );selpan add emp

. ( );bg add app

. ( );bg add emp

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 38/70

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 39/70

}

( == ){else if source join

( . ()) { (); ( );}if app isSelected new app setVisible false

 

( . ()) { ();else if emp isSelected new emp  

( );}setVisible false

 

}

( == ){else if source log

/* */Log in of Applicants start from here

( . ()){if app isSelected

{try

. (" . . . ");Class forName sun jdbc odbc JdbcOdbcDriver

= . (" : :clog DriverManager getConnection jdbc odbc g

");o

= . ();st clog createStatement

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 40/70

1= . (" *ResultSet rsLog st executeQuery select  

");from Applicant

( 1. ()){while rsLog next

  boolean 

1= 1. (8). (( ) . ());b rsLog getString equals String usr getText

  boolean 

2= 1. (9). (( ) . ());b rsLog getString equals String pwd getText

( 1 && 2 ){if b b

. ( ," ");  JOptionPane showMessageDialog null done

//Remove this line

( 1. (7));new empdetail rsLog getInt

=1;flag

;break

}

}

( !=1 && <=3){if flag i

++ ;i

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 41/70

. ( ,"  JOptionPane showMessageDialog null Invalid 

");Entry

}

( !=1 && >3){else if flag i

. (0);System exit

}

( ==1){else if flag

( );setVisible false

}

}

( ){catch Exception excp

. ( , );  JOptionPane showMessageDialog null excp

. (0);System exit

}

}

/* */log in of Employers Start from here

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 42/70

( . ()){else if emp isSelected

{try

. (" . . . ");Class forName sun jdbc odbc JdbcOdbcDriver

= . (" : :clog DriverManager getConnection jdbc odbc g

");o

= . ();st clog createStatement

2= . (" *ResultSet rsLog st executeQuery select  

");from Company

( 2. ()){while rsLog next

  boolean 

1= 2. (5). (( ) . ());b rsLog getString equals String usr getText

  boolean 

2= 2. (6). (( ) . ());b rsLog getString equals String pwd getText

( 1 && 2 ){if b b

. ( ," ");  JOptionPane showMessageDialog null done

//Remove this line

( 2. (4));new appdetail rsLog getInt

=1;flag

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 43/70

;break

}

}

( !=1 && <=3){if flag i

++ ;i

. ( ,"  JOptionPane showMessageDialog null Invalid 

");Entry

}

( !=1 && >3){else if flag i

. (0);System exit

}

( ==1){else if flag

( );setVisible false

}

}

( ){catch Exception excp

. ( , );  JOptionPane showMessageDialog null excp

. (0);System exit

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 44/70

}

}

}

}

}

.pp java

. .*;import java awt

. .*;import javax swing

. . .*;import java awt event

. .*;import java sql

 public class app extends JFrame implements 

ActionListener

{

= ();  JPanel p new JPanel

= ();  JPanel q new JPanel

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 45/70

, , , , ;  JTextField tname tage textra tusr tpwd

   JLabel 

, , , , , , , , 1,lname lage lsex ledu lextra lexpect lsal Blank Blank Bl

2, 3, 4, , ;ank Blank Blank lusr lpwd

, ;  JRadioButton rbml rbfml

, ;  JComboBox cbedu cbsal

, , ; JRadioButton it civil mech

, ;  JButton bSub bRes

= ();String sex new String

;int field

( []){public static void main String args

();new app

}

 

()public app

{

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 46/70

 

(). ( , . );getContentPane add p BorderLayout CENTER

(). ( , . );getContentPane add q BorderLayout SOUTH

(" ");setTitle Placement Office

= (" : ");lusr new JLabel Login Name

= (" : ");lpwd new JLabel Password

= (" : ");lname new JLabel Name

= (" : ");lage new JLabel Age

= (" : ");lsex new JLabel Sex

= (" : ");ledu new JLabel Education

= (" : ");lextra new JLabel Extra

= (" : ");lexpect new JLabel Field

= (" : ");lsal new JLabel Minimum Expected Salary

= (10);tusr new JTextField

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 47/70

= (10);tpwd new JTextField

= (20);tname new JTextField

= (2);tage new JTextField

= (15);textra new JTextField

 

= (" ");rbml new JRadioButton Male

= (" ");rbfml new JRadioButton Female

= ();ButtonGroup bgrp new ButtonGroup

. ( );bgrp add rbml

. ( );bgrp add rbfml

= ();cbedu new JComboBox

. (" ");cbedu addItem Diploma

. (" ");cbedu addItem Degree

. (" - ");cbedu addItem Post Graduate

= ();cbsal new JComboBox

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 48/70

. ("5,000");cbsal addItem

. ("10,000");cbsal addItem

. ("15,000");cbsal addItem

. ("20,000");cbsal addItem

= (" .");it new JRadioButton Software Engg

= (" .");civil new JRadioButton Civil Engg

= (" .");mech new JRadioButton Mechanical Engg

2= ();ButtonGroup bg new ButtonGroup

2. ( );bg add it

2. ( );bg add civil

2. ( );bg add mech

= (" ");bSub new JButton Submit

= (" ");bRes new JButton Reset

. ( (12,2));p setLayout new GridLayout

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 49/70

= ("");Blank new JLabel

1= ("");Blank new JLabel

2= ("");Blank new JLabel

3= ("");Blank new JLabel

4= ("");Blank new JLabel

. ( );p add lusr

. ( );p add tusr

. ( );p add lpwd

. ( );p add tpwd

. ( );p add lname

. ( );p add tname

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 50/70

. ( );p add lage

. ( );p add tage

. ( );p add lsex

. ( );p add rbml

. ( );p add Blank

. ( );p add rbfml

. ( );p add ledu

. ( );p add cbedu

. ( );p add lextra

. ( );p add textra

. ( );p add lexpect

. ( );p add it

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 51/70

. ( 4);p add Blank

. ( );p add civil

 

. ( 1);p add Blank

. ( );p add mech

. ( );p add lsal

. ( );p add cbsal

. ( );q add bSub

. ( );q add bRes

 

. ( );bSub addActionListener this

. ( );bRes addActionListener this

( );setVisible true

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 52/70

(200,200,500,500);setBounds

( _ _ );setDefaultCloseOperation EXIT ON CLOSE

 

}

( ){public void actionPerformed ActionEvent e

= . ();Object source e getSource

( == ){if source bRes

. ("");tname setText

. ("");tage setText

. (" ");cbedu setSelectedItem Diploma

. ("");textra setText

. ("");tusr setText

. ("");tpwd setText

}

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 53/70

{else

( . ()) =1;if it isSelected field

( . ()) =2;else if civil isSelected field

( . ()) =3;else if mech isSelected field

( . ()) =" ";if rbml isSelected sex MALE

( . ()) =" ";else if rbfml isSelected sex FEMALE

 

{try

= . ( . ());}int age Integer parseInt tage getText

( ){ . ("");}catch Exception ex tage setText

( . (). ("") |if tname getText equals  . (). ("") | . (). ("") |textra getText equals tage getText equals  

. ("") | ==0 )sex equals field  

. ( ,"  JOptionPane showMessageDialog null Please Fill in 

!!");All Valid Entries

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 54/70

{else

 

=( ) . ();String sal String cbsal getSelectedItem

=( ) . ();String edu String cbedu getSelectedItem

 

{try

. (" . . . ");Class forName sun jdbc odbc JdbcOdbcDriver

  Connection 

= . (" : : ");conn DriverManager getConnection jdbc odbc go

= . ();Statement st conn createStatement

. ("st executeUpdate INSERT INTO Applicant 

('" + . () + "','" + . ()VALUES tname getText tage getText  

+ "','" + + "','" + + "','" + . () +sex edu textra getText  "','" + + "','" + + "','" + . () + "','"sal field tusr getText  

+ . () + "')");tpwd getText

. ();conn close

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 55/70

=" .String msg Your Details are Stored Login 

! !!";again to View Related Companies Thank You

. ( , );  JOptionPane showMessageDialog null msg

();new login

( );setVisible false

}

( ){catch Exception exc

. ( , . JOptionPane showMessageDialog null tname get

()+" : "+ );  Text exc

. (0);System exit

}

}

}

}

}

.ppdetail java

. .*;import javax swing

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 56/70

. .*;import java awt

. . .*;import java awt event

. .*;import java sql

{public class appdetail extends JFrame

( []){public static void main String args

(0);new appdetail

}

;  JTable tab

= ();  JPanel tpan new JPanel

= ();  JPanel bpan new JPanel

 String 

[]={" "," "," "," "," -header Name Age Sex Education Co

"," "};curriculars Salary

[][]= [15][6];Object data new String

= (" ");  JButton check new JButton TRY

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 57/70

, , ;int i j ki

( ){public appdetail int k

. = ;this ki k

( );setVisible true

(800,600);setSize

( _ _ );setDefaultCloseOperation EXIT ON CLOSE

(). ( , . );getContentPane add tpan BorderLayout CENTER

(). ( , . );getContentPane add bpan BorderLayout SOUTH

. ( );bpan add check

{try

. (" . . . ");Class forName sun jdbc odbc JdbcOdbcDriver

  Connection 

= . (" : : ");conn DriverManager getConnection jdbc odbc go

= . ();Statement st conn createStatement

= . (" *ResultSet rs st executeQuery select from 

="+ );Applicant where Field ki

( . ()){while rs next

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 58/70

( =0; <=5; ++)for j j j

[ ][ ]= . ( +1);data i j rs getString j

++;i

}

}

( ){catch Exception e

. ( , [1][0]);  JOptionPane showMessageDialog null data

. (0);System exit

}

= ( , );tab new JTable data header

. (tab setPreferredScrollableViewportSize new (600,600));Dimension

= ( );  JScrollPane sp new JScrollPane tab

. ( );tpan add sp

();pack

 

}

}

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 59/70

.mp java

. .*;import java awt

. .*;import javax swing

. . .*;import java awt event

. .*;import java sql

 public class emp extends JFrame implements 

{ActionListener

= ();  JPanel p new JPanel

= ();  JPanel q new JPanel

, , , ;  JTextField tname textra tusr tpwd

   JLabel 

, , , , , 1, 2, 3,lname lextra lfield lsal Blank Blank Blank Blank Blan

4, , ;k lusr lpwd

;  JComboBox cbsal

, , ; JRadioButton it civil mech

, ;  JButton bSub bRes

;int field

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 60/70

( []){public static void main String args

();new emp

}

 

(){public emp

(). ( , . );getContentPane add p BorderLayout CENTER

(). ( , . );getContentPane add q BorderLayout SOUTH

(" ");setTitle Placement Office

 

= (" : ");lname new JLabel Name

= (" ( ): ");lextra new JLabel Vacancy s

= (" : ");lfield new JLabel Field

= (" : ");lsal new JLabel Minimum Expected Salary

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 61/70

= (" : ");lusr new JLabel Login name

= (" : ");lpwd new JLabel Password

= (20);tname new JTextField

= (15);textra new JTextField

= (10);tusr new JTextField

= (10);tpwd new JTextField

 

= ();cbsal new JComboBox

. ("5,000");cbsal addItem

. ("10,000");cbsal addItem

. ("15,000");cbsal addItem

. ("20,000");cbsal addItem

= (" .");it new JRadioButton Software Engg

= (" .");civil new JRadioButton Civil Engg

= (" .");mech new JRadioButton Mechanical Engg

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 62/70

2= ();ButtonGroup bg new ButtonGroup

2. ( );bg add it

2. ( );bg add civil

2. ( );bg add mech

= (" ");bSub new JButton Submit

= (" ");bRes new JButton Reset

. ( (11,2));p setLayout new GridLayout

= ("");Blank new JLabel

1= ("");Blank new JLabel

2= ("");Blank new JLabel

3= ("");Blank new JLabel

4= ("");Blank new JLabel

. ( );p add lusr

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 63/70

. ( );p add tusr

. ( );p add lpwd

. ( );p add tpwd

. ( );p add lname

. ( );p add tname

. ( );p add lextra

. ( );p add textra

. ( );p add lfield

. ( );p add it

. ( 4);p add Blank

. ( );p add civil

 

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 64/70

. ( 1);p add Blank

. ( );p add mech

. ( );p add lsal

. ( );p add cbsal

. ( );q add bSub

. ( );q add bRes

 

. ( );bSub addActionListener this

. ( );bRes addActionListener this

( );setVisible true

(200,200,300,300);setBounds

( _ _ );setDefaultCloseOperation EXIT ON CLOSE

 

}

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 65/70

( ){public void actionPerformed ActionEvent e

= . ();Object source e getSource

( == ){if source bRes

. ("");tname setText

. ("");textra setText

}

{else

( . ()) =1;if it isSelected field

( . ()) =2;else if civil isSelected field

( . ()) =3;else if mech isSelected field

( . (). ("") |if tname getText equals  

. (). ("") | ==0 )textra getText equals field  

. ( ,"  JOptionPane showMessageDialog null Please Fill in 

!!");All Entries

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 66/70

{else

=( ) . ();String sal String cbsal getSelectedItem

{try

. (" . . . ");Class forName sun jdbc odbc JdbcOdbcDriver

  Connection 

= . (" : : ");conn DriverManager getConnection jdbc odbc go

= . ();Statement pst conn createStatement

. ("pst executeUpdate INSERT INTO Company 

('" + . () + "','" +VALUES tname getText  

. () + "','" + ( ) + "','" + +textra getText String sal field  

"','" + . () + "','" + . () + "')");tusr getText tpwd getText

. ();conn close

=" .String msg Your Details are Stored Login 

! !!";again to View Related applicants Thank You

. ( , );  JOptionPane showMessageDialog null msg

( );setVisible false

();new login

 

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 67/70

}

( ){catch Exception exc

. ( , . JOptionPane showMessageDialog null tname get()+" : "+ );  Text exc

. (0);System exit

}

}

}

}

}

.mpdetail java

. .*;import javax swing

. .*;import java awt

. . .*;import java awt event

. .*;import java sql

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 68/70

{public class empdetail extends JFrame

( []){public static void main String args

(0);new empdetail

}

;  JTable tab

= ();  JPanel tpan new JPanel

= ();  JPanel bpan new JPanel

[]={" "," "," "};String header Name Vacancy Salary

[][]= [15][3];Object data new String

= (" ");  JButton check new JButton TRY

, , ;int i j ki

( ){public empdetail int k

. = ;this ki k

( );setVisible true

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 69/70

8/8/2019 Placement Office

http://slidepdf.com/reader/full/placement-office 70/70

( ){catch Exception e

. ( , [1][0]);  JOptionPane showMessageDialog null data

. (0);System exit

}

= ( , );tab new JTable data header

. (tab setPreferredScrollableViewportSize new 

(600,600));Dimension

= ( );  JScrollPane sp new JScrollPane tab

. ( );tpan add sp

();pack

 

}

}