Publicité
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
Publicité
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
Publicité
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
Publicité
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
Publicité
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
Publicité
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
Publicité
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
Publicité
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
Publicité
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
Publicité
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
PROJECT FOR CSE BY TUSHAR DHOOT
Prochain SlideShare
Online Examinition SystemOnline Examinition System
Chargement dans ... 3
1 sur 73
Publicité

Contenu connexe

Publicité

PROJECT FOR CSE BY TUSHAR DHOOT

  1. i-TG A Project Work Submitted as Minor Project in Bachelor of Computer Science & Engineering Submitted to- RAJIV GANDHI PROUDYOGIKI VISHWAVIDYALAYA BHOPAL (M.P) Submitted By Ravi Shankar(0105CS111090) Shrenik Modi (0105CS111107) Tushar Dhoot(0105CS111116) Under the Guidance of Prof. Shwaita Kodesiya (Department of Computer Science & Engineering) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING JAN-JUN 2014
  2. Oriental Institute of science and technology Page 2 CERTIFICATE This is to certify that the project entitled “Information For Tutor Guardian” being submitted by Ravi Shankar,Shrenik Modi and Tushar Dhoot student of 6th Semester, in Computer Science & Engineering have done their work as MINOR PROJECT for Partial fulfillment of the degree from RGPV, Bhopal (M.P.) is a record of bonafide work carried out by them under our supervision. Prof. Shwaita Kodesiya Prof. Sreeja Nair Guide Head Department of Computer Department of computer Science & Engineering Science & Engineering Prof. Amit Shrivastava/Prof Atul Barve Project Coordinators
  3. Oriental Institute of science and technology Page 3 Acknowledgement We would like to place on record my deep sense of gratitude to Prof. Shreeja Nair HOD-Dept. of Computer Science Engineering OIST Bhopal , for his generous guidance, help and useful suggestions. We express my sincere gratitude to Prof. Shwaita Kodesiya Dept. of Computer Science Engineering, OIST Bhopal, for his stimulating guidance, continuous encouragement and supervision throughout the course of present work. We also wish to extend my thanks to Prof. Amit shrivastava and other colleagues for attending my seminars and for their insightful comments and constructive suggestions to improve the quality of this project work. We are extremely thankful to Dr. V.K.Sahu, Director OIST Bhopal for providing me infrastructural facilities to work in, without which this work would not have been possible.
  4. Oriental Institute of science and technology Page 4 Table of Contents  LIST OF FIGURES  INTRODUCTION  BACKGROUND AND LITERATURE SURVEY  PROCESS MODEL  DESIGN  TECHNICAL DETAILS  CODING  SCREEN LAYOUTS  FUTURE ENHANCEMENTS  CONCLUSION  BIBLIOGRAPHY
  5. Oriental Institute of science and technology Page 5 List Of figures Figure Title Page no. 3.1 Waterfall model 4.1 Use case diagram 4.2 Sequence Diagram 4.3 Component diagram 4.4 Deployment Diagram 4.5 Flow chart
  6. Oriental Institute of science and technology Page 6 ABSTRACT  For the College administration, managing student information fast with simplicity and ease at their fingertips is possible with this software.  Just a click of the mouse on the web and the user can access and manage real-time information of any particular student in seconds!  The College management can speedily monitor students’ academic progress and take necessary actions accordingly at the same time engage with parents and focus on holistic development of students.  Tutor guardian can perform enrolling of new students, mid semester marks and attendence percentage, maintaining overall details of students, handling exams and assessments, managing more.
  7. Oriental Institute of science and technology Page 7 Chapter 1:- Introduction 1.1 Overview Information for tutor guardian(i-TG) system is application that tracks current student’s academic information. It maintains academic information for ready access by office staff, their faculty advisors, and committee members. Instead of tedious paper work, tutor guardian will be able to submit required information electronically, and the departments will be able to evaluate the submissions with a much quicker turnaround. Information for tutor guardian System has been modularized into following modules. ADMINISTRATOR MODULE In this module when the administrator will enter in to the administrator page and this page consists of two following sub modules.  Student Addition/ Updation / Deletion: In i-TG each Student is added, updated or deleted according to its branch.  Attendance/Result Generation: In i-TG information about attendance and Internal result is generated. 1.2 Project Objective :-.  Can be used anywhere any time as it is a web based application(user location doesn’t matter). 1.3 PROJECT SCOPE: Student Information System is a web-based application for students, faculty, academic staff and parents who want to get and retrieve student’s whole information instantly via internet. The major benefit of this web portal is to store the students information at one place (like SERVER) and it can be accessed via online interaction. The i-TG web portal is to replace the old and traditional file(paper work) storing process. Instead of tedious paper work, students will be able to submit required information electronically, and the departments will be able to evaluate the submissions with a much quicker turnaround
  8. Oriental Institute of science and technology Page 8 CHAPTER 2:-BACKGROUND AND LITERATURE SURVEY 2.1 Software Requirement Specification:- 2.1.1 Introduction:- The purpose of designing this software is to provide teacher with all the data and facts related to students sitting at one place.It enables the faculty a better understanding of different students of different semester and branch . 2.1.2.1 Functional requirement:- The main features of File splitter are- Splitting and Combining. In Splitting, the file is split into the pieces of specified size or into specified number of files, which helps in sending or taking the file to any of the storage media. In combining, the split file pieces are combined back together into the original file. 2.1.3 Non functional requirement:- -Attractive user interface -Fast response time . -Development environment of wamp server and Adobe Dreamweaver. -Reliability 2.1.4 interface:- 2.1.4.1 User Interfaces:- -home page which provides all function. -user interface should be easy to interact
  9. Oriental Institute of science and technology Page 9 2.1.4.2 Hardware Interfaces Monitor screen:-The software shall display information to the user via monitor. Mouse:-The software shall interact with the movement of the mouse. Keyboard:-The software shall interact with the keystrokes of the keyboard. 2.1.4.3 Software interface Software interface is developed in JAVA and SQL language.interface of this SOFTWARE developed according to the latest tags of JAVA and SQL. 2.2 Feasibility Report :- 2.2.1 Innovativeness and Usefulness :- Technical feasibility centers on the existing manual system of the test management process and to what extent it can support the system. According to feasibility analysis procedure the technical feasibility of the system is analyzed and the technical requirements such as software facilities ,input are identified. 2.2.2Market Potential and Competitive advantages:- Economic analysis is most frequently used for evaluation of the effectiveness of the system. This part of feasibility study gives the top management the economic justification for the new system. This system has a great market potential because, if the organization implements this system, it need not require any additional hardware resources as well as it will be saving lot of time. DEVELOPMENT METHOD: The following methods and approaches are used to develop this project.
  10. Oriental Institute of science and technology Page 10 Microsoft SQL Server A database management, or DBMS, gives the user access to their data and helps them transform the data into information. These systems allow users to create, update and extract information from their database. A database is a structured collection of data. Data refers to the characteristics of people, things and events. SQL Server stores each data item in its own fields. In SQL Server, the fields relating to a particular person, thing or event are bundled together to form a single complete unit of data, called a record (it can also be referred to as raw or an occurrence). Each record is made up of a number of fields. No two fields in a record can have the same field name.  SQL Server Tables SQL Server stores records relating to each other in a table. Different tables are created for the various groups of information. Related tables are grouped together to form a database.  Primary Key Every table in SQL Server has a field or a combination of fields that uniquely identifies each record in the table. The Unique identifier is called the Primary Key, or simply the Key. The primary key provides the means to distinguish one record from all other in a table. It allows the user and the database system to identify, locate and refer to one particular record in the database.  Foreign Key When a field is one table matches the primary key of another field is referred to as a foreign key. A foreign key is a field or a group of fields in one table whose values match those of the primary key of another table.  Referential Integrity Not only does SQL Server allow you to link multiple tables, it also maintains consistency between them. Ensuring that the data among related tables is correctly matched is referred to as maintaining referential integrity.  Relational Database Sometimes all the information of interest to a business operation can be stored in one table. SQL Server makes it very easy to link the data in multiple tables. Matching an employee to the department in which they work is one example. This is what makes SQL Server a relational database management system, or RDBMS. It stores data in two or more tables and enables you to define relationships between the table and enables you to define relationships between the tables.  Data Abstraction
  11. Oriental Institute of science and technology Page 11 A major purpose of a database system is to provide users with an abstract view of the data. This system hides certain details of how the data is stored and maintained. Data abstraction is divided into three levels. o Physical level: This is the lowest level of abstraction at which one describes how the data are actually stored. o Conceptual Level: At this level of database abstraction all the attributed and what data are actually stored is described and entries and relationship among them. o View level: This is the highest level of abstraction at which one describes only part of the database. Advantages of RDBMS  Redundancy can be avoided  Inconsistency can be eliminated  Data can be Shared  Standards can be enforced  Security restrictions ca be applied  Integrity can be maintained  Conflicting requirements can be balanced  Data independence can be achieved. Disadvantages of RDBMS A significant disadvantage of the RDBMS system is cost. In addition to the cost of purchasing of developing the software, the hardware has to be upgraded to allow for the extensive programs and the workspace required for their execution and storage. While centralization reduces duplication, the lack of duplication requires that the database be adequately backed up so that in case of failure the data can be recovered. JAVA 1.6 The most important characteristic of Java is that it was designed from the outset to be machine independent. We can run Java programs unchanged on any machine and operating system combination that supports Java. Java programs are intrinsically more portable than programs written in other languages. An application written in Java will only require a single set of source code statements, regardless of the number of different computer platforms on which it is run, so it is very useful for internet application.  Platform independence - Java programs can be run on many platforms without modification. This portability is assured by using a Virtual machine1 . When a Java program is compiled byte-code is created rather than a standard executable file. Effectively, this is machine code for a virtual machine, which is then interpreted by the Java interpreter. The byte- code can be run on any platform which has a suitable interpreter.  Security - since Java has always been designed with distributed applications in mind, security has been incorporated right from the start, and if anything this has been seen to be too restrictive.
  12. Oriental Institute of science and technology Page 12 Java and the JDK The Java Development Kit contains all the necessary tools for the development of Java applications and applets, including a compiler, interpreter, class libraries, applet viewer and debugger. The current version of the JDK, 1.4.2, is freely available from Sun's web she- for machines running Windows 95, Windows NT, Solaris SPARC and Solaris x86, and a version for the Macintosh is expected later this year (version 1,0 is currently available). Ports to other machines may also be available from other sources. It should be noted that browsers may not yet support applets created using features in the latest JDK. Characteristics of Java  Simple  Secure  Portable  Object-oriented  Robust  Multithreaded  Architecture-neutral  Interpreted  High performance  Distributed  Dynamic J2EE The Java-2 Enterprise Edition (J2EE™) provides a component-based approach to the design, development, assembly, and deployment of enterprise applications. The J2EE platform offers a multitiered distributed application model, reusable components, a unified security model, flexible transaction control, and web services support through integrated data interchange on Extensible Markup Language (XML)-based open standards and protocols. Components of J2EE  SERVLET Java servlets are small, platform-independent Java programs that can be used to extend the functionality of a Web server in a variety of ways. Servlets are to the server what applets are to the client—small Java programs compiled to bytecode that can be loaded dynamically and that extend the capabilities of the host. It is a server side programming language.  JSP Java Server Pages is the extension of servlet to simplify the programming and coding of servlet. It includes HTML tags to make coding easy. Ultimately it convert into the servlet at the time of calling.
  13. Oriental Institute of science and technology Page 13 CHAPTER 3:- PROCESS MODEL(complete) 3.1 Proposed Process Model:- In this project Waterfall Model is followed. . Fig 3.1
  14. Oriental Institute of science and technology Page 14 This model contains 6 phases:-  Feasibility and requirement analysis :- Requirement gathering activity involves the analysis of the problem and collection of the relevant information relating to the product. The main aim of this activity is to determine whether it would be financially and technically feasible to develop the product.  Requirement gathering:- The goal of this phase is to understand the exact requirements of the customer and to document them properly.  System Design :- The goal of this phase is to transform the requirement specification into a structure that is suitable for implementation in some programming language.  Testing:- In this phase all the modules of the software are tested.  Deployment of System:- In this all the modules are integrated and then deployed.  Operation and Maintenance:- Release of software inaugurates the operation and life cycle phase of the operation. The phases always occur in this order and do not overlap.
  15. Oriental Institute of science and technology Page 15 CHAPTER 4:- DESIGN 4.1 Use case diagram:- A use case diagram can portray the different types of users of a system and the various ways that they interact with the system. Fig 4.1
  16. Oriental Institute of science and technology Page 16 4.2Class diagram
  17. Oriental Institute of science and technology Page 17 4.3 Sequence Diagram:- A sequence diagram interaction diagram that shows how processes operate with one another and in what order. SEQUENCE DIAGRAM OF HOME PAGE:-
  18. Oriental Institute of science and technology Page 18 SEQUENCE DIAGRAM OF COMPARE PAGE:-
  19. Oriental Institute of science and technology Page 19 4.3 Component Diagram:- A component diagram depicts how components are wired together to form larger components and or software system. They are used to illustrate the structure of arbitrarily complex systems.
  20. Oriental Institute of science and technology Page 20 4.4 Deployment Diagram:- A deployment diagram in the Unified Modeling Language models the physical deployment of artifacts on nodes.
  21. Oriental Institute of science and technology Page 21 CHAPTER 5:- TECHNICAL DETAILS(complete) 5.1 Software Specification:-  Front end java  Back end php,myqsl  Database My SQL.  Server wamp server  Connectivity php. 5.2Hardware Specification:-  2GH processor (minimum).  512 MB RAM (minimum).  20 GB Hard disk (minimum).
  22. Oriental Institute of science and technology Page 22 CHAPTER 6:- CODING DATA MANAGER: import java.io.Serializable; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.Configuration; import org.hibernate.exception.spi.Configurable; public class DataManager { private SessionFactory factory; public DataManager() { try { factory = new Configuration().configure().buildSessionFactory(); } catch (Exception ex) { System.out.println("Data Manager >> Error in DataManager Constructor:" + ex); } }
  23. Oriental Institute of science and technology Page 23 public void init() { try { factory = new Configuration().configure().buildSessionFactory(); } catch (Exception ex) { System.out.println("Data Manager >> Error in DataManager init:" + ex); } } public void add_a_student(Student s) { Session session = factory.openSession(); Transaction tx = null; try { tx = session.beginTransaction(); String roll_no = (String) session.save(s); System.out.println("Data Manager >> Student Saved roll_no = " + roll_no); tx.commit(); } catch (Exception ex) { System.out.println("Data Manager >> Could not save student roll_no = " + s); } finally { session.close(); } } public void update_a_student(Student s) {
  24. Oriental Institute of science and technology Page 24 Session session = factory.openSession(); Transaction tx = null; try { tx = session.beginTransaction(); // Student s1 = (Student) session.get(Student.class, s.getRoll_number()); session.update(s); System.out.println("Data Manager >> Student updated roll_no = " + s.getRoll_number()); tx.commit(); } catch (Exception ex) { System.out.println("Data Manager >> Could not updated student roll_no = " + s.getRoll_number()); } finally { session.close(); } } public void delete_a_student(String roll_no) { Session session = factory.openSession(); Transaction tx = null; try { tx = session.beginTransaction(); Student s = (Student) session.get(Student.class, roll_no); session.delete(s); System.out.println("Data Manager >> Student deleted roll_no = " + roll_no);
  25. Oriental Institute of science and technology Page 25 tx.commit(); } catch (Exception ex) { System.out.println("Data Manager >> Could not delete student roll_no = " + roll_no); } finally { session.close(); } } public Student get_a_student(String roll_no) { Session session = factory.openSession(); Student s = null; Transaction tx = null; try { tx = session.beginTransaction(); s = (Student) session.get(Student.class, roll_no); System.out.println("Data Manager >> Student fetched roll_no = " + roll_no); tx.commit(); return s; } catch (Exception ex) { System.out.println("Data Manager >> Could not fetch student roll_no = " + roll_no); } finally { session.close(); }
  26. Oriental Institute of science and technology Page 26 return s; } public List get_selected_sem_students(int semester) { Session session = factory.openSession(); List results = null; Transaction tx = null; try { tx = session.beginTransaction(); String hql = "FROM Student S WHERE S.semester =" + semester; Query query = session.createQuery(hql); results = query.list(); System.out.println("Data Manager >> List fetched = " + semester); tx.commit(); return results; } catch (Exception ex) { System.out.println("Data Manager >> Could not fetch list semester = " + semester); } finally { session.close(); } return results; }
  27. Oriental Institute of science and technology Page 27 }
  28. Oriental Institute of science and technology Page 28 STUDENT ENTITY CLASS : import java.util.ArrayList; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; @Entity public class Student { @Id private String roll_number; private String name; private int semester; private String contact_number; private String address; private ArrayList midsem1_marks_list; private ArrayList midsem2_marks_list; private float[][] attendance_grid; Student() {
  29. Oriental Institute of science and technology Page 29 midsem1_marks_list = new ArrayList<Float>(); midsem2_marks_list = new ArrayList<Float>(); attendance_grid = new float[5][5]; } public float[][] getAttendance_grid() { return attendance_grid; } public void setAttendance_grid(float[][] attendance_grid) { this.attendance_grid = attendance_grid; } public ArrayList getMidsem1_marks_list() { return midsem1_marks_list; } public void setMidsem1_marks_list(ArrayList midsem1_marks_list) { this.midsem1_marks_list = midsem1_marks_list; } public ArrayList getMidsem2_marks_list() { return midsem2_marks_list; } public void setMidsem2_marks_list(ArrayList midsem2_marks_list) { this.midsem2_marks_list = midsem2_marks_list; }
  30. Oriental Institute of science and technology Page 30 public String getContact_number() { return contact_number; } public void setContact_number(String contact_number) { this.contact_number = contact_number; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public Student(String roll_number, String name, int semester) { this.roll_number = roll_number; this.name = name; this.semester = semester; } public String getRoll_number() { return roll_number; } public void setRoll_number(String roll_number) { this.roll_number = roll_number;
  31. Oriental Institute of science and technology Page 31 } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getSemester() { return semester; } public void setSemester(int semester) { this.semester = semester; } public void set_all_stats_zero() { for (int i = 0; i < 5; i++) { midsem1_marks_list.add(i, 0); midsem2_marks_list.add(i, 0); for (int j = 0; j < 5; j++) { attendance_grid[i][j]=0; } } } } CLASS SUBJECTS:
  32. Oriental Institute of science and technology Page 32 import java.util.ArrayList; public class Subjects { public static ArrayList<String> getSubjects(int semester) { ArrayList<String> subjects = new ArrayList<>(); switch (semester) { case 1: subjects.add("Sub-1"); subjects.add("Sub-2"); subjects.add("Sub-3"); subjects.add("Sub-4"); subjects.add("Sub-5"); break; } return subjects; } } Subject Entity Class : public class Subject { private String subjectCode; private int semester;
  33. Oriental Institute of science and technology Page 33 private String subjectName; public Subject(String subjectCode, int semester, String subjectName) { this.subjectCode = subjectCode; this.semester = semester; this.subjectName = subjectName; } public String getSubjectCode() { return subjectCode; } public void setSubjectCode(String subjectCode) { this.subjectCode = subjectCode; } public int getSemester() { return semester; } public void setSemester(int semester) { this.semester = semester; } public String getSubjectName() { return subjectName; } public void setSubjectName(String subjectName) {
  34. Oriental Institute of science and technology Page 34 this.subjectName = subjectName; } public void load(){ } }
  35. Oriental Institute of science and technology Page 35 Hibernate Configuration : <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE hibernate-configuration SYSTEM "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.dialect"> org.hibernate.dialect.MySQLDialect </property> <property name="hibernate.connection.driver_class"> com.mysql.jdbc.Driver </property> <!-- Assume test is the database name --> <property name="hibernate.connection.url">jdbc:mysql://localhost/d1</property> <property name="hibernate.connection.username">root</property> <property name="hibernate.connection.password"> </property> <property name="show_sql">true</property> <property name="hibernate.hbm2ddl.auto">update</property> <mapping class="Student"/> </session-factory> </hibernate-configuration>
  36. Oriental Institute of science and technology Page 36
  37. Oriental Institute of science and technology Page 37 Loading the list of students from database : DefaultTableModel tm = (DefaultTableModel) tbl3.getModel(); int rowCount = tm.getRowCount(); for (int i = rowCount; i > 0; i--) { tm.removeRow(i - 1); } int selected_sem = sem_combo.getSelectedIndex() + 1; List l = dataManager.get_selected_sem_students(selected_sem); for (Object o : l) { Student s = (Student) o; System.out.println("Student : " + s.getRoll_number()); Object arr[] = {s.getRoll_number(), s.getName()}; tm.addRow(arr); } Adding a student : if (name_field.getText().isEmpty() == false && roll_field.getText().isEmpty() == false && roll_field.getText().trim().equals("") == false) { String name = name_field.getText().trim(); String roll = roll_field.getText().trim(); int selected_month = month_combo.getSelectedIndex() + 1; int selected_sem = onFormSemesterCombo.getSelectedIndex() + 1;
  38. Oriental Institute of science and technology Page 38 String contact_number = contactNumberField.getText().trim(); String address = addressField.getText().trim(); //writing to Database Student s = new Student(); s.setRoll_number(roll); s.setName(name); s.setSemester(selected_sem); s.setAddress(address); s.setContact_number(contact_number); s.set_all_stats_zero(); dataManager.add_a_student(s); } else { JOptionPane.showMessageDialog(rootPane, "Improper input", "Error", JOptionPane.ERROR_MESSAGE); } load(); Updating student : if (name_field.getText().trim().isEmpty() == false && roll_field.getText().trim().isEmpty() == false) { String name = name_field.getText().trim(); String roll = roll_field.getText().trim();
  39. Oriental Institute of science and technology Page 39 int selected_month = month_combo.getSelectedIndex() + 1; int selected_sem = onFormSemesterCombo.getSelectedIndex() + 1; String contact_number = contactNumberField.getText().trim(); String address = addressField.getText().trim(); //writing to Database Student s = new Student(); s.setRoll_number(roll); s.setName(name); s.setSemester(selected_sem); s.setAddress(address); s.setContact_number(contact_number); dataManager.update_a_student(s); } else { JOptionPane.showMessageDialog(rootPane, "Improper input", "Error", JOptionPane.ERROR_MESSAGE); } load(); Updating the panels: int selected_month = month_combo.getSelectedIndex() + 1; int selected_sem = sem_combo.getSelectedIndex() + 1; String roll_no = roll_field.getText().trim(); Student s = dataManager.get_a_student(roll_no);
  40. Oriental Institute of science and technology Page 40 update_info_panel(s); update_midsem1_panel(Subjects.getSubjects(1), s); update_midsem2_panel(Subjects.getSubjects(1), s); update_attendance_panel(Subjects.getSubjects(1), s, selected_month); ///////////////////////////////////// // now fetch mid sem marks switch (graph_panel.getSelectedIndex()) { case 0: gPanel_att.getGraphics().clearRect(0, 0, gPanel_att.getWidth(), gPanel_att.getHeight()); drawAttendanceGraph(Subjects.getSubjects(selected_sem), s.getAttendance_grid()[selected_month - 1][0], s.getAttendance_grid()[selected_month - 1][1], s.getAttendance_grid()[selected_month - 1][2], s.getAttendance_grid()[selected_month - 1][3], s.getAttendance_grid()[selected_month - 1][4], gPanel_att); break; case 1: gPanel_mid1.getGraphics().clearRect(0, 0, gPanel_mid1.getWidth(), gPanel_mid1.getHeight()); drawMidSemGraph(Subjects.getSubjects(1), s.getMidsem1_marks_list(), gPanel_mid1);
  41. Oriental Institute of science and technology Page 41 draw_gr_mid1(); break; case 2: gPanel_mid2.getGraphics().clearRect(0, 0, gPanel_mid2.getWidth(), gPanel_mid2.getHeight()); drawMidSemGraph(Subjects.getSubjects(1), s.getMidsem2_marks_list(), gPanel_mid2); draw_gr_mid2(); break; } } private void tbl3KeyPressed(java.awt.event.KeyEvent evt) { // TODO add your handling code here: int keyCode = evt.getKeyCode(); DefaultTableModel tm; if (keyCode == KeyEvent.VK_DOWN) { int selectedRow = tbl3.getSelectedRow() + 1; if (selectedRow == tbl3.getRowCount()) { --selectedRow; } tm = (DefaultTableModel) tbl3.getModel(); roll_field.setText(tm.getValueAt(selectedRow, 0).toString().trim()); name_field.setText(tm.getValueAt(selectedRow, 1).toString().trim());
  42. Oriental Institute of science and technology Page 42 } if (keyCode == KeyEvent.VK_UP) { int selectedRow = tbl3.getSelectedRow() - 1; System.out.println(selectedRow); if (selectedRow == -1) { selectedRow = 0; } tm = (DefaultTableModel) tbl3.getModel(); roll_field.setText(tm.getValueAt(selectedRow, 0).toString().trim()); name_field.setText(tm.getValueAt(selectedRow, 1).toString().trim()); } fire(); Updating Mid semester marks: if (midsem1sub1.getText().trim().isEmpty() == false || midsem1sub2.getText().trim().isEmpty() == false || midsem1sub3.getText().trim().isEmpty() == false || midsem1sub4.getText().trim().isEmpty() == false || midsem1sub5.getText().trim().isEmpty() == false) { int selected_month = month_combo.getSelectedIndex() + 1; int selected_sem = sem_combo.getSelectedIndex() + 1; String roll_no = roll_field.getText().trim(); int sub1_marks = Integer.parseInt(midsem1sub1.getText().trim()); int sub2_marks = Integer.parseInt(midsem1sub2.getText().trim());
  43. Oriental Institute of science and technology Page 43 int sub3_marks = Integer.parseInt(midsem1sub3.getText().trim()); int sub4_marks = Integer.parseInt(midsem1sub4.getText().trim()); int sub5_marks = Integer.parseInt(midsem1sub5.getText().trim()); int total = sub1_marks + sub2_marks + sub3_marks + sub4_marks + sub5_marks; double perc = 100 * ((float) total / 200); System.out.println("Midsem-1 total=" + total + "precentage= " + perc); midsem2_total.setText("" + total); midsem2_perc.setText("" + perc); Student s = dataManager.get_a_student(roll_no); s.getMidsem1_marks_list().add(0, sub1_marks); s.getMidsem1_marks_list().add(1, sub2_marks); s.getMidsem1_marks_list().add(2, sub3_marks); s.getMidsem1_marks_list().add(3, sub4_marks); s.getMidsem1_marks_list().add(4, sub5_marks); dataManager.update_a_student(s); } load(); Deleting a student : int want_to_delete = JOptionPane.showConfirmDialog(rootPane, "Are you sure to delete this record?", "Confirm Deletion", JOptionPane.YES_NO_OPTION); System.out.println("Deletion status = " + want_to_delete);
  44. Oriental Institute of science and technology Page 44 if (roll_field.getText().isEmpty() == false && want_to_delete == 0) { String roll = roll_field.getText().trim(); dataManager.delete_a_student(roll); } load(); clearBTN3ActionPerformed(null);
  45. Oriental Institute of science and technology Page 45 Drawing Graphs : public int getmaxx(JPanel j) { return j.getBounds().width; } public int getmaxy(JPanel j) { return j.getBounds().height; } public int X(int x) { // int center_x=gPanel.getSize().width/2; //return center_x+x; return x; } public int Y(int y, JPanel j) { //int center_y=gPanel.getSize().height/2; return getmaxy(j) - y; } public int perc_att(int x) { return 3 * x; } /////////////////////////////////////////////////////////////////////////////////// void drawAttendanceGraph(ArrayList<String> subjects, float a, float b, float c, float d, float e, JPanel jpanel) { Graphics g = jpanel.getGraphics();
  46. Oriental Institute of science and technology Page 46 g.setColor(Color.black); System.out.println(getmaxx(jpanel) + " " + getmaxy(jpanel)); g.drawLine(X(50), Y(30, jpanel), X(500), Y(30, jpanel)); g.drawLine(X(50), Y(30, jpanel), X(50), Y(330, jpanel)); for (int i = 1; i <= 10; i++) { g.drawLine(X(50), Y(30 + 30 * i, jpanel), X(50 - 3), Y(30 + 30 * i, jpanel)); g.drawString("" + i * 10, X(25), Y(30 + 30 * i - 5, jpanel)); } ///////////////////////////////////////////// int p1 = (int) a; g.setColor(Color.red); g.fillRect(X(90), Y(30 + perc_att(p1), jpanel), 50, perc_att(p1)); ///////////////////////////////////////////// int p2 = (int) b; g.setColor(Color.blue); g.fillRect(X(170), Y(30 + perc_att(p2), jpanel), 50, perc_att(p2)); ///////////////////////////////////////////// int p3 = (int) c; g.setColor(Color.yellow); g.fillRect(X(250), Y(30 + perc_att(p3), jpanel), 50, perc_att(p3)); ///////////////////////////////////////////// int p4 = (int) d;
  47. Oriental Institute of science and technology Page 47 g.setColor(Color.black); g.fillRect(X(330), Y(30 + perc_att(p4), jpanel), 50, perc_att(p4)); ///////////////////////////////////////////// int p5 = (int) e; g.setColor(Color.DARK_GRAY); g.fillRect(X(410), Y(30 + perc_att(p5), jpanel), 50, perc_att(p5)); /////////////////////////////////////////////// g.setColor(Color.red); g.fillRect(X(500), Y(250, jpanel), 20, 20); g.setColor(Color.blue); g.fillRect(X(500), Y(210, jpanel), 20, 20); g.setColor(Color.yellow); g.fillRect(X(500), Y(170, jpanel), 20, 20); g.setColor(Color.BLACK); g.fillRect(X(500), Y(130, jpanel), 20, 20); g.setColor(Color.darkGray); g.fillRect(X(500), Y(90, jpanel), 20, 20); g.setColor(Color.BLACK); g.drawString(subjects.get(0), X(540), Y(235, jpanel)); g.drawString(subjects.get(1), X(540), Y(195, jpanel)); g.drawString(subjects.get(2), X(540), Y(155, jpanel)); g.drawString(subjects.get(3), X(540), Y(115, jpanel));
  48. Oriental Institute of science and technology Page 48 g.drawString(subjects.get(4), X(540), Y(75, jpanel)); int avg = (int) (a + b + c + d + e) / 5; g.setColor(Color.blue); g.drawLine(X(50), Y(30 + perc_att(avg), jpanel), X(470), Y(30 + perc_att(avg), jpanel)); g.setColor(Color.red); g.drawLine(X(50), Y(30 + perc_att(75), jpanel), X(470), Y(30 + perc_att(75), jpanel)); } void drawMidSemGraph(ArrayList<String> subjects, ArrayList<Float> marks, JPanel jpanel) { System.out.println("*************In drawMidSemGraph function**********"); int p1 = (int) (100 * (float)marks.get(0) / 40); int p2 = (int) (100 * (float)marks.get(1) / 40); int p3 = (int) (100 * (float)marks.get(2) / 40); int p4 = (int) (100 * (float)marks.get(3) / 40); int p5 = (int) (100 * (float)marks.get(4) / 40); System.out.println("Values = "+p1+" "+p1+" "+p3+" "+p4+" "+p5); Graphics g = jpanel.getGraphics(); g.setColor(Color.black); System.out.println(getmaxx(jpanel) + " " + getmaxy(jpanel)); g.drawLine(X(50), Y(30, jpanel), X(500), Y(30, jpanel)); g.drawLine(X(50), Y(30, jpanel), X(50), Y(330, jpanel));
  49. Oriental Institute of science and technology Page 49 for (int i = 1; i <= 10; i++) { g.drawLine(X(50), Y(30 + 30 * i, jpanel), X(50 - 3), Y(30 + 30 * i, jpanel)); g.drawString("" + i * 10, X(25), Y(30 + 30 * i - 5, jpanel)); } ///////////////////////////////////////////// g.setColor(Color.red); g.fillRect(X(90), Y(30 + perc_att(p1), jpanel), 50, perc_att(p1)); ///////////////////////////////////////////// g.setColor(Color.blue); g.fillRect(X(170), Y(30 + perc_att(p2), jpanel), 50, perc_att(p2)); ///////////////////////////////////////////// g.setColor(Color.yellow); g.fillRect(X(250), Y(30 + perc_att(p3), jpanel), 50, perc_att(p3)); ///////////////////////////////////////////// g.setColor(Color.black); g.fillRect(X(330), Y(30 + perc_att(p4), jpanel), 50, perc_att(p4)); ///////////////////////////////////////////// g.setColor(Color.DARK_GRAY); g.fillRect(X(410), Y(30 + perc_att(p5), jpanel), 50, perc_att(p5)); /////////////////////////////////////////////// g.setColor(Color.red); g.fillRect(X(500), Y(250, jpanel), 20, 20);
  50. Oriental Institute of science and technology Page 50 g.setColor(Color.blue); g.fillRect(X(500), Y(210, jpanel), 20, 20); g.setColor(Color.yellow); g.fillRect(X(500), Y(170, jpanel), 20, 20); g.setColor(Color.BLACK); g.fillRect(X(500), Y(130, jpanel), 20, 20); g.setColor(Color.darkGray); g.fillRect(X(500), Y(90, jpanel), 20, 20); g.setColor(Color.BLACK); g.drawString(subjects.get(0), X(540), Y(235, jpanel)); g.drawString(subjects.get(1), X(540), Y(195, jpanel)); g.drawString(subjects.get(2), X(540), Y(155, jpanel)); g.drawString(subjects.get(3), X(540), Y(115, jpanel)); g.drawString(subjects.get(4), X(540), Y(75, jpanel)); float total = 0; for (int i = 0; i < 5; i++) { total += (float) marks.get(i); } int avg = (int) (total) / 5; g.setColor(Color.blue); g.drawLine(X(50), Y(30 + perc_att(avg), jpanel), X(470), Y(30 + perc_att(avg), jpanel)); g.setColor(Color.red);
  51. Oriental Institute of science and technology Page 51 g.drawLine(X(50), Y(30 + perc_att(33), jpanel), X(470), Y(30 + perc_att(33), jpanel)); } void draw_gr_mid1() { if ((midsem1sub1.getText().isEmpty() == false) && (midsem1sub2.getText().isEmpty() == false) && (midsem1sub3.getText().isEmpty() == false) && (midsem1sub4.getText().isEmpty() == false) && (midsem1sub5.getText().isEmpty() == false)) { gr1.perc_1 = 100 * (float) Float.parseFloat(midsem1sub1.getText().trim()) / 40; gr1.perc_2 = 100 * (float) Float.parseFloat(midsem1sub2.getText().trim()) / 40; gr1.perc_3 = 100 * (float) Float.parseFloat(midsem1sub3.getText().trim()) / 40; gr1.perc_4 = 100 * (float) Float.parseFloat(midsem1sub4.getText().trim()) / 40; gr1.perc_5 = 100 * (float) Float.parseFloat(midsem1sub5.getText().trim()) / 40; Graphics g = gPanel_mid1.getGraphics(); g.setColor(Color.black); System.out.println(getmaxx(gPanel_mid1) + " " + getmaxy(gPanel_mid1)); g.drawLine(X(50), Y(30, gPanel_mid1), X(500), Y(30, gPanel_mid1)); g.drawLine(X(50), Y(30, gPanel_mid1), X(50), Y(330, gPanel_mid1)); for (int i = 1; i <= 10; i++) { g.drawLine(X(50), Y(30 + 30 * i, gPanel_mid1), X(50 - 3), Y(30 + 30 * i, gPanel_mid1)); g.drawString("" + i * 10, X(25), Y(30 + 30 * i - 5, gPanel_mid1)); } ///////////////////////////////////////////// int p1 = (int) gr1.perc_1; g.setColor(Color.red);
  52. Oriental Institute of science and technology Page 52 g.fillRect(X(90), Y(30 + perc_att(p1), gPanel_mid1), 50, perc_att(p1)); ///////////////////////////////////////////// int p2 = (int) gr1.perc_2; g.setColor(Color.blue); g.fillRect(X(170), Y(30 + perc_att(p2), gPanel_mid1), 50, perc_att(p2)); ///////////////////////////////////////////// int p3 = (int) gr1.perc_3; g.setColor(Color.yellow); g.fillRect(X(250), Y(30 + perc_att(p3), gPanel_mid1), 50, perc_att(p3)); ///////////////////////////////////////////// int p4 = (int) gr1.perc_4; g.setColor(Color.black); g.fillRect(X(330), Y(30 + perc_att(p4), gPanel_mid1), 50, perc_att(p4)); ///////////////////////////////////////////// int p5 = (int) gr1.perc_5; g.setColor(Color.DARK_GRAY); g.fillRect(X(410), Y(30 + perc_att(p5), gPanel_mid1), 50, perc_att(p5)); /////////////////////////////////////////////// g.setColor(Color.red); g.fillRect(X(500), Y(250, gPanel_mid1), 20, 20); g.setColor(Color.blue); g.fillRect(X(500), Y(210, gPanel_mid1), 20, 20);
  53. Oriental Institute of science and technology Page 53 g.setColor(Color.yellow); g.fillRect(X(500), Y(170, gPanel_mid1), 20, 20); g.setColor(Color.BLACK); g.fillRect(X(500), Y(130, gPanel_mid1), 20, 20); g.setColor(Color.darkGray); g.fillRect(X(500), Y(90, gPanel_mid1), 20, 20); g.setColor(Color.BLACK); g.drawString(gr.subject_1, X(540), Y(235, gPanel_mid1)); g.drawString(gr.subject_2, X(540), Y(195, gPanel_mid1)); g.drawString(gr.subject_3, X(540), Y(155, gPanel_mid1)); g.drawString(gr.subject_4, X(540), Y(115, gPanel_mid1)); g.drawString(gr.subject_5, X(540), Y(75, gPanel_mid1)); int avg = (int) (gr1.perc_1 + gr1.perc_2 + gr1.perc_3 + gr1.perc_4 + gr1.perc_5) / 5; g.setColor(Color.blue); g.drawLine(X(50), Y(30 + perc_att(avg), gPanel_mid1), X(470), Y(30 + perc_att(avg), gPanel_mid1)); g.setColor(Color.red); g.drawLine(X(50), Y(30 + perc_att(33), gPanel_mid1), X(470), Y(30 + perc_att(33), gPanel_mid1)); } } void draw_gr_mid2() {
  54. Oriental Institute of science and technology Page 54 if ((midsem2sub1.getText().isEmpty() == false) && (midsem2sub2.getText().isEmpty() == false) && (midsem2sub3.getText().isEmpty() == false) && (midsem2sub4.getText().isEmpty() == false) && (midsem2sub5.getText().isEmpty() == false)) { gr2.perc_1 = 100 * (float) Float.parseFloat(midsem2sub1.getText().trim()) / 40; gr2.perc_2 = 100 * (float) Float.parseFloat(midsem2sub2.getText().trim()) / 40; gr2.perc_3 = 100 * (float) Float.parseFloat(midsem2sub3.getText().trim()) / 40; gr2.perc_4 = 100 * (float) Float.parseFloat(midsem2sub4.getText().trim()) / 40; gr2.perc_5 = 100 * (float) Float.parseFloat(midsem2sub5.getText().trim()) / 40; Graphics g = gPanel_mid2.getGraphics(); g.setColor(Color.black); System.out.println(getmaxx(gPanel_mid2) + " " + getmaxy(gPanel_mid2)); g.drawLine(X(50), Y(30, gPanel_mid2), X(500), Y(30, gPanel_mid2)); g.drawLine(X(50), Y(30, gPanel_mid2), X(50), Y(330, gPanel_mid2)); for (int i = 1; i <= 10; i++) { g.drawLine(X(50), Y(30 + 30 * i, gPanel_mid2), X(50 - 3), Y(30 + 30 * i, gPanel_mid2)); g.drawString("" + i * 10, X(25), Y(30 + 30 * i - 5, gPanel_mid2)); } ///////////////////////////////////////////// int p1 = (int) gr2.perc_1; g.setColor(Color.red); g.fillRect(X(90), Y(30 + perc_att(p1), gPanel_mid2), 50, perc_att(p1)); ///////////////////////////////////////////// int p2 = (int) gr2.perc_2;
  55. Oriental Institute of science and technology Page 55 g.setColor(Color.blue); g.fillRect(X(170), Y(30 + perc_att(p2), gPanel_mid2), 50, perc_att(p2)); ///////////////////////////////////////////// int p3 = (int) gr2.perc_3; g.setColor(Color.yellow); g.fillRect(X(250), Y(30 + perc_att(p3), gPanel_mid2), 50, perc_att(p3)); ///////////////////////////////////////////// int p4 = (int) gr2.perc_4; g.setColor(Color.black); g.fillRect(X(330), Y(30 + perc_att(p4), gPanel_mid2), 50, perc_att(p4)); ///////////////////////////////////////////// int p5 = (int) gr2.perc_5; g.setColor(Color.DARK_GRAY); g.fillRect(X(410), Y(30 + perc_att(p5), gPanel_mid2), 50, perc_att(p5)); /////////////////////////////////////////////// g.setColor(Color.red); g.fillRect(X(500), Y(250, gPanel_mid2), 20, 20); g.setColor(Color.blue); g.fillRect(X(500), Y(210, gPanel_mid2), 20, 20); g.setColor(Color.yellow); g.fillRect(X(500), Y(170, gPanel_mid2), 20, 20); g.setColor(Color.BLACK);
  56. Oriental Institute of science and technology Page 56 g.fillRect(X(500), Y(130, gPanel_mid2), 20, 20); g.setColor(Color.darkGray); g.fillRect(X(500), Y(90, gPanel_mid2), 20, 20); g.setColor(Color.BLACK); g.drawString(gr.subject_1, X(540), Y(235, gPanel_mid2)); g.drawString(gr.subject_2, X(540), Y(195, gPanel_mid2)); g.drawString(gr.subject_3, X(540), Y(155, gPanel_mid2)); g.drawString(gr.subject_4, X(540), Y(115, gPanel_mid2)); g.drawString(gr.subject_5, X(540), Y(75, gPanel_mid2)); int avg = (int) (gr2.perc_1 + gr2.perc_2 + gr2.perc_3 + gr2.perc_4 + gr2.perc_5) / 5; g.setColor(Color.blue); g.drawLine(X(50), Y(30 + perc_att(avg), gPanel_mid2), X(470), Y(30 + perc_att(avg), gPanel_mid2)); g.setColor(Color.red); g.drawLine(X(50), Y(30 + perc_att(33), gPanel_mid2), X(470), Y(30 + perc_att(33), gPanel_mid2)); } } Fire function: void fire() { int selected_month = month_combo.getSelectedIndex() + 1; int selected_sem = sem_combo.getSelectedIndex() + 1;
  57. Oriental Institute of science and technology Page 57 String roll_no = roll_field.getText().trim(); Student s = dataManager.get_a_student(roll_no); update_info_panel(s); update_midsem1_panel(Subjects.getSubjects(1), s); update_midsem2_panel(Subjects.getSubjects(1), s); update_attendance_panel(Subjects.getSubjects(1), s, selected_month); ///////////////////////////////////// // now fetch mid sem marks switch (graph_panel.getSelectedIndex()) { case 0: gPanel_att.getGraphics().clearRect(0, 0, gPanel_att.getWidth(), gPanel_att.getHeight()); drawAttendanceGraph(Subjects.getSubjects(selected_sem), s.getAttendance_grid()[selected_month - 1][0], s.getAttendance_grid()[selected_month - 1][1], s.getAttendance_grid()[selected_month - 1][2], s.getAttendance_grid()[selected_month - 1][3], s.getAttendance_grid()[selected_month - 1][4], gPanel_att); break; case 1: gPanel_mid1.getGraphics().clearRect(0, 0, gPanel_mid1.getWidth(), gPanel_mid1.getHeight());
  58. Oriental Institute of science and technology Page 58 drawMidSemGraph(Subjects.getSubjects(1), s.getMidsem1_marks_list(), gPanel_mid1); draw_gr_mid1(); break; case 2: gPanel_mid2.getGraphics().clearRect(0, 0, gPanel_mid2.getWidth(), gPanel_mid2.getHeight()); drawMidSemGraph(Subjects.getSubjects(1), s.getMidsem2_marks_list(), gPanel_mid2); draw_gr_mid2(); break; } } Clear All fields: name_field.setText(null); roll_field.setText(null); midsem1sub1.setText(null); midsem2sub1.setText(null); midsem1sub2.setText(null); midsem2sub2.setText(null); midsem1sub5.setText(null); midsem2sub3.setText(null); midsem1sub4.setText(null);
  59. Oriental Institute of science and technology Page 59 midsem2sub4.setText(null); midsem1sub3.setText(null); midsem2sub5.setText(null); midsem1_total.setText(null); midsem2_total.setText(null); midsem1_perc.setText(null); midsem2_perc.setText(null); att_sub_1.setText(null); att_average.setText(null); att_sub_4.setText(null); att_sub_5.setText(null); att_sub_3.setText(null); att_sub_2.setText(null); contactNumberField.setText(null); addressField.setText(null); Panel Updation Code: ////////////////////////////Update view functions//////////////////////////////////////////////////////////////////// ///////////////////////////ONLY DISPLAY UPDATERS//////////////////////////////////// void update_info_panel(Student s) { name_field.setText(s.getName().trim()); roll_field.setText(s.getRoll_number().trim());
  60. Oriental Institute of science and technology Page 60 onFormSemesterCombo.setSelectedIndex(s.getSemester() - 1); contactNumberField.setText(s.getContact_number().trim()); addressField.setText(s.getAddress().trim()); } void update_attendance_panel(ArrayList<String> subjects, Student s, int month) { float att[][]; att = s.getAttendance_grid(); att_sub_1.setText("" + att[month - 1][0]); att_sub_2.setText("" + att[month - 1][1]); att_sub_3.setText("" + att[month - 1][2]); att_sub_4.setText("" + att[month - 1][3]); att_sub_5.setText("" + att[month - 1][4]); float total = 0; for (int i = 0; i < 5; i++) { total += att[month - 1][i]; } att_average.setText("" + (total / 5)); att1.setText(subjects.get(0)); att2.setText(subjects.get(1)); att3.setText(subjects.get(2));
  61. Oriental Institute of science and technology Page 61 att4.setText(subjects.get(3)); att5.setText(subjects.get(4)); } void update_midsem1_panel(ArrayList<String> subjects, Student s) { /////////////////////////Setting marks to fields//////////////// midsem1sub1.setText("" + s.getMidsem1_marks_list().get(0)); midsem1sub2.setText("" + s.getMidsem1_marks_list().get(1)); midsem1sub3.setText("" + s.getMidsem1_marks_list().get(2)); midsem1sub4.setText("" + s.getMidsem1_marks_list().get(3)); midsem1sub5.setText("" + s.getMidsem1_marks_list().get(4)); ////////////////////Setting Subject name to labels/////////////// ms11.setText(subjects.get(0)); ms12.setText(subjects.get(1)); ms13.setText(subjects.get(2)); ms14.setText(subjects.get(3)); ms15.setText(subjects.get(4)); /////////////////////////////SUM////////////////////////////////// float total = 0; for (int i = 0; i < 5; i++) { total += (int) s.getMidsem1_marks_list().get(i);
  62. Oriental Institute of science and technology Page 62 } /////////////////SETTING TOTAL AND PERCENTAGE TO FIELDS///////// midsem1_total.setText("" + total); midsem1_perc.setText("" + percentage_policy(total)); } void update_midsem2_panel(ArrayList<String> subjects, Student s) { /////////////////////////Setting marks to fields//////////////// midsem2sub1.setText("" + s.getMidsem2_marks_list().get(0)); midsem2sub2.setText("" + s.getMidsem2_marks_list().get(1)); midsem2sub3.setText("" + s.getMidsem2_marks_list().get(2)); midsem2sub4.setText("" + s.getMidsem2_marks_list().get(3)); midsem2sub5.setText("" + s.getMidsem2_marks_list().get(4)); ////////////////////Setting Subject name to labels/////////////// ms21.setText(subjects.get(0)); ms22.setText(subjects.get(1)); ms23.setText(subjects.get(2)); ms24.setText(subjects.get(3)); ms25.setText(subjects.get(4)); /////////////////////////////SUM////////////////////////////////// int total = 0; for (int i = 0; i < 5; i++) { total += (int) s.getMidsem2_marks_list().get(i);
  63. Oriental Institute of science and technology Page 63 } /////////////////SETTING TOTAL AND PERCENTAGE TO FIELDS///////// midsem2_total.setText("" + total); midsem2_perc.setText("" + percentage_policy(total)); }
  64. Oriental Institute of science and technology Page 64 CHAPTER 7:- TESTING  Software testing is the process of executing a program with intension of finding errors in the code.  It is a process of evolution of system or its parts by manual or automatic means to verify that it is satisfying specified or requirements or not.  To purpose of system testing is to check and find out the errors or faults as early as possible so losses due to it can be saved.  Testing is the fundamental process of software success.  Testing is not a distinct phase in system development life cycle but should be applicable throughout all phases i.e. design development and maintenance phase.  Testing is used to show incorrectness and considered to success when an error is detected. Different levels of testing are used in the test process; each level of testing aims to test different aspects of the system:- The first level is unit testing. In this testing, individual components are tested to ensure that they operate correctly. The second level is integration testing. It is a systematic technique for constructing the program structure. In this testing, many tested modules are combined into the subsystems which are then tested. The good here is to see if the modules can be integrated properly. Third level is integration testing. System testing is actually a series of different tests whose primary purpose is to fully exercise computer based system. These tests fall outside scope of software process and are not conducted solely by software engineers. 7.1 Testing Used:-  White Box Testing  Black box Testing
  65. Oriental Institute of science and technology Page 65 7.1.1 White box testing:- White-box testing tests internal structures or workings of a program, as opposed to the functionality exposed to the end-user. In white-box testing an internal perspective of the system, as well as programming skills, are used to design test cases. The tester chooses inputs to exercise paths through the code and determine the appropriate outputs. While white-box testing can be applied at the unit, integration and system levels of the software testing process, it is usually done at the unit level. It can test paths within a unit, paths between units during integration, and between subsystems during a system–level test. Though this method of test design can uncover many errors or problems, it might not detect unimplemented parts of the specification or missing requirements. Techniques used in white-box testing include:  API testing (application programming interface):- testing of the application using public and private APIs.  Code coverage:-creating tests to satisfy some criteria of code coverage (e.g., the test designer can create tests to cause all statements in the program to be executed at least once).  Fault injection method:- intentionally introducing faults to gauge the efficacy of testing strategies.  Mutation testing methods.  Static testing method. 7.1.2 Black-Box Testing:- Black-box testing treats the software as a "black box", examining functionality without any knowledge of internal implementation. The testers are only aware of what the software is supposed to do, not how it does it. Black-box testing methods include: equivalence partitioning, boundary value analysis, all-pairs testing, state transition tables, decision table testing, fuzz testing, model-based testing, use case testing, exploratory testing and specification-based testing. 7.1.3Alpha testing:- Alpha testing is simulated or actual operational testing by potential users/customers or an independent test team at the developers' site. Alpha testing is often employed for off-the-shelf software as a form of internal acceptance testing, before the software goes to beta testing.
  66. Oriental Institute of science and technology Page 66 7.1.4 Beta testing:- Beta testing comes after alpha testing and can be considered a form of external user acceptance testing. Versions of the software, known as beta versions, are released to a limited audience outside of the programming team. The software is released to groups of people so that further testing can ensure the product has few faults or bugs. Sometimes, beta versions are made available to the open public to increase the feedback field to a maximal number of future users 7.2 Test Cases & Results:- S.N. Test Step Expected o/p Observed o/p Test Case Result 1. Semester No. 1-8 1-8 Pass 2. Semester No. 1-8 0 or 9 Fail
  67. Oriental Institute of science and technology Page 67 Combine: S.N. Test Step Expected o/p Observed o/p Test Case Result 1. Mid Semester Marks >=40 >=40 Pass 2. Mid Semester Marks >=40 <40 Fail S.N. Test Step Expected o/p Observed o/p Test Case Result 1. Attendence % >=100 >=100 Pass 2. Attendence % >=100 <100 Fail
  68. Oriental Institute of science and technology Page 68 CHAPTER 8:- SCREEN LAYOUTS HOME PAGE
  69. Oriental Institute of science and technology Page 69 NEW
  70. Oriental Institute of science and technology Page 70
  71. Oriental Institute of science and technology Page 71 CHAPTER 9:- FUTURE ENHANCEMENTS(complete) This is the version 1 of this system and in near future it will be more developed than it is now .This software product in fewer days will get euipped with new features of providing top 10 student ,last 10 students according to their mid-sem1 marks,mid-sem2 marks,attendance and their overall acadmic performance will also be provided to TG.We enhance our software and transform it as online software such that any one access it from anywere.we also make a parent zone from where parent can access details of his son/daughter.To avoid server down problems a new version will be launched which will be fruitful to the user during the rush hours.
  72. Oriental Institute of science and technology Page 72 The information for tutor guardian System is developed using JAVA,PHP and MY SQL fully meets the objectives of the system for which it has been developed. The system has reached a steady state where all bugs have been eliminated. The system is operated at a high level of efficiency and all the teachers and tutor guardian associated with the system understand its advantages. Can be used anywhere any time. This software product will be fruitful to user who wants to select and want to get best out of the lot .The features provided on this are user friendly and allows him to compare different students details within minute.
  73. Oriental Institute of science and technology Page 73 BIBLIOGRAPHY The following books were very helpful during the completion of project:  Software Engineering by- Roger S.Pressman.
Publicité