Sei sulla pagina 1di 23

SAVEETHA SCHOOL OF ENGINEERING

SAVEETHA INSTITUTE OF MEDICAL AND TECHNICAL SCIENCES


DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Academic Year: 2018-19 (Batch 2017-21)


Register Number : 191711264 Student Name: Y. ARAVIND REDDY
Semester : IV Class: II / CSE
Course Code : CS02405 Subject Name: Internet Programming
Course Faculty : Dr. S. MAGESH KUMAR
Rubrics for Assignment II - Implementation

RUBRICS
Report/Assignment 2
S.No Components Marks(100)

Implementation 90
1.
1) Language used (5)
2) Number of classes (5)
3) Number of functions (5)
4) Data Structures used (5)
5) Variable declaration (5)
6) Number of nested for loops used (5)
7) Database connectivity (5)
8) New mode of Input/output (Hardware (5)
devices) (5)
9) API/Interface (5)
10) Programming Alignment or style (5)
11) Coupling (5)
12) Cohesion (5)
13) Time Complexity (5)
14) Space complexity (5)
15) Snapshots (10)
16) Results (10)

2. Conclusion 5

3. References 5

Total 100
1)Languages Used:

THE JAVA PROGRAMMING LANGUAGE

Java is a programming language originally developed by Sun Microsystems and released in


1995 as a component of Sun Microsystems platform. The language derives much of its syntax
from C and C++, but has a simpler object model and fewer low level facilities. Java applications
are typically compiled to byte code that can run on any Java Virtual Machine(JVM) regardless
of computer architecture. The Java programming language is a high level languages that can
be characterized by all the following:

➢ Simple

➢ Object-Oriented

➢ Distributed

➢ Multi-threaded

➢ Dynamic

➢ Portable

➢ Architecture Neutral

In Java programming language all source code is written in plain text files ending with Java
extension. Those source files then compiled into class files by the Javac compiler. A. class
file does not contain code that is native to your processer: it instead contain byte codes- the
machine language of Java Virtual

MySQL

MySQL is the world's most used open source Relational Database Management
system(RDBMS) as of 2008 that runs as a server providing multiuser access to a number of
databases. It is named after co-founder Michael Widenius' daughter, My. The SQL phrase
stands for Structured Query Language. The MySQL development project has made its source
code available under the terms of the GNU General Public License, as well as under a variety
of proprietary agreements. MySQL was owned and sponsored by a single for-profit firm, the
Swedish company MySQL Lab, now owned by Oracle Corporation. MySQL is a popular
choice of database for use in web applications, and is a central component of the widely used
LAMP open source web application software stack—LAMP is an acronym for "Linux, Apache,
MySQL, Perl/PHP/Python." Free-software -open source projects that require a full-featured
database management system often use MySQL.

2)&3) Define the classes and their functionalities

The proposed system consists of the following modules:

Subject management Module

Subject management module in this project is meant for the users. In this module, subjects are
allocated for users. It does the following tasks:

✔ Give subject , faculty and Semester

✔ View timetable

✔ View leave request

Faculty does

Register with all information

View Timetable

Apply for leave with specifying Substitute faculty

View Subtitute response

Give subject name, semester and faculty

View timetable

Request for leave

Principal does
View Timetable

View request for leave

View substitut's response

Approve or Reject request for leave

4) Data Structures Used:

GENETIC ALGORITHM

1. An algorithm is a set of instructions that is repeated to solve a problem.

2. Genetic algoritms follow the idea of SURVIVAL OF THE FITTEST- Better and better
solutions evolve from previous generations until a near optimal solution is obtained.

3. Also known as evolutionary algorithms, genetic algorithms demonstrate self organization


and adaption similar to the way that the fittest biological organism survive and reproduce.

4. A genetic algoritm is an interative procedure that represents its candidate solutions as strings
of genes called chromosomes. Generally applied to spaces which are too large.

5. Genetic algorithms are often used to improve the performance of other AI methods such as
expert system or natural selection.

6. The method learns by producing offspring that are better and better as measured by a fitness
function, which is measure of the objective to be obtained. (maximum or minimum).

TILING ALGORITHMS:

