0% found this document useful (0 votes)
20 views

Ajp - Microproject Simple

Simple English format for the ajp micro project
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Ajp - Microproject Simple

Simple English format for the ajp micro project
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

A

PROJECT REPORT
ON
“EXAM REGISTRATION FORM”
Subject – Advanced Java (22517)

SUBMITTED BY
124-Patil Sanskruti Dilip (2100340239)
Under the guidance of
Mr. K. P. Jadhav

DEPARTMENT OF COMPUTER TECHNOLOGY


Sanjivani Rural Education Society’s
SANJIVANI K.B.P POLYTECHNIC
KOPARGAON-423603, DIST-AHMEDNAGAR
(2023-2024)

1
Sanjivani Rural Education Society’s
SANJIVANI K.B.P POLYTECHNIC
DEPARTMENT OF COMPUTER TECHNOLOGY

CERTIFICATE
This is to certify that the Project report entitled
“EXAM REGISTRATION FORM”
Submitted By
124-Patil Sanskruti Dilip (2100340239)
Under our supervision and guidance for partial fulfillment of
the requirement for
Diploma in Computer Technology affiliated to
Maharashtra State Board of Technical Education, Mumbai
For academic year 2023-2024

Mr. K. P. Jadhav Prof G.N. Jorvekar Prof. A. R. Mirikar


PROJECT GUIDE HOD PRINCIPAL

2
ACKNOWLEDGEMENT

I would like to express my special thanks of gratitude to my


teacher Mr. K. P. Jadhav who gave me the golden opportunity to
explore myself and improve my skills by performing this project.
Secondly, I would like to thanks to our HOD of computer
department Mr. G.N.Jorvekar for their kind help ,guidance and
motivation .I would also like to express my gratitude to the
Principal Mr. A.R.Mirikar for providing us with all facility that
were required. Last but not the least, I would like to thanks our
friends and co-member who helped us in each and every possible
way.

Patil Sanskruti Dilip (2100340239)

3
INDEX

SR.NO TITLE PAGE NO

1. Introduction 5
2. Algorithm 6
3. Flowchart 7
4. Program Code 8-13

5. Output 14-15

6. References 15

4
INTRODUCTION

Exam registration form is a web application developed using


Java and Oracle database. The form takes the credential in form
as input and stored them in Oracle database. The credential
includes student name, course, scheme, semester, enrollment
number. This application allows the student to fill this
information for exam registration. This form is connected to
Oracle database. The form consist of two button submit and
cancel. When user clicks on submit button then credential moves
to database while displaying confirmation message. If the user
clicks cancel the credential fields become blank while sending no
data to the database and displays message of form cancelled. The
aim of the project is to demonstrate use of java components,
event handling and database connectivity.

5
ALGORITHM

Step 1: Create a Java File and add the required libraries.


Step 2: Design the exam registration form using Java Swing.
Step 3: Connect to the Oracle database.
Step 4: Create a statement to insert the exam registration data
into the database. If no filled is blank accept the data.
Step 5: Execute the statement and check the number of rows
affected.
Step 6: Display a message to the user indicating whether the
registration was successful or not.

6
FLOWCHART

START

Create Java File and add required


libraries

Design form using Swing

Connect to Oracle Database

Cancel button Field blank


filled

If all field filled


yes

filled

Create Statement to insert data into


database

If (row
affected>0)

Display user Registered Display user Registration


Successfully Failed

STOP

