EducationHow to Make a Great IP Project for CBSE Class XII?

How to Make a Great IP Project for CBSE Class XII?

In this article, we will guide you smoothly on how you can make a great IP Project for CBSE final examinations. In our this post we have detailed the information on making soft-copy as well as hard-copy of your IP Project for Class 12th CBSE.

You can download the free and paid CBSE IP Java Projects if you are looking for the pre-build project.

Things you will need

Before we begin with further instructions, make sure you have installed following things on your Personal Computer or laptop. Don’t worry if you  haven’t, we are merely here to help you, and that’s smooth.

  1. Java IDE NetBeans
    You can download the latest IDE Net Beans from netbeans.org/downloads
  2. MySQL
    See: Installing MySQL in Windows XP/7/8/8.1/9 32/64bit on how to install MySQL on your PC
  3. Knowledge of MySQL (Create Database, Create Table, Insert, Select, Update, Delete & Drop, etc.).
  4. Basic Knowledge of Designing Java UI Frame.

Selection of The Topic

Though the selection of the topic should not be the case of the matter when there is no choice. One of the very first things you should do is deciding the topic for the project. In most cases, teachers decide the topics, but if you get a chance by luck, you may suggest numerous topics which we have included in the next section.

IP Projects Topics For CBSE Class 12th

Here is the list of topics for the CBSE Class 12th Java IP Project:

  • Hotel Management — Buy Now at Rs. 399
  • Bus Booking System — Buy Now at Rs. 445
  • Tiffin Booking System — Buy Now at Rs. 399
  • Hospital Management
  • Mobile Service Center — Buy Now at Rs. 399
  • College Management
  • School Management
  • Cab Booking — Buy Now at Rs. 399
  • Employee Management
  • Bank Management — Buy Now at Rs. 399
  • Hotel Booking — Buy Now at Rs. 399
  • Train Ticket Booking
  • Airways Ticket Booking
  • Movie Ticket Booking
  • Super Market Billing
  • Hotel Billing — Buy Now at Rs. 399
  • Restaurant Billing
  • Mobile Sales Billing
  • Shopping Mart

Deciding the Numbers of Frames to Be Used

Frames are the Windows used to design the entire layout and the structure of the application, so-called the project. Almost in every topic following Window frames are required, no matter which topic you have chosen or got :

  • Login Window Frame (e.g. login.java)
  • Adding Records  (e.g. home.java)
  • Editing or Modifying Existing Records (e.g. modify.java)
  • Deleting Records (e.g. delete.java)
  • Generating Report  (e.g. report.java)

In the below section, we will learn on how to create a login window, add, edit, delete and report frames.

Creating Login Window Frame as login.java

In most of the cases, you require knowledge of if-else conditional statements to build a login window frame in Java.

Login Window Frame as login.javaControls will require to build a login frame:

  • labels
  • text field
  • password field
  • button
string username=tf_username.getText();
string password=tf_password.getText();
if(username=="ENTER ANY THING HERE" && password="ENTER ANY THING AS PASSWORD HERE") { new home().setVisible(true); this.setVisible(false); } else {
JOptionPane.showMessageDialog(this,"The username and password you have entered is not correct. Try again!");
}

Creating Main Window Frame as home.java

The main window will pop your welcome screen, which will appear soon after you successfully login. This frame contains a navigation button to other frames, e.g. edit, add, report etc.

Main Window Frame as home.java

S. no.Control typeControl name
1.JButtonbt_new
2.JButtonbt_existing
3.JButtonbt_cancel
4.JButtonbt_report
5.JLabellb_img
//Bt_new
new book().setVisible(true);
//bt_existing
new modiify().setVisible(true);
//bt_cancel
new cancel_booking().setVisible(true);
//bt_report
new report().setVisible(true);
// lb_img
lb_img.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sunmacrohotel/building.png")));

Creating Add Record Window Frame as book.java

This frame includes fields and your connectivity coded which help you to save the records into the backed MySQL Database.

Add Record Window Frame as book.java

String name, age, gender="", persons, mobile, rtype="", rooms, checkin, checkout, docid, sec;
name=tf_name.getText();
age=tf_age.getText();
if(rb_male.isSelected()){gender="Male";}else if(rb_female.isSelected()){gender="Female";}
persons=tf_persons.getText();
mobile=tf_mobile.getText();
if(rb_nac.isSelected()){rtype="Non-AC";}else if(rb_ac.isSelected()){rtype="AC";}else if(rb_d.isSelected()){rtype="Deluxe";}
rooms=(String)cb_rooms.getSelectedItem();
checkin=tf_checkin.getText();
checkout=tf_checkout.getText();
docid= (String) cb_id.getSelectedItem();
sec=tf_security.getText();
if(name.isEmpty())
{
JOptionPane.showMessageDialog(null, "Name field can't be left empty");
} else if(age.isEmpty())
{
JOptionPane.showMessageDialog(null, "Age field can't be left empty");
} else if(gender.isEmpty())
{
JOptionPane.showMessageDialog(null, "Select a gender type");
} else if(persons.isEmpty()){
JOptionPane.showMessageDialog(null, "Numbers of person field can't be left empty");
}
else if(mobile.isEmpty())
{
JOptionPane.showMessageDialog(null, "Mobile field can't be left empty");
} else if(rtype.isEmpty())
{
JOptionPane.showMessageDialog(null, "Room type is not selected");
} else if(checkin.isEmpty())
{
JOptionPane.showMessageDialog(null, "Please provide check-in date");
} else if(checkout.isEmpty())
{
JOptionPane.showMessageDialog(null, "The check-out date can't be left empty");
} else if(checkin.equals(checkout))
{
JOptionPane.showMessageDialog(null, "Check-in and check-out dates can't be same");
} else if(docid.equals("Choose an ID Proof"))
{
JOptionPane.showMessageDialog(null, "Select a ID Proof");
} else if(sec.isEmpty())
{
JOptionPane.showMessageDialog(null, "Provide a security deposit amomunnt");
} else {
try{ Class.forName("com.mysql.jdbc.Driver");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/sunmacro","root","DATABASE_PASSWORD");
Statement stmt=null;
stmt=con.createStatement();
String query="INSERT INTO books(name, age, gender, persons, mobile, rtype, rooms, checkin, checkout, docid, sec) VALUES('"+name+"', '"+age+"', '"+gender+"', '"+persons+"', '"+mobile+"', '"+rtype+"', '"+rooms+"', '"+checkin+"', '"+checkout+"', '"+docid+"', '"+sec+"');";
int qexecute=stmt.executeUpdate(query);
JOptionPane.showMessageDialog(this, "Thank you!\nYour booking has been successfully made");
bt_open.setEnabled(false);
} catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
}
}

Creating Modify Record Window Frame as modify.java

Modify frame let you customize and edit an existing record in the backend MySQL and help you to update the existing records with the new details.

Modify Record Window Frame as modify.javaFetch Details Button

 

 

if(tf_mob.getText().isEmpty()){
JOptionPane.showMessageDialog(null, "Please input a mobile number first");
} else {
try{
Class.forName("com.mysql.jdbc.Driver");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/sunmacro","root","DATABASE_PASSWORD");
Statement stmt=null;   stmt=con.createStatement();  ResultSet rs=null;
String q2="Select * from books where mobile="+tf_mob.getText()+" limit 1;";
rs=stmt.executeQuery(q2);
if(rs.next()) {
bt_modify.setEnabled(true);
tf_name.setText(rs.getString("name"));
tf_age.setText(rs.getString("age"));
String temp_gender=rs.getString("gender");
if(temp_gender.equals("Male")){rb_male.setSelected(true);} else {rb_female.setSelected(true);}
tf_persons.setText(rs.getString("persons"));
tf_mobile.setText(rs.getString("mobile"));
String temp_rtype=rs.getString("rtype");
if(temp_rtype.equals("AC")){rb_ac.setSelected(true);} else if(temp_rtype.equals("Non-AC")) {rb_nac.setSelected(true);} else {rb_d.setSelected(true);}
cb_rooms.setSelectedItem(rs.getString("rooms"));
tf_checkin.setText(rs.getString("checkin"));
tf_checkout.setText(rs.getString("checkout"));
cb_id.setSelectedItem(rs.getString("docid"));
tf_security.setText(rs.getString("sec"));
} else {
JOptionPane.showMessageDialog(null, "Sorry!\nThat was an incorrect mobile number");
bt_modify.setEnabled(false);
}
} catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
bt_modify.setEnabled(false);
}
}

Modify Booking Button

 

 