A tiling algorithm collects the classes to be scheduled into clusters known as tiles. Each of
these tiles hold classes which can run simultaneously; these tiles are then assigned times using
a separate search algorithm of some kind. This approach was used with some degree of success
(Kingston, 2005), but only in situations such as that in a high school where several classes of
students sit the same subject simultaneously. These groups of classes are clustered into the tiles
for scheduling – this does not tend to happen in a university timetable where cohort groups sit
far more varied courses.
5) VARIABLES USED:

Time slots of the time tables:- ts1, ts2, ts3…., tsn

List of Subjects:- s1,s2,s3, …., sn

Teachers:- t1,t2,t3, …., tn

Batches of students:- c1,c2,c3, ….., cn

Flags indicating finalized timeslots :- tsf1, tsf2, tsf3, ….., tsfn

Data structure to hold Final Timetable:-final_tt

Count for day of week: Daycount

Number of days of the week:- n

Data structure to hold Subject-clash within the day:- clash

Each element of Clash data structure:- clash_ele

Data structure for Subject-clash across days:- Dayclash

Each element of Dayclash data structure:- day_clash_element

Subject contained in dayclash:- sdc

Teacher associated with subject in dayclash:- tdc

Max number of lectures of subject si in the week:-k

Counter for the number of subjects:- counter_sub

Random number indicating random slot allotment for subject:- rand_sub_allot

Data structure to hold randomly allotted subject:- rand_sub_seq

Data structure to hold all subjects:- init_sub


6) No. Of nested for loops used:

In this for nested for loops are used. The Genetic algorithm and tiling algorithm consists of
four nested loops.

7) Database design and Connectivity:

The system is implemented in such a way that all the valid information’s are stored in the
database. Database design converts the data model developed in logical designing to database
definition. This is supported by database software. The management of data involves baoh the
definition of structure of the storage of information and provision of mechanism for the
manipulation of information. In addition database system must provide safety of information
handle, despite the system crashes due to attempts of unauthorized access. A database is a
collection of interrelated data stored with minimum redundancy to serve many users quickly
and efficiently. In database design, several views of data must be considered along with the
person who users them. The logical view is what the data look like, regardless of how they are
stored. The physical view is the way data exist in physical storage. Tables are carefully
designed aiming to achieve its main objectives i.e, to make information access easy, quick,
inexpensive and flexible for user.

NORMALIZATION

Normalization is the process of analyzing the given relation schemas based on their Functional
Dependencies and primary keys to achieve the desirable properties of Minimizing Redundancy,
Minimizing the insertion, deletion and updating anomalies. Normalization is carried out for the
following reasons:

• To structure the data so that perfect relationship between entries can be represented.

• To permit simple retrieval of data in response query and report requests.

• To reduce the need to restructure or reorganize data when new application requirement arises.

1.First Normal Form (1NF)

A table is in 1NF if there are no duplicate rows in the table. Each cell is single valued. Entries
in a column are of the same kind.
2. Second Normal Form (2NF)

Second Normal form is based on the concept of full functional dependency. A table (relation)
is in 2NF if .It is in First Normal Form and if all non-key attributes are dependent on the key.
Dependent on only a part of the (composite) key, the definition of 2NF is sometimes phrased
as, "A table is in 2nF if it is in 1NF and if it has no partial dependencies.”

3. Third Normal Form (3NF)

Third Normal Form is based on the concept of transitive dependency. A table (relation) is in
3NF if it is in Second Normal Form and if it has no transitive dependencies.

8) SOFTWARE AND HARDWARE REQUIREMENTS

Software Specification

➢ Operating System : Windows/Linux

➢ Technology : JSP/SERVLET

➢ Web Technologies : XHtml, JavaScript, CSS

➢ Web Server : Appache Tomcat/Glassfish

➢ Design Tools :NetBeans IDE

➢ Compiler : JDK

➢ Database : MySQL

➢ Web Browser :Mozilla Firefox/Google Chrome

9) Interfaces

MySQL is primarily an RDBMS and ships with no GUI tools to administer MySQL databases
or manage data contained within the databases. Users may use the included commandlines
tools, or use MySQL "front-ends", desktop software and web applications that create and
manage MySQL databases, build database structures, back up data, inspect status, and work
with data records.. The official set of MySQL front-end tools, MySQL workbench is actively
developed by Oracle, and is freely available for use.

10) CODING:

The system contains 3 users , Faculty , Principal and Admin. Each user have their own
functionalities as follows .

Function : Subject allocation

Input :subject, faculty and semester

Output : timetable

Logic:

Step 1: Read subject , faculty and semester from the tables subject, faculty and semester
respectively.

Step 2: Validate the details and processing is done

Step 3: subject allocated for facultys successfully in the table named Timetable.

Function : View Timetable

Input : Subject,Semester, Faculty

Output : Timetable Logic:

Step 1: Read subject , faculty and semester from the tables subject, faculty and semester
respectively.

Step 2: Timetable generated successfully in the table called timetable.

Function : Request for leave

Input : Date,Reason,Substitute

Output : Approve / Reject request

Logic:

Step 1: Read date, reason and substitute faculty from the tablefac_leave
Step 2: Get Substitute status from fac_leave

Step 3: Request succesfully sent (Approve / Reject) If Facuty need to take a leave the he/she
can apply for leave with setting Substitutes. Here Date at which leave is required , reason and
substitute.

faculty should be specified.

Function : Substitute request

Input : Request

Output : Approve / Reject Logic:

Step 1: Read the information and Apply for leave with providing date ,reason and aubstitute
facilty in the table fac_leave

Step 2: Substitute request successfully sent (approve/reject)

Function : Grant or deney

Input : Request

Output : Reply message sendApprove / Reject Logic:

Step 1: Access substitute request send by the faculty from fac_leave

Step 2: Reply for Substitute request successfully sent (approve/reject)

Function : Grant leave

Input : Request

Output : Reply message send Approve / Reject Logic:

Step 1: Access leave request send by the faculty from fac_leave

Step 2: Reply for Request for leave successfully sent (approve/reject)

Function : Subject allocation

Input :subject, faculty and semester

Output : timetable

Logic:
Step 1: Read subject , faculty and semester from the tables subject, faculty and semester
respectively.

Step 2:Validate the details and processing is done.

Step 3:Timetable generated Successfully.

Apply Leave

package autotimetable;

import java.io.IOException;

import java.io.PrintWriter;

import java.util.ArrayList;

import javax.servlet.ServletException;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

public class signup extends HttpServlet { protected void


processRequest(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException { response.setContentType("text/html;charset=UTF-8");

String path="index.jsp#overlay";;

try {

DB d=new DB();

String uname=request.getParameter("name");

String pass1=request.getParameter("pass1");

String pass2=request.getParameter("pass2");

String fname=request.getParameter("fn");

String lname=request.getParameter("ln");
String addr=request.getParameter("addr");

String contactno=request.getParameter("cn");

String dob=request.getParameter("dob");

String doj=request.getParameter("doj");

String qualific=request.getParameter("qu");

String email=request.getParameter("email");

String maddr=request.getParameter("maddr");

String course=request.getParameter("course");

String subjectlist[]=request.getParameterValues("subjectslist");

String slist="";

for(int i=0;i<subjectlist.length;i++)

{ // System.err.println("subjectlist :"+subjectlist[i]);

slist=slist+subjectlist[i]+",";

ArrayList<String> a=new ArrayList<String>();

a.add(uname);

a.add(pass1);

a.add(pass2);

a.add(fname);

a.add(lname);

a.add(addr);

a.add(contactno);

a.add(dob);

a.add(doj);
a.add(qualific);

a.add(email);

a.add(maddr);

a.add(course);

a.add(slist);

d.addTeacher(a);

path="index.jsp?success"; }

finally { } response.sendRedirect(path); }

protected void doGet(HttpServletRequest request, HttpServletResponse response)


throws ServletException, IOException { processRequest(request, response); }
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException { processRequest(request, response); }

public String getServletInfo() { return "Short description"; }}

Substitute request

%@page import="java.sql.ResultSet"%

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE html>

<jsp:useBean id="object" class="autotimetable.DB" />

<% ResultSet r=object.getSubst(session.getAttribute("id")+"");

out.print("<table id='admin_menu'>");

out.print("<th>");

out.print("</th>");

out.print("<th>");

out.print("</th>");

out.print("<th>");
out.print("Requested By</th>");

out.print("<th>");

out.print("Requested For</th>");

out.print("<th>");

while(r.next())

out.print("<tr>");

out.print("<td>");

out.print("<div style='padding: 10px 10px 10px 10px; backgroundcolor:green'>

<a href='user/leaveAction.jsp?id="+session.getAttribute("id")
+"&date="+r.getString(2)+"&action=approved'
style='textdecoration:none;color:white'>Approve</a></div>");

out.print("</td>");

out.print("<td>");

out.print("<div style='padding: 10px 10px 10px 10px; backgroundcolor:Red'>

<a href='user/leaveAction.jsp?id="+session.getAttribute("id")
+"&date="+r.getString(2)+"&action=Rejected'
style='textdecoration:none;color:white'>Reject</a></div>");

out.print("</td>");

11) COUPLING:

Coupling is a term to describe the interactions between components.The lower coupling, the
less interaction(i.e., more independence) between components.

Coupling(C) makes the value larger the more coupled the module is. This number ranges from

approximately 0.67 (low coupling) to 1.0 (highly coupled)

For example, if a module has only a single input and output data parameter
If a module has 5 input and output data parameters, an equal number of control parameters,
and accesses 10 items of global data, with a fan-in of 3 and a fan-out of 4,

12) COHESION:
If the methods that serve a class tend to be similar in many aspects, then the class is said to
have high cohesion.In a highly cohesive system, code readability and reusability is increased,
while complexity is kept manageable.

Cohesion is increased if:

 The functionalities embedded in a class, accessed through its methods, have much in
common.
 Methods carry out a small number of related activities, by avoiding coarsely grained or
unrelated sets of data.

Advantages of high cohesion (or "strong cohesion") are:

 Reduced module complexity (they are simpler, having fewer operations).


 Increased system maintainability, because logical changes in the domain affect fewer
modules, and because changes in one module require fewer changes in other modules.
 Increased module reusability, because application developers will find the component they
need more easily among the cohesive set of operations provided by the module.

While in principle a module can have perfect cohesion by only consisting of a single, atomic
element – having a single function, for example – in practice complex tasks are not expressible
by a single, simple element. Thus a single-element module has an element that either is too
complicated, in order to accomplish a task, or is too narrow, and thus tightly coupled to other
modules. Thus cohesion is balanced with both unit complexity and coupling.

13) TIME COMPLEXITY:

Computational complexity theory is the study of the complexity of problems that is, the
difficulty of solving them. Problems can be classified by complexity class according to the time
it takes for an algorithm usually a computer program to solve them as a function of the problem
size. In our problem the complexity is of merging of slots for each faculty. Time that takes for
this research project is much more.

Timeslot has an address in which a subject, student gathering going to the address and educator
showing the subject is related. Also, further on discussing the imperatives, We have utilized
composite configuration design, which make it well extendable to include or uproot as
numerous obligations.

In every obligation class the condition as determined in our inquiry is now checked between
two timetable objects. On the off chance that condition is fulfilled i.e. there is a crash is
available then the score is augmented by one.

15) SNAPSHOTS:
VIEW TIMETABLE:
APPLY FOR LEAVE:
VIEW LEAVE STATUS:

16) RESULTS:

ADMIN:
2. Conclusion:

Separate timetable for the individual class, faculty and labs are generated automatically by this
system. Various slot combinations can be acquired so that another timetable is generated as of
need. The project reduces time consumption and he pain in framing the timetable manually.The
project is developed in such a way that, no slot clashes occur providing features to tailor the
timetable as of wish. Additional features that is included in the project is that faculty
replacement is also made possible by listing out the available faculty who are eligible to be
assigned as temporary faculty until a replacement faculty is assigned The future enhancement
that can be developed from the project is to generate the master timetable for the departments
and to the entire college. This enhancement can be achieved my making further modifications
keeping the approach and techniques used for this project.

3. References:

https://www.ijser.org/researchpaper/Automatic-Timetable-Generation-
using-Genetic-Algorithm.pdf

https://myprojectbazaar.com/product/2016-projects/automatic-time-table-
generation-finalized-application-www-myprojectbazaar-com/

http://ijrise.org/asset/archive/CSE_UG504.pdf

http://edutechwiki.unige.ch/en/Educational_technology

Potrebbero piacerti anche