7
PROGRAM CODE
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
import java.awt.Font;
import java.sql.*;
public class java_microproject extends JFrame implements ActionListener
{
JLabel l1,l2,l3,l4,l5,l6,l7;
JTextField t1,t2,t3;
JRadioButton r1,r2,r3;
JComboBox<String> cb,cb2;
String studentCourse= "";
String selectedScheme, selectedSem, division, course[],course2[],rollNo;
JButton b1,b2;
ButtonGroup bg;
String studentName;
JPanel jp;
String enrollNo="";
int rowsAffected;

java_microproject()
{
setLayout(null);
l1=new JLabel("EXAM REGISTRATION FORM");
l1.setFont(new Font("Serif", Font.PLAIN, 24));
l1.setBounds(200, 50, 500, 40);

8
add(l1);

l2=new JLabel("Enter Student Name: ");


l2.setFont(new Font("Serif", Font.BOLD, 20));
l2.setBounds(60, 130, 190, 40);
add(l2);
// 1st text box
t1=new JTextField();
t1.setBounds(240, 130, 150, 40);
add(t1);

l3=new JLabel("Select Course : ");


l3.setFont(new Font("Serif", Font.BOLD, 20));
l3.setBounds(60, 200, 190, 40);
add(l3);

r1=new JRadioButton("Diploma in Computer Technology");


r2=new JRadioButton("Diploma in Mechanical Engineering");
r3=new JRadioButton("Diploma in Civil Engineering");
r1.setFont(new Font("Arial", Font.PLAIN, 18));
r2.setFont(new Font("Arial", Font.PLAIN, 18));
r3.setFont(new Font("Arial", Font.PLAIN, 18));
r1.setBounds(60,240,350,30);
r2.setBounds(60,270,350,30);
r3.setBounds(60,300,350,30);
bg = new ButtonGroup();
bg.add(r1);

9
bg.add(r2);
bg.add(r3);
add(r1);
add(r2);
add(r3);

l3=new JLabel("Enter Scheme: ");


l3.setFont(new Font("Serif", Font.BOLD, 20));
l3.setBounds(60, 350, 190, 40);
add(l3);

String[] course={"","A","B","C","D","E","I"};
cb=new JComboBox<>(course);
cb.setBounds(200, 340, 150, 40);
add(cb);

l5=new JLabel("Enrollment number: ");


l5.setFont(new Font("Serif", Font.BOLD, 20));
l5.setBounds(60, 400, 190, 40);
add(l5);

t2=new JTextField();
t2.setBounds(230, 400, 150, 40);
add(t2);

l6=new JLabel("Select the semester : ");


l6.setFont(new Font("Serif", Font.BOLD, 20));

10
l6.setBounds(60, 470, 360, 40);
add(l6);

String[] course2={"1 sem","2 sem","3 sem","4 sem","5 sem","6 sem"};


cb2=new JComboBox<>(course2);
cb2.setBounds(60,510,150,40);
add(cb2);

b1=new JButton("Submit");
b1.setBackground(Color.green);
b1.setFont(new Font("Serif", Font.BOLD, 20));
b1.setBounds(75, 590, 150, 40);
add(b1);

b2=new JButton("Cancel");
b2.setBackground(Color.red);
b2.setFont(new Font("Serif", Font.BOLD, 20));
b2.setBounds(245, 590, 150, 40);
add(b2);

l7=new JLabel();
l7.setFont(new Font("Serif", Font.PLAIN, 18));
l7.setBounds(70, 630, 200, 40);
add(l7);

b1.addActionListener(this);
b2.addActionListener(this);

11
setSize(900, 900);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public void actionPerformed(ActionEvent e)
{
studentName = t1.getText();
enrollNo = t2.getText();
if(e.getSource() == b2){
t1.setText("");
t2.setText(" ");
bg.clearSelection();
cb.setSelectedIndex(-1);
cb2.setSelectedIndex(-1);
}
if (r1.isSelected()) {
studentCourse ="Diploma in Computer Technology";
} else if (r2.isSelected()) {
studentCourse ="Diploma in Mechanical Engineering";
} else if (r3.isSelected()) {
studentCourse ="Diploma in Civil Engineering";
}
selectedSem = (String)cb.getSelectedItem();
selectedScheme = (String)cb2.getSelectedItem();
try {
Class.forName("oracle.jdbc.driver.OracleDriver");

12
Connection con =
DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "system",
"sanskruti");
Statement stmt = con.createStatement();
if(studentName!="" && studentCourse!="" && selectedScheme!="" &&
selectedSem!="" && enrollNo!=""){
String query="insert into details
values('"+studentName+"','"+studentCourse+"','"+selectedScheme+"','"+enrollN
o+"','"+selectedSem+"')";
rowsAffected = stmt.executeUpdate(query);
}
if (rowsAffected > 0) {
l7.setText("Form filled Successfully!!");
} else {
l7.setText("Failed to fill form!!");
}
con.close();
} catch (Exception ex)
{System.out.println(ex);}
}
public static void main(String args[]) {
new java_microproject();
}
}

13
OUTPUT

14
REFERENCES

1. https://www.w3schools.com/sql/sql_create_table.asp

2. https://www.geeksforgeeks.org/introduction-to-java-swing/

3. Advanced Java Notes

15

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy