Kendriya Vidyalaya Iit-Kanpur: Grade Calculator
Kendriya Vidyalaya Iit-Kanpur: Grade Calculator
KENDRIYA VIDYALAYA
IIT-KANPUR
INFORMATICS PRACTICES PROJECT
Grade Calculator
Session: 2018-2019
Guided by: Mr. Rajesh Sharma (I.P. Teacher)
Submitted by:
Mayank Kashyap
Class: XII-E
CBSE Roll No. 5699686
1
Certificate
This is to certify that Mayank Kashyap of class XII-E has
prepared the project entitled “Grade Calculator”. The
project is the result of his efforts and endeavours. The
project is found worthy of acceptance as final project for
the subject Informatics Practices of class XII. He has
prepared the report under my guidance.
(Practical Examiner)
2
Acknowledgement
I would like to express a deep sense of thanks and
gratitude to my Informatics Practices teacher Mr. Rajesh
Sharma Sir for guiding me immensely through the course
of the project. He always evinced keen interest in my
work. Her constructive advice and constant motivation
have been responsible for the successful completion of
this project.
My sincere thanks goes to Shri R.N. Wadalkar, our
principal sir, for this coordination in extending every
possible support for the completion of this project.
I also thank to my parents for their motivation and support.
Last but not the least, I would like to thank all those
who had helped directly or indirectly towards the
completion of this project.
Mayank Kashyap
Class: XII-E
CBSE Roll No. 5699686
3
Contents
● About the project………………………………………………….4
● System Implementation…………………………………….5-6
(Hardware and Software Used)
● Netbeans…………………………………………………………..7-8
● MySQL………………………………………………………..………...9
● Database Structure……………………………………….…...10
● Imported Files…………………………………………………....11
● How the program works?....................................12-21
(Screenshots of Program)
● Codings………………………………………………………….22-26
● Objective…………………………………………………………....27
● Conclusion……………………………………………………….…28
● Bibliography……………………………………………………….29
4
5
System Implementation
Hardware Used:
★Computer: Apple iMac
★Manufacturer: Apple Inc.
★Model: iMac (21.5-inch, Mid 2011)
★Processor: 2.5 GHz Intel Core i5
★Memory: 4 GB 1333 MHz DDR3
★Graphics: AMD Radeon HD 6750M 512 MB
★System Type: 64-bit Operating System
6
Software Used:
➢macOS High Sierra Copyright © 1983-2018 Apple
Inc. All Rights Reserved.
➢Google Docs
➢Java
➢Net beans (front-end)
➢MySQL (back-end)
7
Netbeans
NetBeans is an integrated development environment
(IDE) for Java. NetBeans allows applications to be
developed from a set of modular software components
called modules. NetBeans runs on Windows, macOS,
Linux and Solaris. In addition to Java development, it
has extensions for other languages like PHP, C, C++,
HTML5, and JavaScript. Applications based on
NetBeans, including the NetBeans IDE, can be extended
by third party developers.
NetBeans platform
The NetBeans Platform is a framework for simplifying
the development of Java Swing desktop applications.
The NetBeans IDE bundle for Java SE contains what is
needed to start developing NetBeans plugins and
NetBeans Platform based applications; no additional
SDK is required.
Applications can install modules dynamically. Any
application can include the Update Center module to
allow users of the application to download digitally
signed upgrades and new features directly into the
running application.
8
NetBeans IDE
NetBeans IDE is an open-source integrated
development environment. NetBeans IDE supports
development of all Java application types (Java SE
(including JavaFX), Java ME, web, EJB and mobile
applications) out of the box. Among other features are
an Ant-based project system, Maven support,
refactorings, version control (supporting CVS,
Subversion, Git, Mercurial and Clearcase).
9
MySQL
MySQL is an open source relational database
management system (RDBMS). Its name is a
combination of "My", the name of co-founder Michael
Widenius daughter, and "SQL", the abbreviation for
Structured Query Language.
MySQL is free and open-source software under the
terms of the GNU General Public License, and is also
available under a variety of proprietary licenses. MySQL
was owned and sponsored by the Swedish company
MySQL AB, which was bought by Sun Microsystems
(now Oracle Corporation). In 2010, when Oracle
acquired Sun, Widenius forked the open-source MySQL
project to create MariaDB.
MySQL is a component of the LAMP web application
software stack (and others), which is an acronym for
Linux, Apache, MySQL, Perl/PHP/Python. MySQL is used
by many database-driven web applications, including
Drupal, Joomla, phpBB, and WordPress. MySQL is also
used by many popular websites, including Google
(though not for searches), Facebook, Twitter, Flickr, and
YouTube.
10
Database Structure
Admin Data
Result Data
11
Imported Files
import java.awt.Color;
import java.awt.HeadlessException;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JOptionPane;
import javax.swing.border.LineBorder;
12
You can press the
cancel button to
cancel login
This error will come when
Username field is empty
This error will come when
Password field is empty
14
This error will come
when Username and
Password both fields
are empty
This error will come
when Username and
Password are
incorrect
This message will come
when Username and
Password both are
correct
15
This window will be
opened when
Username and
Password both are
correct
This Username and
Password are fetched from
this table
16
This is the Grade
Calculator when
student’s details
are filled and total
marks, percentage
and grade is ready
to be calculated
17
This is the Grade
Calculator when
student’s details
are filled and total
marks, percentage
and grade is ready
to be calculated
18
You can press this
save button, to save
the student’s data
in the MySQL
database
19
This message will come
when save button is
pressed and if the entry is
valid
20
You can press the
clear button to
clear all the text
fields
This confirmation window will appear when you
press clear button
21
You can press the
exit button to exit
the program
22
Coding
Code for Login Button in Login Panel
if(jTextField1.getText().trim().isEmpty() && jTextField2.getText().trim().isEmpty()){
JOptionPane.showMessageDialog(null, "Username and Password cannot be
empty!");
}
else
if(jTextField1.getText().trim().isEmpty()){
JOptionPane.showMessageDialog(null, "Username cannot be empty!");
}
else
if(jTextField2.getText().trim().isEmpty()){
JOptionPane.showMessageDialog(null, "Password cannot be empty!");
}
else
try{
Class.forName("com.mysql.cj.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/Admin",
"root", "rnw08564");
String sql = "Select * from Admindata where username=? and password=?";
PreparedStatement pst = con.prepareStatement(sql);
pst.setString(1, jTextField1.getText());
pst.setString(2, jTextField2.getText());
ResultSet rs = pst.executeQuery();
if(rs.next()){
JOptionPane.showMessageDialog(null, "Username and Password are correct!");
NewJFrame menu = new NewJFrame();
menu.setVisible(true);
setVisible(false);
}
else{
JOptionPane.showMessageDialog(null, "Username and Password are not
correct!");
jTextField1.setText("");
jTextField2.setText("");
}
}
catch(Exception error){
JOptionPane.showMessageDialog(null,error);
}
23
jTextField9.setText("Outstanding");
}
else
if(Percent<91 && Percent>=81)
{
jTextField8.setText("B");
jTextField9.setText("Excellent");
}
else
if(Percent<81 && Percent>=71)
{
jTextField8.setText("C");
jTextField9.setText("Very Good");
}
else
if(Percent<71 && Percent>=61)
{
jTextField8.setText("D");
jTextField9.setText("Good");
}
else
if(Percent<61 && Percent>=51)
{
jTextField8.setText("E");
jTextField9.setText("Do Harder Work");
}
else
if(Percent<51 && Percent>=41)
{
jTextField8.setText("E");
jTextField9.setText("Poor");
}
else
if(Percent<33)
{
jTextField8.setText("F");
jTextField9.setText("Failed");
}
25
Objective
This project has been made to store the records of
students in table like Student_Name, Roll_Number,
Physics_Marks, Chemistry_Marks, Mathematics_Marks,
Total Marks, Percentage, Grade and Remarks.
Also to eliminate the paper work done by the teachers,
to record every student’s details and results in
computerised system so that problem as record file
missing won’t be happen, to design a user friendly
graphical user interface which suit the user and to save
the cost and time.
Thus the project “Grade Calculator” can be altered in
accordance with the future requirements of the school
or organisation.
28
Conclusion
“Grade Calculator” has been prepared to reduce
manual work and with help of this application
programme the system was able to process and update
the database with more ease.
29
Bibliography
● Sumita Arora Class XII
● Slideshare.net
● Wikipedia
● Google.com
● Youtube.com
● Netbeans Forums
● Cbse.nic.in
● Sourcecode.in