String name, age, gender="", persons, mobile, rtype="", rooms, checkin, checkout, docid, sec;
String temp_mobile=tf_mob.getText();
if(temp_mobile.isEmpty()){
JOptionPane.showMessageDialog(null, "Please input a mobile number first");
}
name=tf_name.getText(); age=tf_age.getText();
if(rb_male.isSelected()){gender="Male";}else if(rb_female.isSelected()){gender="Female";}
persons=tf_persons.getText();
mobile=tf_mobile.getText();
if(rb_nac.isSelected()){rtype="Non-AC";}else if(rb_ac.isSelected()){rtype="AC";}else if(rb_d.isSelected()){rtype="Deluxe";}
rooms=(String)cb_rooms.getSelectedItem();
checkin=tf_checkin.getText();
checkout=tf_checkout.getText();
docid= (String) cb_id.getSelectedItem();
sec=tf_security.getText();
if(name.isEmpty())
{
JOptionPane.showMessageDialog(null, "Name field can't be left empty");
} else if(age.isEmpty())
{
JOptionPane.showMessageDialog(null, "Age field can't be left empty");
} else if(gender.isEmpty())
{
JOptionPane.showMessageDialog(null, "Select a gender type");
} else if(persons.isEmpty()){
JOptionPane.showMessageDialog(null, "Numbers of person field can't be left empty");
}
else if(mobile.isEmpty())
{
JOptionPane.showMessageDialog(null, "Mobile field can't be left empty");
} else if(rtype.isEmpty())
{

JOptionPane.showMessageDialog(null, "Room type is not selected");
} else if(checkin.isEmpty())
{
JOptionPane.showMessageDialog(null, "Please provide check-in date");
} else if(checkout.isEmpty())
{
JOptionPane.showMessageDialog(null, "The check-out date can't be left empty");
} else if(checkin.equals(checkout))
{
JOptionPane.showMessageDialog(null, "Check-in and check-out dates can't be same");
} else if(docid.equals("Choose an ID Proof"))
{
JOptionPane.showMessageDialog(null, "Select a ID Proof");
} else if(sec.isEmpty())
{
JOptionPane.showMessageDialog(null, "Provide a security deposit amomunnt");
} else {
try{
Class.forName("com.mysql.jdbc.Driver");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/sunmacro","root","DATABASE-PWD");
Statement stmt=null; stmt=con.createStatement();
String query="update books set name='"+name+"', age='"+age+"', gender='"+gender+"', persons='"+persons+"', mobile='"+mobile+"', rtype='"+rtype+"', rooms='"+rooms+"', checkin='"+checkin+"', checkout='"+checkout+"', docid='"+docid+"', sec='"+sec+"';";
int qexecute=stmt.executeUpdate(query);
JOptionPane.showMessageDialog(this, "Booking Details hs been modified");
bt_modify.setEnabled(false);
} catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
}
}

Creating Delete Record Window Frame as cancel_booking.java

Once you have created, add a record and modify record frames you need another frame to delete the records. The following example will help you on how you can create a frame for removing records.

Delete Record Window Frame as cancel_booking.java

Fetch Details Button

 

 

if(tf_mob.getText().isEmpty()){
JOptionPane.showMessageDialog(null, "Please input a mobile number first");
} else {
try{
Class.forName("com.mysql.jdbc.Driver");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/sunmacro","root","DATABASE_PASSWORD");
Statement stmt=null;
stmt=con.createStatement();
ResultSet rs=null;
String q2="Select * from books where mobile="+tf_mob.getText()+" limit 1;";
rs=stmt.executeQuery(q2);
if(rs.next()) {
bt_modify.setEnabled(true);
tf_name.setText(rs.getString("name"));
tf_age.setText(rs.getString("age"));
String temp_gender=rs.getString("gender");
if(temp_gender.equals("Male")){rb_male.setSelected(true);} else {rb_female.setSelected(true);}
tf_persons.setText(rs.getString("persons"));
tf_mobile.setText(rs.getString("mobile"));
String temp_rtype=rs.getString("rtype");
tf_security.setText(rs.getString("sec"));
} else {
JOptionPane.showMessageDialog(null, "Sorry!\nThat was an incorrect mobile number");
bt_modify.setEnabled(false);
}
} catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
bt_modify.setEnabled(false);
}

Cancel Booking button

 

 

if(tf_mob.getText().isEmpty()){
    JOptionPane.showMessageDialog(null, "Please input a mobile number first");
} else {
int err=JOptionPane.showConfirmDialog(null, "Are you sure?\nYou want to cancel the booking.");
if(err==0){
     try{
            Class.forName("com.mysql.jdbc.Driver");
            Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/sunmacro","root","DB_PASSWORD");
            Statement stmt=null;
            stmt=con.createStatement();
            String query="delete from books where mobile="+tf_mob.getText()+";";
            int qexecute=stmt.executeUpdate(query);
            JOptionPane.showMessageDialog(this, "The booking has been deleted from the database!");
            bt_modify.setEnabled(false);
        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, e.getMessage());
        }
        }

Creating Report Window Frame as report.java

IDE Java NetBeans have in-built feature to generate the reports all you need to go to File> Project> Select Database Samples> Fill Details > Chose Records and generate it.

Java Crystal report

Cheers!
I hope this will help you. Your suggestions and feedback will be appropriated.

Isrg Team
Isrg Team
Isrg Team is a member of Digital Pradesh News Networks, a collective of journalists, reporters, writers, editors, lawyers, advocates, professors, and scholars affiliated with the Digital Pradesh News Network.

Latest Updates