Professional Documents
Culture Documents
SYNOPSIS
Page 1
PROJECT SYNOPSIS
Page 2
ADMIN
LOGIN
MAIN PAGE
INSERT
UPDATE
REMOVE
ACTIVITIES
PLACEMENT GROUP
DBASE
ALUMNI GROUP
STUDENT DETAILS
CHANGE PASWORD
PROCESS LOGIC
ORGANISATION
INSERT
UPDATE DATA BASE
REMOVE
ACTIVITIES
PLACEMENT
SEND SMS
ALUMNI
SEND MAIL
STUDENT DETAILS
Page 4
PROJECT CATEGORY:
* RDBMS (Relational database management system).
SOFTWARE REQUIRED: 1. JDK1.6. 2. NETBEANS6.5. 3. SQL Tools MySQL Turbo Manager. MySQL Administratoar. MySQL Connector ODBC. 4. WAMP Server.
*We are not doing this project for any Industry/Clint. This is completely an academic project.
JSS College Computer Department Page 5
introduction
Page 6
INTRODUCTION
SMS Based Alumni is the application that keeps records of all the student academic report. This is maintained by the placement officer of the college. He enters all the information of the students in to the alumni. This information is used when a company or organization visit the college for campus interview.
PURPOSE
The main purpose is to send messages to all the selected students so that the task can be completed faster.
SCOPE
The main objective is to make sure that only those students are selected who meet the minimum aggregate mentioned by the company. By using this product, faster communication can be maintained with the students.
REFERENCE
SOFTWARE ENGINEERING - Somerville OBJECT ORIENTED SYSTEM DEVELOPMENT Ali Bahrami JAVA S.P.Balagurusamy THE COMPLETE REFERENCE JAVA
Page 7
OVERVIEW
Basic details consist of insert, remove, update and other activities. Insert details consists of student, education, curricular details, industrial training details, language details. Similarly update details. Remove details consists of student details. Other activities consist of placement department, alumni department, complete student detail and changing of password. Student details consist of name, date of birth, roll no, aggregate, age, year of passing, phone no, e-mail id, etc. Education details consist of student id, name, branch, year of passing, examination, college, board, year, etc. Curricular details consist of computer knowledge, project, extra activities. Industrial training details consist of training, industry name, duration, nature of work, etc. Language details consist of speak, read, write, mother tongue,
Page 8
SPECIFIC REQUIREMENTS
External Interface Requirements: The designers use specific requirements to design and build actual application.
User Interface: Accomplished via mouse and keyboard input to get GUI based form.
Software Interface: This product requires runtime Java environment and the program is intended to run on Microsoft operating system.
Functional Requirements It defines services the system should provide how the system should react to particular inputs and in particular situation. The relation between inputs and outputs has to be achieved. The software should provide user with GUI.
Input: Through mouse clicks and keyboard events, student details, education details, language details are entered.
Processing: All the details are stored in the database and can be updated or deleted using different options. JSS College Computer Department Page 9
SMS BASED ALUMNI SYSTEM Output: The monitor is the major output device which displays the processed input.
Non Functional Requirements The code must be commented throughout. A consistent set of coding conventions is to be used to standardize the structure and coding style of an application so that the code is easily read and understood. Object should be named with a consistent prefix that makes it easy to identify the object. The form should be self-explanatory. Good screen management techniques must be used with the features of colorful display.
Performance Requirements The proposed system needs to fulfill the requirement of the end users. It should be able to carry out thousands of entries per day. The system should be faster enough to avoid any data redundancy that could occur due simultaneous entry made at different terminals. The system should also provide security so that data cannot be tampered high. Proper command button and option button are to be provided to user to perform actions smoothly, proper text boxes to input the data and to get output to be displayed.
Page 10
DESIGN CONSTRAINTS
Complete validation has to be done so that no mandatory fields is left unfilled. Validation has to be made so as to maintain data integrity since all the forms are interrelated and data is being passed from one form to another for further transactions. Efficient error handling capacities have to be provided.
Hardware Constraints The system should run on Pentium IV 1.13 GHz or higher,512MB RAM or higher.
Software Constraints Application requires Windows XP and above platform with jdk1.6.
Page 11
Hardware Requirements:-
Software Requirements:-
Windows XP and higher JDK 1.6 and higher Netbeans IDE 6.5 Macromedia Dreamweaver Adobe Photoshop CS2 and higher Microsoft Word 2007 WAMP Server My SQL Turbo Manager
Page 12
IMPLEMENTATION
Page 13
DEVELOPING TOOLS
HTML: HTML means Hypertext Markup Language. HTML is a method of describing the format of documents which allows them to be viewed on computer screens. HTML documents are displayed by web browsers, programs which can navigate across networks and display a wide variety of information. HTML pages can be developed to a single text or to be a complex multimedia extravaganzas containing sound, moving images, virtual reality and java applets. The global publishing format of the Internet is HTML. It allows users not only to use text but also the format that text with headings, lists, and tables and to include still images, video, and sound within text. Readers can access pages of information from anywhere in the world at the click of a mouse button. Information can be downloaded to the readers own PC or workstation. HTML pages can also be used to enter data and as front-end for commercial transactions.
Features of HTML: It is not a programming language. It is not a data description language. It is simple to understand and implement. It can be used effectively by anybody. The methodology used by HTML to mark up information is independent of its representation on a particular hardware or software architecture. HTML syntax is a worldwide standard.
Page 14
SMS BASED ALUMNI SYSTEM Java Server Pages (JSP):Java Server Pages lets u separate the dynamic part of your pages from the static HTML. We simply write the regular HTML in normal manner, using whatever web-page building tools u normally use. We then enclose the c parts in special tags, most of which start with <% and end with %>. We normally give your file a .jsp extension, and typically install it in any ace you could place a normal web page. Although what you write often looks more a regular HTML file than a servlet, behind the scenes, the jsp page just gets converted to a normal servlet, with the static html simply being printed to the output stream associated with the servlets service method. This is normally done the first time the page is requested, and developers can simply request the page themselves when first installing it if they want to be sure what that the first real user doesnt get a momentary delay when the jsp page is translated to the servlet and the servlet is compiled and loaded. Many web servers let you define so that a URL that appears to refer an HTML file, really points to a servlet or jsp page.
Portability: Dubbed the jsp engine, this support involves recognition, translation, and management of the jsp files can be run on any web server or web enabled application. The JSP engine for a particular server might be built-in or might be provided through a third party add-on. As long as the server on which you plan to execute the JSP supports the same specification level as that to which the file is written, no change should be necessary as you move files from server to server. JSS College Computer Department Page 15
SMS BASED ALUMNI SYSTEM Composition: It was mentioned earlier that the Java Server Pages architecture could include reusable Java components. The architecture also allows for the embedding of a scripting language directly into Java Server Pages file. As the default scripting language, Java Server Pages use the Java programming language. This means that scripting on the scripting side can take advantage of the full set of capabilities that the Java Programming Language offers.
Processing: A Java Server Pages file is essentially an HTML document with JSP scripting or tags. It may have associated components in the form of .class, .jar, or .ser files or it may not. The use of components is not required. The Java Server Pages file has a .jsp extension to identify it to the server as a JSP file. Before the page is served, the JSP syntax is parsed and processed into a servlet on the server side. The servlet that is generated, outputs real content in HTML for responding to the customer. Because it is standard HTML, the dynamically generated response looks no different to the customer browser than a static response.
JSP Scripting Elements: JSP Scripting elements let you insert Java code into the servlet that will be generated from the current JSP page.
Page 16
SMS BASED ALUMNI SYSTEM There are three forms: 1. Expressions of the form <%=expression %> that are evaluated and inserted into the output, 2. Scripts lets of the form <%code%> that are inserted into the servlets service method, and 3. Declarations of the form <%!code%> that are inserted into the body of the Servlets class, outside of any existing methods.
Advantages of JSP: Separation of static from dynamic content. Write once Run Anywhere. Recommended web access layer for n-tier architecture. Completely leverages the servlet API. Platform independent. Reuse of components and tag libraries. Encapsulation of functionality. They have a better performance and scalability than ordinary CGI scripts, because they are persistent in memory and multi-threaded. They have built-in support for HTTP sessions, which makes Application Programming possible. They are automatically recompiled when necessary. They exist in the ordinary web server document space, no special URL mapping is required to address them. They have full access to Java Technology Network awareness, threads and Database connectivity. JSS College Computer Department Page 17
JSP pages exist in 3 forms or versions:JSP source code consists of text file with an extension of .jsp and contains a combination of HTML template code, Java language statements and JSP directives and actions that describe how to generate a web page to service a particular request. Java source code: the jsp container translates the jsp source code into the source code for an equivalent Java Servlet as needed.
Compiled Java class: like any other Java class, the generated servlet code is compiled into byte-codes in a .class file ready to be loaded and executed.
JAVA SCRIPT Java script is embedded into HTML. It is browser dependent. It is an interpreted language, loosely typed, object based language. Java script is not Java. Java script depends on the web server to support it. If the browser doesnt support it, JavaScript code will be ignored. Internet Explorer 3.0 and onwards support JavaScript.
Page 18
SMS BASED ALUMNI SYSTEM WAMP SERVER WAMPs are packages of independently-created programs installed on computers that use a Microsoft Windows operating system. WAMP is an acronym formed from the initials of the operating system Microsoft Windows and the principal components of the package:
Apache, MySQL and PHP (or Perl or Python). Apache is a web server. MySQL is database management software. PHP is a scripting language that can manipulate information held in a database and generate web pages dynamically each time content is requested by a browser. Other programs may also be included in a package, such as phpMyAdmin which provides a graphical user interface for the MySQL database manager, or the alternative scripting languages Python or Perl.
JAVA NATIVE INTERFACE JNI allows one to write native methods to handle situations when an application cannot be written entirely in the Java programming language, e.g. when the standard Java class library does not support the platform-specific features or program library. It is also used to modify an existing applicationwritten in another programming languageto be accessible to Java applications. Many of the standard library classes depend on JNI to provide functionality to the developer and the user, e.g. file I/O and sound capabilities. Including performance- and platform-sensitive API implementations in the standard library allows all Java applications to access this functionality in a safe and platform-independent manner. Before resorting to using JNI, developers should make sure the functionality is not already provided in the standard libraries.
Page 19
SMS BASED ALUMNI SYSTEM The JNI framework lets a native method utilize Java objects in the same way that Java code uses these objects. A native method can create Java objects and then inspect and use these objects to perform its tasks. A native method can also inspect and use objects created by Java application code. JNI is sometimes referred to as the "escape hatch" for Java developers because it allows them to add functionality to their Java application that the standard Java APIs cannot otherwise provide. It can be used to interface with code written in other languages, such as C and C++. It is also used for time-critical calculations or operations like solving complicated mathematical equations, since native code can be faster than JVM code.
Page 20
DESIGN
Page 21
DESIGN
System design is modeling process. it can be as a transaction from users view to programmers view or database persons view .The term design is used in two ways. Used as noun; it represents the results of a design process. The designers goal is to produce module or representation of an entity, which can be use later to build the system.Software design sits at a technical kernel of a Software engineering process and is applied regardless of the development paradigm that is used- Roger .S. Pressman says. Design is essentially a bridge between the requirement specification and the final solution for satisfying the requirements .The design process of the software has two levels. At the first level, the focusing is on deciding which modules should be interconnected. This is what called as System design or Top level design. In the second level, the internal design of the models or how the satisfaction of the modules can be satisfied is decided. The design level is often called Detailed design or Logic design .The design of a system is essentially a blue print or a plan of the system.
6.2 System Design Here, the focus is a deciding which modules are needed for the system, the specification of these modules and how the modules should be interconnected. It includes the following types of design. JSS College Computer Department Page 22
SMS BASED ALUMNI SYSTEM (a) Data Designing: It describes structure that resides with in the system. (b) Architecture Design: it uses information flow characteristics and maps into the program structure. Transformation mapping method is applied to exhibit distinct boundaries between incoming. In the current scenario, the information and activity relies either on in broken, Distributed and isolated automation such as use of Microsoft Excel sheets. The Problem that arises in such a scenario is that the process is too cumbersome and demanding as well. The purpose of the design phase is to plan a solution of the problem specified by the requirements document. This phase is the first step in moving from the problem domain to the solution domain. It involves the process in which conceiving, planning & carrying out the plan by generating the necessary reports & printouts, in other words the design phase acts as a bridge between the SRS & Implementation phase. The design of the system is perhaps the most critical factor affecting the quality of the software & has the major impact on the later phases, particularly the testing & maintenance. the output of the phase is the design document.
LOGICAL DESIGN: Understanding the software document requires the logical structure analysis of diagrammatic notations, such as Data Flow diagrams. The logical diagram describes the detailed specification of the system, describing its features, effective communication & user interface requirements. The logical system of the proposed system should include the following: JSS College Computer Department Page 23
External system structure Relationship between all elements The physical construction & all the activities Global data Control flow Derived program structure
The goal during this design phase is to produce design such as Data Flow Diagram (DFD).
MODULARISATION DETAILS
INSERT MODULE: It consists of student details, education details, curricular details, industrial training details, language details. Student details consist of student id, name, age, date of birth, year of passing, address, email id, cell no, etc. Education details consist of student id, name, branch, examination, etc. Curricular details consist of student id, name, branch, college, project, computer knowledge, etc. Industrial details consist of industry name, duration, nature of work, etc. Language details consist of language spoken, read, write, mother tongue, etc. JSS College Computer Department Page 24
REMOVE MODULE: It consists of student details. Student details consist of student id, name, age, date of birth, year of passing, address, email id, cell no, etc. ACTIVITIES: It consists of placement department, alumni department, complete student details, and changing password. Placement department consists of aggregate, student details, etc. Changing of password consists of username, password, etc.
Page 25
SMS BASED ALUMNI SYSTEM DATA FLOW DIAGRAM: The Data Flow Diagram is one of the important modeling tools. It shows the user of the data pictorially.DFD represents the flow of the data between different transformations & process in the system. The DFD shows logical flow of the data. It represents the functional dependencies within a system. It shows output values in a computation are derived from input values. It is a simple pictorial representation or model for system behavior. It specifies what is to be done but not how is to be done. It describes the logical structure of the system. It relates the data information to various processes of the system. It follows top-down approach.
Page 26
SMS BASED ALUMNI SYSTEM TABLES 1. STUDENT DETAILS TABLE Field Name StudId StudName Course Aggregate PAddress TAddress Email Cell Phone branch Sex DOB Age Vision FatherName FOccupation Caste year rollno Data Type int[10] varchar[25] varchar[50] float varchar[255] varchar[255] varchar[50] varchar[25] varchar[25] varchar[20] int[11] date int[4] int[11] varchar[25] varchar[50] int[11] int[11] int[11] Description Student Id Student Name Course Student Aggregate Permanent Address Temporary Address Email Address Cell Number Phone Number Branch Sex of Student Date of Birth Age of Student Vision Father Name Father Occupation Cast Year of Passing Roll Number of Student
Page 27
SMS BASED ALUMNI SYSTEM 2. EDUCATION DETAILS Field Name EId StudID Examination College University/Board Year Percentage Class Attempts Data Type int[10] int[10] varchar[25] varchar[100] varchar[100] int[5] float varchar[25] Attemmpts Description Education Id(Primary Key) Student Id(Reference Key) Completed Exam Details Respective College Under Which Respective Year Respective Percentage Class Squired Number of attempts
3. CURRICULAR ACTIVITY DETAILS Field Name Cid StudId Compknw Project Extracurricular Data Type int[10] int[10] varchar[255] varchar[255] varchar[255] Description Tabel Id Student Id Computer knowledge Project Dtails Extra Activities
Page 28
SMS BASED ALUMNI SYSTEM 4. TRAINING DETAILS Field Name T Id StudId Training IndustryName Work Duration Data Type int[10] int[10] varchar[100] varchar[100] varchar[255] varchar[50] Description Training Id Student Id Training Details Industry Name Type of Work Experience
5. LANGUAGE DETAILS Field Name Lid StudId Language Speak Read1 Write1 Mother Tongue Data Type int[10] int[10] varchar[50] varchar[50] varchar[50] varchar[50] varchar[10] Description Language Id Stubent Id Languages Known Known to speak Known to Read Known to Write Mother Tongue
Page 29
SMS BASED ALUMNI SYSTEM 6. USER Field Name userid username pwd Data Type int[11] varchar[20] varchar[20] Description User Id User Name Password
Page 30
Data Flow: It may be from file-to-file or file-to-process or process-process. It is generally in terms of attributes. There may be either an input data flow or output data flow.
Functional Processing:
The process is nothing but the transformation of data. It starts with the subject and it has the verb followed by the subject.
Data store: Or
It includes file, database and repository. To parallel lines represent it or one end closed rectangle.
Actor/source/sink:
The files which are outside the system are used by the process or the processes of the system. Generally source/sink in the actor.
Page 31
Page 32
CLASS
COURSE
STUDENT DETAILS
BRANCH DOB ADDRESS ADD
EDUCATION DETAILS
ADD INSERT
ADD
PERCENTAGE
ST_ID
ECA
ADD
ST_ID
LANGUAGE
CURRICULAR ACTIVITIES
PROJECT
LANGUAGE DETAILS
READ
Page 33
CODING
Page 34
<%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF8"> <title>JSP Page</title> </head> <body> <%@page import="java.sql.*" %>
<%! String Insert(String sql) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:alumin"); Statement st = con.createStatement(); st.executeUpdate(sql); JSS College Computer Department Page 35
SMS BASED ALUMNI SYSTEM return("Record Inserted"); } catch(Exception ex) { return ex.toString(); } } %>
<%! {
ResultSet rs=null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:alumin"); Statement st = con.createStatement(); rs=st.executeQuery(sql); return rs;
Page 37
<%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>JSP Page</title> <style type="text/css"> <!-body,td,th { color: #000000; } body { background-color: #FFFFCC; } .style1 {font-family: "Courier New", Courier, monospace} .style2 { font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 18px; } .style3 { font-family: "Courier New", Courier, monospace; JSS College Computer Department Page 38
SMS BASED ALUMNI SYSTEM font-weight: bold; font-size: 30px; } --> </style> </head> <body>
<% String db = request.getParameter("db"); String pas = request.getParameter("pas"); ResultSet rs = null; String s = "select * from studdetails where studid=" + request.getParameter("txtId"); rs = MyData(s); rs.next(); int h = rs.getInt(11); String x; if (h == 0) { x = "Female"; } else { x = "Male"; }
<center><h3 class="style3">Student Details</h3> </center> <hr><br> <h4 class="style2">General Details</h4> <table border="1" cellpadding="9" cellspacing="4" bordercolor="#666666"> <tr> <th><span class="style1">StudentId</span></th> <th><span class="style1">Name</span></th> <th><span class="style1">Course</span></th> <th><span class="style1">Aggregate</span></th> JSS College Computer Department Page 40
SMS BASED ALUMNI SYSTEM <th><span class="style1">ParmanentAddress</span></th> <th><span class="style1">TemporaryAddress</span></th> <th><span class="style1">Emailid</span></th> <th><span class="style1">CellNumber</span></th> <th><span class="style1">PhoneNumber</span></th> <th><span class="style1">Branch</span></th> <th><span class="style1">Sex</span></th> <th><span class="style1">DateOfBirth</span></th> <th><span class="style1">Age</span></th> <th><span class="style1">Vision</span></th> <th><span class="style1">FathersName</span></th> <th><span class="style1">FathersOccupation</span></th> <th><span class="style1">Caste</span></th> <th><span class="style1">YearOfPassing</span></th> <th><span class="style1">RollNumber</span></th> </tr> <tr> <td><span class="style1"><%=rs.getString(1)%></span></td> <td><span class="style1"><%=rs.getString(2)%></span></td> <td><span class="style1"><%=rs.getString(3)%></span></td> <td><span class="style1"><%=rs.getString(4)%></span></td> <td><span class="style1"><%=rs.getString(5)%></span></td> <td><span class="style1"><%=rs.getString(6)%></span></td> <td><span class="style1"><%=rs.getString(7)%></span></td> <td><span class="style1"><%=rs.getString(8)%></span></td> <td><span class="style1"><%=rs.getString(9)%></span></td> <td><span class="style1"><%=rs.getString(10)%></span></td> JSS College Computer Department Page 41
SMS BASED ALUMNI SYSTEM <td><span class="style1"><%=x%></span></td> <td><span class="style1"><%=rs.getString(12)%></span></td> <td><span class="style1"><%=rs.getString(13)%></span></td> <td><span class="style1"><%=y%></span></td> <td><span class="style1"><%=rs.getString(15)%></span></td> <td><span class="style1"><%=rs.getString(16)%></span></td> <td><span class="style1"><%=z%></span></td> <td><span class="style1"><%=rs.getString(18)%></span></td> <td><span class="style1"><%=rs.getString(19)%></span></td> </tr> </table> <br>
<% ResultSet rs1 = null; String a = "select * from educationdetails where StudId=" + request.getParameter("txtId"); rs1 = MyData(a); rs1.next(); if (rs1.getRow() > 0) { %>
<h4 class="style2">Education Details</h4> <table border="1" cellpadding="9" cellspacing="4" bordercolor="#666666"> <tr> <th><span class="style1">Examination</span></th> JSS College Computer Department Page 42
SMS BASED ALUMNI SYSTEM <th><span class="style1">Collage</span></th> <th><span class="style1">University</span></th> <th><span class="style1">YearOfPassing</span></th> <th><span class="style1">Percentage</span></th> <th><span class="style1">Class</span></th> <th><span class="style1">Attempts</span></th> </tr> <tr> <td><span class="style1"><%=rs1.getString(3)%></span></td> <td><span class="style1"><%=rs1.getString(4)%></span></td> <td><span class="style1"><%=rs1.getString(5)%></span></td> <td><span class="style1"><%=rs1.getString(6)%></span></td> <td><span class="style1"><%=rs1.getString(7)%></span></td> <td><span class="style1"><%=rs1.getString(8)%></span></td> <td><span class="style1"><%=rs1.getString(9)%></span></td> </tr> </table> <br> <% } else { out.println("Education Details does not exists"); out.println("<br>"); } %>
SMS BASED ALUMNI SYSTEM ResultSet rs2 = null; String q = "select * from curricularactivities where StudId=" + request.getParameter("txtId"); rs2 = MyData(q); rs2.next(); if (rs2.getRow() > 0) { %>
<h4 class="style2">Curricular Activities </h4> <table border="1" cellpadding="9" cellspacing="4" bordercolor="#666666"> <tr> <th><span class="style1">ComputerKnowledge</span></th> <th><span class="style1">Project</span></th> <th><span class="style1">ExtraCurricular</span></th> </tr> <tr> <td><span class="style1"><%=rs2.getString(3)%></span></td> <td><span class="style1"><%=rs2.getString(4)%></span></td> <td><span class="style1"><%=rs2.getString(5)%></span></td> </tr> </table> <br> <% } else { out.println("Curricular Activities Details does not exists"); out.println("<br>"); JSS College Computer Department Page 44
<% ResultSet rs3 = null; String k = "select * from language where StudId=" + request.getParameter("txtId"); rs3 = MyData(k); rs3.next(); if (rs3.getRow() > 0) { %>
<h4 class="style2">Language Details</h4> <table border="1" cellpadding="9" cellspacing="4" bordercolor="#666666"> <tr> <th><span class="style1">Language</span></th> <th><span class="style1">Speak</span></th> <th><span class="style1">Read</span></th> <th><span class="style1">Write</span></th> <th><span class="style1">MotherTongue</span></th> </tr> <tr> <td class="style2"><%=rs3.getString(3)%></td> <td class="style2"><%=rs3.getString(4)%></td> <td class="style2"><%=rs3.getString(5)%></td> <td class="style2"><%=rs3.getString(6)%></td> JSS College Computer Department Page 45
SMS BASED ALUMNI SYSTEM <td class="style2"><%=rs3.getString(7)%></td> </tr> </table> <br> <% } else { out.println("Language Details does not exists"); out.println("<br>"); } %> <br> <a href="MainPage.jsp?db=<%=db%>&pas=<%=pas%>" class="style2">HOME</a> </body> </html>
Page 46
<%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF8"> <title>JSP Page</title> </head> <body>
<% String db=request.getParameter("db"); String pas=request.getParameter("pas"); sendSMS s = new sendSMS(); String mto = request.getParameter("txtmailto1"); String[] mail = mto.split(","); String msg = request.getParameter("txtsms"); int m=mail.length; for(int i=0;i<m;i++) JSS College Computer Department Page 47
</body> </html>
Page 48
<%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF8"> <title>JSP Page</title> </head> <body>
<% String db=request.getParameter("db"); String pas=request.getParameter("pas"); String mto=request.getParameter("txtmailto"); String[] mail=mto.split(","); String sub=request.getParameter("txtsub"); String msg=request.getParameter("txtmsg"); int m=mail.length; for(int i=0;i<m;i++) { JSS College Computer Department Page 49
SMS BASED ALUMNI SYSTEM Main send=new Main(mail[i],sub,msg); } out.println("<script>alert('Mail sent')</script>"); %>
</body> </html>
Page 50
package mail;
/* * To change this template, choose Tools | Templates * and open the template in the editor. */
/** * * @author Vijay */ import java.io.*; import java.io.File; import java.io.FileWriter; public class sendSMS { public String sendMessage(String port,String recipinet,String msg) { String result = ""; try { File file = File.createTempFile("realhowto",".vbs"); file.deleteOnExit(); FileWriter fw = new java.io.FileWriter(file);
String vbs ="Option Explicit \n" JSS College Computer Department Page 51
SMS BASED ALUMNI SYSTEM +"Dim objGsmProtocol, objSmsMessage, objConstants, objDeliveryStatus \n" +"Dim strPin, strReference \n" +"Dim bContinueQueryStatus \n" +"Set objGsmProtocol = CreateObject (
\"ActiveXperts.SmsConstants\" ) \n" +"objGsmProtocol.Device +"objSmsMessage.Clear \n" +"objSmsMessage.Recipient +"objSmsMessage.Data = \""+recipinet+"\" \n" = \""+msg+"\" \n" = AskDevice( objGsmProtocol ) \n"
objConstants.asMESSAGEFORMAT_TEXT ' Default: single-part SMS message \n" +"If( Len( objSmsMessage.Data ) > 160 ) Then \n" +"objSmsMessage.Format =
objConstants.asMESSAGEFORMAT_TEXT_MULTIPART \n" +"End If \n" +"strReference \n" +"If( objGsmProtocol.LastError <> 0 ) Then \n" +"End If \n" Page 52 = objGsmProtocol.Send( objSmsMessage )
SMS BASED ALUMNI SYSTEM +"Function AskDevice( objDevice ) \n" +"Dim strMessage, strDevice, strDefaultDevice, i, n \n" +"n = objDevice.GetDeviceCount() \n" = \"*** Enter one of the following device names ***
+"strMessage
\" & vbCrLf & vbCrLf \n" +"For i = 0 To n - 1 \n" +"strMessage = strMessage & objDevice.GetDevice( i ) \n" +"strMessage = strMessage & vbCrLf \n" +"Next \n" +"strMessage = strMessage & \"COM1\" & vbCrLf & \"COM2\" &
vbCrLf & \"COM3\" & vbCrLf & \"COM4\" & vbCrLf \n" +"strDefaultDevice = \""+port+"\" \n" +"strDevice = \""+port+"\" \n" +"AskDevice = strDevice \n" +"End Function \n"
+"Function ReadInput( ByVal strTitle, ByVal strDefault, ByVal bAllowEmpty ) \n" +"Dim strInput, strReturn \n" +"Do \n" +"strInput = inputbox( strTitle, \"Enter value\", strDefault ) \n" +"If ( strInput <> \"\" ) Then \n" +"strReturn = strInput \n" +"End If \n" +"Loop until strReturn <> \"\" Or bAllowEmpty \n" +"ReadInput = strReturn \n" +"End Function"; JSS College Computer Department Page 53
SMS BASED ALUMNI SYSTEM fw.write(vbs); fw.close(); Process p = Runtime.getRuntime().exec("cscript //NoLogo " + file.getPath()); BufferedReader input = new BufferedReader (new InputStreamReader(p.getInputStream())); String line; while ((line = input.readLine()) != null) { result += line; } input.close(); } catch(Exception e){ e.printStackTrace(); }
return("message sent"); } public static void main(String args[]) { sendSMS s=new sendSMS(); s.sendMessage("COM4", "+919686385464","Hi"); }
package mail;
String d_email = "9cool.k@gmail.com", d_password = "livefree", d_host = "smtp.gmail.com", d_port = "465", m_to = "", m_subject = "", m_text = "";
public Main(String m_to1,String m_subject1,String m_text1) { m_to=m_to1; m_subject = m_subject1; m_text = m_text1;
Properties props = new Properties(); props.put("mail.smtp.user", d_email); props.put("mail.smtp.host", d_host); JSS College Computer Department Page 55
SMS BASED ALUMNI SYSTEM props.put("mail.smtp.port", d_port); props.put("mail.smtp.starttls.enable", "true"); props.put("mail.smtp.auth", "true"); //props.put("mail.smtp.debug", "true"); props.put("mail.smtp.socketFactory.port", d_port); props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); props.put("mail.smtp.socketFactory.fallback", "false");
try { Authenticator auth = new SMTPAuthenticator(); Session session = Session.getInstance(props, auth); //session.setDebug(true);
MimeMessage msg = new MimeMessage(session); msg.setText(m_text); msg.setSubject(m_subject); msg.setFrom(new InternetAddress(d_email)); msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to)); Transport.send(msg); } catch (Exception mex) { mex.printStackTrace(); } } JSS College Computer Department Page 56
public static void main(String[] args) { String sub="",msg="",mail=""; Main blah = new Main(mail,sub,msg); } private class SMTPAuthenticator extends javax.mail.Authenticator {
Page 57
// JavaScript Document function validentry(frm) { var el = frm.elements.length; // This part validates blank entries in a form passed to this function
for (i=0;i<el;i++) { if (frm.elements[i].value=="" && frm.elements[i].required=='yes') { alert(frm.elements[i].msg); frm.elements[i].focus(); return; } if(frm.elements[i].type=="menu") { if (frm.elements[i].options[frm.elements[i].selectedIndex].value==0 && frm.elements[i].required=='yes') { alert("Select Option"); frm.elements[i].focus(); return; } } } // This is a loop for validating numbers in a form Page 58 JSS College Computer Department
if (frm.elements[i].dtype=='num') { //alert(frm.elements[i].dtype); var validchar='0123456789.'; for (j = 0; j < frm.elements[i].value.length;j++) { var Char = frm.elements[i].value.charAt(j); //alert("works"); if (validchar.indexOf(Char) == -1) { alert(frm.elements[i].msg); frm.elements[i].focus(); return(false); } } } }
// form
for (i=0;i<el;i++) {
SMS BASED ALUMNI SYSTEM { //alert(frm.elements[i].dtype); var validchar='0123456789.-+()'; for (j = 0; j < frm.elements[i].value.length;j++) { var Char = frm.elements[i].value.charAt(j); //alert("works"); if (validchar.indexOf(Char) == -1) { alert(frm.elements[i].msg); frm.elements[i].focus(); return(false); } } } }
// This loop is for validating email fields in a from. for (i=0;i<el;i++) { if (frm.elements[i].dtype=='email') { if (frm.elements[i].value.indexOf("@")==-1 || frm.elements[i].value.indexOf(".")==-1) { alert(frm.elements[i].msg); frm.elements[i].focus(); return(false); JSS College Computer Department Page 60
//
for (i=0;i<el;i++) {
if (frm.elements[i].dtype=='char') { //alert(frm.elements[i].dtype); var validchar=' 0123456789.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU VWXYZ-,#:;"'; for (j = 0; j < frm.elements[i].value.length;j++) { var Char = frm.elements[i].value.charAt(j); //alert("works"); if (validchar.indexOf(Char) == -1) { alert(frm.elements[i].msg); frm.elements[i].focus(); return(false); } } } } // This loop checks for valid username format Page 61 JSS College Computer Department
if (frm.elements[i].dtype=='user') { //alert(frm.elements[i].dtype); if (frm.elements[i].value.length<3) { alert("Minimum length should be 3"); frm.elements[i].focus(); return(false); } if (frm.elements[i].value.length>25) { alert("Maximum length should Not exceed 25"); frm.elements[i].focus(); return(false); } var validchar=' 0123456789.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU VWXYZ_'; for (j = 0; j < frm.elements[i].value.length;j++) { var Char = frm.elements[i].value.charAt(j); //alert("works"); if (validchar.indexOf(Char) == -1) { alert(frm.elements[i].msg); JSS College Computer Department Page 62
for (i=0;i<el;i++) {
var bday=parseInt(dt1[2]); var bmo=(parseInt(dt1[1])-1); var byr=parseInt(dt1[0]); //var byr; var age; var now = new Date(); tday=now.getDate(); tmo=(now.getMonth()); tyr=(now.getFullYear());
SMS BASED ALUMNI SYSTEM if((tmo > bmo)||(tmo==bmo & tday>=bday)) { age=byr }
Page 64
TESTING
Page 65
SYSTEM TESTING:
Introduction: The importance of software testing & its implication with respect to software quality cannot be emphasized. The development of software system involves series of production activities where opportunities for injection of human fallibilities are enormous. Error may begin to occur at the very inception of process where the objectives may be imperfectly specified, as well as later & development stages, because of human inability to perform & communication with perfection stages, software development is accomplished by quality assurance activity. Software testing is critical element of software quality assurance & represents the ultimate review of specification, design & code generation. Once source code has been generated software testing & its implication with respect to software quality cannot be over emphasized. Software testing is a critical element of software quality assurance & represents the ultimate review of specification, design & code generation. Once the source has been generated the software must be tested to uncover & correct as many errors as possible before delivering the product to the customer.
Principle of testing: All tests should be traceable to the system requirement Tests should be planned before testing begins Testing should begin with small scale & progress testing towards large scale Existive testing is not possible
Page 66
SMS BASED ALUMNI SYSTEM Testing Objectives: The following are the objective of the testing. Finding recognizable errors Tracing & correcting undiscovered errors To uncover different classes of the errors with minimum amount of time & effort
Testing Approach 1) Black-Box Testing: Black-box testing is done to find 1. Incorrect or missing function 2. Interfaces errors 3. Errors in external database error 4. Performance error 5. Initialization & intimation errors
2) White-Box Testing: This test allows the testers to: 1. Check whether all independent paths within a module have exercised at leasy ones. 2. Exercise all logical decision on their true & false 3. Exercise all loops at their boundaries & within their bounds 4. Exercise the internal data structure to ensure their validity 5. Ensure whether the possible validity check and validity lookups have been provided to validate data entry
Page 67
Unit Testing: Individual components are tested to ensure that the operate correctly. Each component is tested independently without other components. Module Testing: A module is collection of dependant components such as an object classes & abstract datatype or some loser collection of procedure and functions. A module encapsulates related components so can be tested without other system modules. System Testing: The subsystems are integrated to make up the entire system. The testing process is concerned with finding errors, which results from unanticipated interaction between subsystem and system components. It is also concerned with validating that the system is functional and non-functional requirements.
Integration Testing: Top down integration starts with main routine and immediate subroutines in the system structure. After this top level Skeleton has been thoroughly tested, it becomes the test harness the use for its immediately sub-ordinate routines. Topdown integration requires the use for program stubs to stimulate the effect of lower-level routines that are followed by those being tested. Top-down integration offers several advantages: System integration is distributed throughout the implementation phase. Module is integrated as they are developed. Top-level interfaces are tested first and most often. JSS College Computer Department Page 68
SMS BASED ALUMNI SYSTEM The top-level routines provide a natural test harness for lower-level routines. Errors are localized to the new module and interfaces that are being added. While it may appear the top down integration is always preferable, there are many situation in which it is not possible to adhere to a strict top-down approach. It may be necessary to test certain critical low-level modules first. The sandwich testing strategy may be preferred in this situation. Sandwich integration is pre-dominantly top-down but bottom-up techniques are used on some modules and sub-systems. This mixes all aviates many of the problems encountered in your top-down testing and retains the advantage of top-down integration at the subsystem and system level.
Page 69
VALIDATION:
If username or password is incorrect then, mismatch message is displayed. If any of the attribute is left unfilled then, a message is displayed. For ex: if date of birth is left unfilled then enter the date of birth message is displayed. In email id, if @ and .com is missing then, error is displayed. In number column, if characters are entered, then error is displayed. For ex: phone no. column. In cell no. column, if more than 10 digits are entered then, error is displayed.
Page 70
SCREEN SHOTS
Login Page
Page 71
Page 72
Page 73
Page 74
Page 75
Page 76
Page 77
Page 78
Page 79
Page 80
Page 81
BIBLOGRAPHY:
Books:
SOFTWARE ENGINEERING by Somerville. OBJECT ORIENTED SYSTEM DEVELOPMENT by Ali Bahrami. INTRODUCTION TO JAVA by S.P.Balagurusamy. THE COMPLETE REFERENCE JAVA- by Black.
Websites:
http://www.java-source.net http://www.google.com http://java.sun.com/dev
Page 82