This document provides a summary of the code and forms used in an online book reading and publishing software project created in Java NetBeans IDE using MySQL database. The project contains forms like homepage, registration, books, authors, publish etc. Each form has code for buttons, text fields and other components. The forms are interconnected and allow users to read books, publish stories and view their profile. The project aims to automate functions of an online book store using a GUI based application.
Vade Meccum_Book reading and publishing software NetBeans.docx
1. [1]
Kendriya Vidyalaya Sunjuwan
JAMMU
A Project Report on
ONLINE BOOK READING AND PUBLISHING
For
AISSCE 2017 Examination
[As a part of the Informatics Practices Course (065)]
SUBMITTED BY
Geeta Shreeprabha
Under the Guidance of:
Mrs. Sangita Yadav
PGT (Comp.Sc)
2. [2]
CERTIFICATE
This is to certify that the Project / Dissertation entitled
Online Book Reading and Publishing system is a
bonafide work done by Miss Geeta Shreeprabha of class
XII A Session 2017-18 in partial fulfillment of CBSE’s
AISSCE Examination 2017 and has been carried out under
my direct supervision and guidance. This report or a
similar report on the topic has not been submitted for any
other examination and does not form a part of any other
course undergone by the candidate.
Signature of Student Signature of Teacher
Name: Geeta Shreeprabha Name: Mrs. Sangita Yadav
Designation: PGT (Comp.Sc.)
3. [3]
ACKNOWLEDGEMENT
I undertook this Project work, as the part of my XII-Informatics Practices
course. I had tried to apply my best of knowledge and experience, gained during
the study and class work experience. However, developing software system is
generally a quite complex and time-consuming process. It requires a systematic
study, insight vision and professional approach during the design and
development. Moreover, the developer always feels the need, the help and good
wishes of the people near you, who have considerable experience and idea.
I would like to extend my sincere thanks and gratitude to my teacher Mrs. Sangita
Yadav. I am very much thankful to our Principal Mr.Manish Tuli for giving
valuable time and moral support to develop this software.
I would like to take the opportunity to extend my sincere thanks and gratitude to
my parents and sisters for being a source of inspiration and providing time and
freedom to develop this software project.
Geeta Shreeprabha
Class XII A
4. [4]
CONTENTS
1. Introduction 5
2. Objective & Scope of the Project 5
3. Theoretical Background 7
4. Problem Definition & Analysis 7
5. System Implementation 12
5.1 The Hardware used: 12
5.2 The Softwares used: 12
6. System Design & Development 13
6.2 I/O Forms Design & Event Coding: 14
5. [5]
INTRODUCTION
This software project is developed to automate the functionalities of a User Friendly Book
Store.The purpose of the software project is to develop a program which provides a friendly
interface for the user to explore books written by various authors,read ,shop and even give them
opportunity to publish there own short stories and buy them according to their choice. This
program mainly brings forth the usage of GUI programming in the daily usage over the network.
The program when made to work over the network can prove to be an ultimate way of interaction
between the user and the store.
A MIS mainly consists of a computerized database, a collection of inter-related tables for a
particular subject or purpose, capable to produce different reports relevant to the user. An
application program is tied with the database for easy access and interface to the database. Using
Application program or front-end, we can store, retrieve and manage all information in proper
way.
This software, being simple in design and working, does not require much of training to users, and
can be used as a powerful tool for the automating the Book Store.
During coding and design of the software Project, Java NetBeans IDE, a powerful front-end tool
is used for getting Graphical User Interface (GUI) based integrated platform and coding
simplicity. As a back-end a powerful, open source RDBMS, My SQL is used as per requirement
of the CBSE curriculum of Informatics Practices Course.
6. [6]
Objective & Scope of the Project
T
he objective of the software project is to develop a computerized MIS to automate the functions
of a Book Store.
During the development of The book store ‘Vade Meccum’ project, Java NetBeans IDE, a
powerful, open source event-driven form-based development environment is used for modular
design and future expandability of the system.
Despite of the best effort of the developer, the following limitations and functional boundaries
are visible, which limits the scope of this application software.
1. This software can store records and produce reports in pre-designed format in soft copy.
There is no facility yet to produce customized reports. Only specified reports are covered.
2. There is no provision to calculate fine or penalty etc. for defaulter members; however it
can be developed easily with the help of adding modules.
3. Some application areas like updation of stock, updation of stories read or published,saving
of last purchase etc. are not implemented in the project. It facilitates the buyer to go through the
products of the store and choose as per his wish to buy the book. This project is made by keeping
in mind that it is to be used over the network, which can facilitate ease of shopping and reading.
So far as future scope of the project is concerned, firstly it is open to any modular expansion i.e.
other modules or functions can be designed and embedded to handle the user need in future. Any
part of the software and reports can be modified independently without much effort.
7. [7]
Theoretical Background
What is Database?
Introduction and Concepts:
A database is a collection of information related to a particular subject or purpose, such as tracking
customer orders or maintaining a product collection. Using any RDBMS application software like
MS SQL Server, MySQL, Oracle, Sybase etc, you can manage all your information from a single
database file. Within the file, divide your data into separate storage containers called tables. You
may and retrieve the data using queries.
Role of RDBMS Application Program:
A computer database works as a electronic filing system, which has a large number of ways of
cross-referencing, and this allows the user many different ways in which to re-organize and
retrieve data. A database can handle business inventory, accounting and filing and use the
information in its files to prepare summaries, estimates and other reports. The management of data
in a database system is done by means of a general-purpose software package called a Database
Management System (DBMS). Some commercially available DBMS are MS SQL Server, MS
ACCESS, INGRES, ORACLE, and Sybase. A database management system, therefore, is a
combination of hardware and software that can be used to set up and monitor a database, and can
manage the updating and retrieval of database that has been stored in it. Most of the database
management systems have the following capabilities:
What is My SQL ?
MySQL, the most popular Open Source SQL database management system, is developed,
distributed, and supported by Oracle Corporation. MySQL is named after co-founder Monty
Widenius's daughter, My. The name of the MySQL Dolphin (our logo) is “Sakila,”.
What is NetBeans IDE ?
NetBeans started as a student project (originally called Xelfi) in the Czech Republic in 1996. The
goal was to write a Delphi-like Java IDE in Java. Xelfi was the first Java IDE (Integrated
Development Environment) written in Java, with its first pre-releases in 1997.
8. [8]
Problem Definition & Analysis
Problem definition and Analysis is the activity that encompasses learning about the problem to be
solved, understanding the needs of customer and users, trying to find out who the user really is,
and understanding all the constraints on the solution. It includes all activities related to the
following:
✔ Identification and documentation of customer’s or user’s needs.
✔ Creation of a document that describes the external behavior and the association constraints
that will satisfies those needs.
✔ Analysis and validation of the requirements documents to ensure consistency,
completeness, and feasibility
✔ Evolution of needs.
System Implementation
The Hardware used:
While developing the system, the used hardware are:
PC with Intel i3 Core processor and other required devices.
The Softwares used:
⮚ Microsoft Windows® 8.1 as Operating System.
⮚ Java NetBeans 8.2 as Front-end Development environment.
⮚ MySQL as Back-end Sever with Database for Testing.
⮚ MS-Word 2007 for documentation.
9. [9]
I/O Forms Design & Event Coding:
The software project for New Book Store ‘Vade Meccum’ contains various forms along with
programming codes. Forms (JFrames) and their event coding are given below.
Frame: HOMEPAGE.java
import javax.swing.*;
import java.sql.*;
public class HOMEPAGE extends javax.swing.JFrame {
;
/**
* Creates new form HOMEPAGE
*/
public HOMEPAGE() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
10. [10]
private void initComponents() {
//CODE FOR THE SIGN IN BUTTON
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String user=jTextField1.getText();
String pass =jTextField2.getText();
String str=null;
Statement stmt=null;
ResultSet rs=null;
try{
Class.forName("java.sql.Driver");
Connection con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:3306/cbse","root", "star");
stmt=con.createStatement();
String sql="SELECT * FROM login WHERE username='"+user+ "'";
rs=stmt.executeQuery(sql);
rs.next();
str=rs.getString("password");
rs.close();
stmt.close();
con.close();
if(str.equals(pass)){
BOOKS BO=new BOOKS();
BO.setVisible(true);
this.setVisible(false);
}
else{
JOptionPane.showMessageDialog(null,"INVALID USERNAME OR PASSWORD");
}
} catch(Exception e)
{ JOptionPane.showMessageDialog(null,"INVALID USERNAME OR PASSWORD"); }
// CODE FOR NEW USER BUTTON
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
this.setVisible(false);
11. [11]
REGISTER RE=new REGISTER();
RE.setVisible(true);
Frame: REGISTER.java
import javax.swing.JOptionPane;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import java.sql.ResultSet;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
12. [12]
* @author POWER USER
*/
public class REGISTER extends javax.swing.JFrame {
/**
* Creates new form REGISTER
*/
public REGISTER() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
//CODE FOR THE DESIGNS
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
//CODE FOR THE SUBMIT BUTTON
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
{
String s=jTextField1.getText();
int u=Integer.parseInt(jTextField2.getText());
String pass=jTextField4.getText();
String email=jTextField3.getText();
if (s.isEmpty())
JOptionPane.showMessageDialog(null,"Name not Entered");
else if (email.isEmpty())
13. [13]
JOptionPane.showMessageDialog(null,"Email not Entered");
else if (pass.isEmpty())
JOptionPane.showMessageDialog(null,"password not Entered");
else
try{
Class.forName("java.sql.DriverManager");
Connection con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:3306/cbse","root", "star");
Statement stmt = (Statement) con.createStatement();
String query="INSERT INTO register VALUES('"+s+"','"+u+"','"+email+"','"+pass+"');";
stmt.executeUpdate(query);
query="INSERT INTO login VALUES('"+s+"','"+pass+"')";
stmt.executeUpdate(query);
{
BOOKS BO=new BOOKS();
this.setVisible(false);
BO.setVisible(true);
}
}
catch(Exception e)
//this block is executed in case of an exception
{
//Display an error message in the dialog box for an exception
JOptionPane.showMessageDialog (this, e.getMessage());
}
}
//CODE FOR CANCEL BUTTON
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
15. [15]
import javax.swing.JOptionPane;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author POWER USER
*/
public class BOOKS extends javax.swing.JFrame {
/**
* Creates new form BOOKS
*/
public BOOKS() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
16. [16]
@SuppressWarnings("unchecked")
//CODE FOR READ BUTTON
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
Authors Au=new Authors() ;
JOptionPane.showMessageDialog(null,"Choose author from the world of books");
Au.setVisible(true);
// TODO add your handling code here:
}
//CODE FOR PUBLISH BUTTON
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
publish pu= new publish();
this.setVisible(false);
pu.setVisible(true);// TODO add your handling code here:
}
//CODE FOR MY PROFILE BUTTON
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
SLIDE S= new SLIDE();
this.setVisible(false);
S.setVisible(true);
}
//CODE FOR SHOP BUTTON
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
SHOP SH=new SHOP();
SH.setVisible(true);
this.setVisible(false);// TODO add your handling code here:
}
//CODE FOR SIGNOUT BUTTON
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false) ;
HOMEPAGE HO=new HOMEPAGE(); HO.setVisible(true);
Frame: SLIDE.java
17. [17]
public class SLIDE extends javax.swing.JFrame {
/**
* Creates new form SLIDE
*/
public SLIDE() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
//CODE FOR RESET BUTTON
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
jTextField1.setText("");
19. [19]
public class Authors extends javax.swing.JFrame {
/**
* Creates new form Authors
*/
public Authors() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
//CODE FOR PREMCHAND AUTHOR
private void jButton17ActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false); PREMCHAND PR=new PREMCHAND();PR.setVisible(true);
Frame: PREMCHAND.java
20. [20]
public class PREMCHAND extends javax.swing.JFrame {
/**
* Creates new form PREMCHAND
*/
public PREMCHAND() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
KATHA KA= new KATHA();
this.setVisible(false);
KA.setVisible(true);
Frame: KATHA.java
public class KATHA extends javax.swing.JFrame {
/**
21. [21]
* Creates new form KATHA
*/
public KATHA() {
initComponents();
}
Frame: SHOP.java
Frame:publish.java
22. [22]
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import javax.swing.JOptionPane;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author POWER USER
*/
public class publish extends javax.swing.JFrame {
/**
* Creates new form publish
*/
public publish() {
initComponents();
}
23. [23]
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
//CODE FOR SUBMIT BUTTON
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
{
String title=jTextField1.getText();
String s=jTextArea1.getText();
if(s.isEmpty())
JOptionPane.showMessageDialog(null,"this field cannot be empty");
else
try{
Class.forName("java.sql.DriverManager");
Connection con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:3306/cbse","root", "star");
Statement stmt = (Statement) con.createStatement();
String query="INSERT INTO desk VALUES('"+s+"','"+title+"');";
stmt.executeUpdate(query);
query="INSERT INTO compositions VALUES('"+title+"')";
stmt.executeUpdate(query);
{
MYIDEAS MY=new MYIDEAS();
MY.setVisible(true);
this.setVisible(false);
}
}
catch(Exception e)
24. [24]
//this block is executed in case of an exception
{
//Display an error message in the dialog box for an exception
JOptionPane.showMessageDialog (this, e.getMessage());
}
}
//CODE FOR CANCEL BUTTON
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
BOOKS BO=new BOOKS();
this.setVisible(false);
BO.setVisible(true);// TODO add your handling code here:
}
// TODO add your handling code here:
}
Frame: MYIDEAS.java
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
25. [25]
import javax.swing.JOptionPane;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author POWER USER
*/
public class MYIDEAS extends javax.swing.JFrame {
/**
* Creates new form MYIDEAS
*/
public MYIDEAS() {
initComponents();
}
//CODE FOR SHOW BUTTON
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String title=jTextField1.getText();
String s=jTextArea2.getText();
String str=null;
Statement stmt=null;
ResultSet rs=null;
if(s.isEmpty())
try{
Class.forName("java.sql.Driver");
Connection con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:3306/cbse","root", "star");
stmt=con.createStatement();
String sql="SELECT comp FROM DESK WHERE title='" +title+ "'";