INTRODUCTION
2. PROJECT ANALYSIS
3. REQUIREMENT ANALYSIS
3.1 Purpose And Scope:
Purpose:providing security to all records
Scope: 1) providing access to only authenticated users .
2) Know updated notices,
3) View marks posted.
4) View all data related to lab tasks.
Faculty :Report generation is performed by faculty .He/she is able to maintain the database
dynamically.He/she will give notices and latest updates regarding the labs.He/she gives
guidance to students.
Admin is to maintain the database and to solve any technical problems if occurs.
4. SPECIFIC REQUIREMENTS
4.1 User Interface Requirements:
Professional look and feel
Use of AJAX at least with all registration forms
Browser testing and support for IE, NN, Mozilla, and Fire fox.
Reports exportable in .XLS, or any other desirable format.
Marks
Student
Syntaxes
Tasks
Home2 page
Discussion
forum
Login page
Faculty
marks
Notices
Registration
page
Discussion forum
Administrator
Admin page
6. SYSTEM REQUIREMENTS
5
6.1Technologies Used:
a ) HTML
b) Servlets
c) Jsps
d) Xml
e) java Script
Oracle10g.
Rational Rose98 Enterprise Edition.
Eclipse3.3.
Tomcat5.5.
7. SYSTEM DESIGN
7.1 Dataflow Diagrams
Assi
gn
ha
s
Contr
ol
Admin
Faculty
Student
marks
fid
vie
w
Student
Ha
s
Ha
s
Ha
s
Semister
RollN
O
FID
RollNO
LabId
bid
TaskI
d
FirsstNa
me
Observati
on Marks
LastN
ame
Firstnam
e
LastName
Record
marks
Address
Attenda
nce
marks
phoneNo
Passwor
d
Designat
ion
Batch
Executio
n
Address
year
Usecase Diagram:
Student
Name : type = varchar
password : type = varchar
year : type = varchar
batch : type = initval
semister : type = int
Address : type = varchar
login()
view tasks()
Give feedback()
post question()
view solution()
view Notices()
view syntaxes()
view sample programs()
download textbooks()
logout()
*..1
Administrator
Name : type = Varchar
Designation : type = vardhar
password : type = varchar
login()
maintains database()
logout()
*..1
Faculty
name : type = varchar
password : type = varchar
designation : type = varchar
Addres : type = varchar
login()
post marks()
post question()
view solution()
give notices()
update marks()
logout()
Faculty
System
Database
10
Student Login
Student
System
Database
Admin Login:
Admin
System
Database
11
View notices:
Student
System
Database
View feedback:
Faculty
System
Database
otherwise
12
Post Marks:
Faculty
System
Databse
Update Marks:
Faculty
System
Databse
13
Administrator
Databse
Maintains the database
Solves technical problems
Admin works:
View Tasks:
Student
System
14
View Syntaxes:
Student
System
Discussion Forum:
User
System
Post question
Database
15
Databas
e
1: 3:
Enter
Dis plays
the details
s uccess fully regis tered
Student
Faculty Registration:
1: Enter the details
Faculty
Sys tem
Databas
e
16
Admin Registration:
1: Enter the details
Adm inis tr
ator
Sys tem
Databas
e
Faculty Login:
1: Enter the details
System
Faculty
4: Displays successfully logged in
6: Need to be registered
3: user exists
5: otherwise
Databas
e
17
StudentLogin:
System
4: Dispalys loggedin
6: Must be registerd
3: Exists
5: otherwise
2: verifies with DB
Databas
e
AdminLogin:
1: Enter the details
Admin
System
4: Dispalys loggedin
6: Must be registerd
3: Exists
5: otherwise
2: verifies with DB
Databas
e
18
View notices:
1: Request for Notices
Student
System
4: Displays notices
6: Need to be entered by Faculty
3: if they exists
5: otherwise
2: verifies with the database
Databas
e
View Feedback:
1: Request for feedback
System
Faculty
4: Displays Feedback
6: Need to be entered by Student
3: if feedback exists
5: otherwise
2: verifies with the database
Databas
e
19
PostMarks:
Sys tem
Databs e
UpdateMarks:
1: update weekly m arks
Faculty
Sys tem
Databs e
20
Admin works
1: Maintains the database
2: Solves technical problems
Administr
ator
Databse
Viewsyntaxes:
1: Requests for Syntaxes
Student
System
2: Displays Syntaxes
Discussion forum:
1: Post question
System
User
Databas
e
21
22
Login verification:
23
24
25
Report generation
26
View Marks
27
8. SNAP SHOTS
Home Page:
Login Page:
28
29
Admin
Students Marks:
30
Discussion Forum:
31
Best Performer:
Text Books:
32
Tasks:
Syntaxes:
33
Notices:
9. SAMPLE CODE
34
rs.next();
String status2=rs.getString(1);
if(status2.equals("Student")){
rd=request.getRequestDispatcher("icons1.html");//goes to
student home page
rd.forward(request,response);
}
else if(status2.equals("Faculty")){
rd=request.getRequestDispatcher("s.html"); //goes
to faculty home page
rd.forward(request,response);
}
else if(status2.equals("Admin")){
rd=request.getRequestDispatcher("icons1.html"); //goes to admin home page
rd.forward(request,response);
}
}
} catch (InstantiationException e) {
// catch exceptions
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
37
TESTCASE
NAME
INPUT
EXPECTED
OUTPUT
Userid values
Manikantha
If length of Userid
Invalid
userid less than value
8 it is valid
entered is
greater than
8
If length of Userid
Valid
userid less than value is a
8 it is valid
valid one
Sairam
ACTUAL
OUTPUT
VALID/INVALID
INPUT
Sairam
520
Faculty login
Userid:Faculty
name
Password:fac
EXPECTED
OUTPUT
ACTUAL
OUTPUT
VALID/INVALID
If length of userid
less than 8 it is
valid
And the userid
and
password
values
in
database
table
should match
If length of userid
less than 8 it is
valid
And the userid
and
password
values
in
database
table
should match
Userid
and
Faculty
values
should
match
with
facultys
userid
and
password
Userid
Invalid
value
entered is
greater
than 8
Userid
Valid
value and
password
is a valid
one
Invalid
Invalid
userid or
password
again
control is
back
to
login page
Userid:Faculty
Userid and admin Valid ones Valid
Password:Faculty values
should so control
match
goes dmin
38
withuid&pasword page
40
Write a C program that uses functions to perform the following operations on doubly linked
list.:
i) Creation ii) Insertion iii) Deletion iv) Traversal in both ways
Week 15
Write C programs that implement stack (its operations) using
i) Arrays ii) Pointers
Week 16
Write C programs that implement Queue (its operations) using
i) Arrays ii) Pointers
Week 17
Write a C program that uses Stack operations to perform the following:
i) Converting infix expression into postfix expression
ii) Evaluating the postfix expression
Week 18
Write a C program that uses functions to perform the following:
i) Creating a Binary Tree of integers
ii) Traversing the above binary tree in preorder, inorder and postorder.
Week 19
Write C programs that use both recursive and non recursive functions to perform the
following searching
operations for a Key value in a given list of integers :
i) Linear search ii) Binary search
Week 20
Write C programs that implement the following sorting methods to sort a given list of
integers in ascending
order:
i) Bubble sort ii) Quick sort
Week 21
Write C programs that implement the following sorting methods to sort a given list of
integers in ascending
order:
i) Insertion sort ii) Merge sort
Week 22
Write C programs to implement the Lagrange interpolation and Newton- Gregory forward
interpolation.
Week 23
Write C programs to implement the linear regression and polynomial regression algorithms.
Week 24
Write C programs to implement Trapezoidal and Simpson methods.
2) JAVA:
Week1 :
a) Write a Java program that prints all real solutions to the quadratic equation ax2 + bx + c =
0. Read in a,
b, c and use the quadratic formula. If the discriminant b2 -4ac is negative, display a message
stating that
41
42
a) Write a Java program that creates three threads. First thread displays Good Morning
every one
second, the second thread displays Hello every two seconds and the third thread displays
Welcome
every three seconds.
b) Write a Java program that correctly implements producer consumer problem using the
concept of inter
thread communication.
Week 10 :
Write a program that creates a user interface to perform integer divisions. The user enters two
numbers in
the textfields, Num1 and Num2. The division of Num1 and Num2 is displayed in the Result
field when the
Divide button is clicked. If Num1 or Num2 were not an integer, the program would throw a
NumberFormatException. If Num2 were Zero, the program would throw an
ArithmeticException Display
the exception in a message dialog box.
Week 11 :
Write a Java program that implements a simple client/server application. The client sends
data to a server.
The server receives the data, uses it to produce a result, and then sends the result back to the
client. The
client displays the result on the console. For ex: The data sent from the client is the radius of
a circle, and
the result produced by the server is the area of the circle. (Use java.net)
Week 12 :
a) Write a java program that simulates a traffic light. The program lets the user select one of
three lights:
red, yellow, or green. When a radio button is selected, the light is turned on, and only one
light can be on
at a time No light is on when the program starts.
b) Write a Java program that allows the user to draw lines, rectangles and ovals.
Week 13 :
a) Write a java program to create an abstract class named Shape that contains an empty
method named
numberOfSides ( ).Provide three classes named Trapezoid, Triangle and Hexagon such that
each one of
the classes extends the class Shape. Each one of the classes contains only the method
numberOfSides
( ) that shows the number of sides in the given geometrical figures.
b) Suppose that a table named Table.txt is stored in a text file. The first line in the file is the
header, and
the remaining lines correspond to rows in the table. The elements are 49eparated by commas.
Write a
java program to display the table using Jtable component.
3) CPP
43
Week1 :
C++ programs to implement the following using an array.
a) Stack ADT b) Queue ADT
Week2 :
Write C++ programs to implement the following using a singly linked list.
a) Stack ADT b) Queue ADT
Week3 :
Write C++ programs to implement the deque (double ended queue) ADT using a doubly
linked list and an
array.
Week 4 :
Write a C++ program to perform the following operations:
a) Insert an element into a binary search tree.
b) Delete an element from a binary search tree.
c) Search for a key element in a binary search tree.
Week5 :
.Write C++ programs that use non-recursive functions to traverse the given
binary tree in
a) Preorder b) inorder and c) postorder.
Week6 :
Write C++ programs for the implementation of bfs and dfs for a given graph.
Week7 :
Write C++ programs for implementing the following sorting methods:
a) Merge sort b) Heap sort
Week8 :
Write a C++ program to perform the following operations
a) Insertion into a B-tree b) Deletion from a B-tree
Week9 :
.Write a C++ program to perform the following operations
a) Insertion into an AVL-tree b) Deletion from an AVL-tree
Week10 :
Write a C++ program to implement all the functions of a dictionary (ADT)
using hashing.
Week11 :
Write a C++ program for implementing Knuth-Morris- Pratt pattern matching
algorithm.
Week12 :
Write a C++ program for implementing Boyer Moore Patten matching
algorithm
4) UNIX
Week1
Session-1
a)Log into the system
b)Use vi editor to create a file called myfile.txt which contains some
text.
c)correct typing errors during creation.
d)Save the file
44
Week5
a)Write a shell script that takes a command line argument and reports on whether it is
directory, a file, or
something else.
b)Write a shell script that accepts one or more file name as arguments and converts all of
them to
uppercase, provided they exist in the current directory.
c)Write a shell script that determines the period for which a specified user is working on the
system.
Week6
a)Write a shell script that accepts a file name starting and ending line numbers as arguments
and displays
all the lines between the given line numbers.
b)Write a shell script that deletes all lines containing a specified word in one or more files
supplied as
arguments to it.
Week7
a)Write a shell script that computes the gross salary of a employee according to the following
rules:
i)If basic salary is < 1500 then HRA =10% of the basic and DA =90% of the basic.
ii)If basic salary is >=1500 then HRA =Rs500 and DA=98% of the basic
The basic salary is entered interactively through the key board.
b)Write a shell script that accepts two integers as its arguments and computers the value of
first number
raised to the power of the second number.
Week8
a)Write an interactive file-handling shell program. Let it offer the user the choice of copying,
removing,
renaming, or linking files. Once the user has made a choice, have the program ask the user for
the
necessary information, such as the file name, new name and so on.
b)Write shell script that takes a login name as command line argument and reports when
that person
logs in
c)Write a shell script which receives two file names as arguments. It should check whether
the two file
contents are same or not. If they are same then second file should be deleted.
Week9
a)Write a shell script that displays a list of all the files in the current directory to which the
user has read,
write and execute permissions.
b)Develop an interactive script that ask for a word and a file name and then tells how many
times that
word occurred in the file.
c)Write a shell script to perform the following string operations:
i)To extract a sub-string from a given string.
ii)To find the length of a given string.
Week10
Write a C program that takes one or more file or directory names as command line input and
reports the
46
Password:
3) CATALOUGE PAGE:
The catalogue page should contain the details of all the books available in the web site in a
table.
The details should contain the following:
1. Snap shot of Cover Page.
2. Author Name.
3. Publisher.
4. Price.
5. Add to cart button.
Logo
Web Site Name
Home Login Registration Catalogue Cart
CSE
ECE
EEE
CIVIL
Book : XML Bible
Author : Winston
Publication : Wiely
$ 40.5
Book : AI
Author : S.Russel
Publication : Princeton
hall
$ 63
Book : Java 2
Author : Watson
Publication : BPB
publications
$ 35.5
Book : HTML in 24 hours
Author : Sam Peter
Publication : Sam
publication
$ 50
Note: Week 2 contains the remaining pages and their description.
Week-2:
4) CART PAGE:
Submit Reset
The cart page contains the details about the books which are added to the cart.
The cart page should look like this:
Logo
Web Site Name
Home Login Registration Catalogue Cart
CSE
ECE
EEE
CIVIL
48
For example:
LAYER 1 ON TOP:
<div style="position:relative; font-size:50px; z-index:2;">LAYER 1</div>
<div style="position:relative; top:-50; left:5; color:red; font-size:80px; zindex:
1">LAYER 2</div>
LAYER 2 ON TOP:
<div style="position:relative; font-size:50px; z-index:3;">LAYER 1</div>
<div style="position:relative; top:-50; left:5; color:red; font-size:80px; zindex:
4">LAYER 2</div>
6) Add a customized cursor:
Selector {cursor:value}
Week-5:
Write an XML file which will display the Book information which includes the following:
1) Title of the book
2) Author Name
3) ISBN number
4) Publisher name
5) Edition
6) Price
Write a Document Type Definition (DTD) to validate the above XML file.
Display the XML file as follows.
The contents should be displayed in a table. The header of the table should be in color GREY.
And the
Author names column should be displayed in one color and should be capitalized and in bold.
Use your
own colors for remaining columns.
Use XML schemas XSL and CSS for the above purpose.
Note: Give at least for 4 books. It should be valid syntactically.
Hint: You can use some xml editors like XML-spy
Week-6:
VISUAL BEANS:
Create a simple visual bean with a area filled with a color.
The shape of the area depends on the property shape. If it is set to true then the shape of the
area is
Square and it is Circle, if it is false.
The color of the area should be changed dynamically for every mouse click. The color should
also be
changed if we change the color in the property window .
Week-7:
1) Install TOMCAT web server and APACHE.
While installation assign port number 4040 to TOMCAT and 8080 to APACHE. Make sure
that these ports are available i.e., no other process is using this port.
2) Access the above developed static web pages for books web site, using these servers by
putting the web pages developed in week-1 and week-2 in the document root.
Access the pages by using the urls : http://localhost:4040/rama/books.html (for tomcat)
http://localhost:8080/books.html (for Apache)
Week-8:
User Authentication :
Assume four users user1,user2,user3 and user4 having the passwords pwd1,pwd2,pwd3
and pwd4 respectively. Write a servelet for doing the following.
50
1. Create a Cookie and add these four user ids and passwords to this Cookie.
2. Read the user id and passwords entered in the Login form (week1) and authenticate
with the values (user id and passwords ) available in the cookies.
If he is a valid user(i.e., user-name and password match) you should welcome him by
name(user-name) else you should display You are not an authenticated user .
Use init-parameters to do this. Store the user-names and passwords in the webinf.xml and
access them in the servlet by using the getInitParameters() method.
Week-9:
Install a database(Mysql or Oracle).
Create a table which should contain at least the following fields: name, password, email-id,
phone number(these should hold the data from the registration form).
Practice 'JDBC' connectivity.
Write a java program/servlet/JSP to connect to that database and extract data from the
tables and display them. Experiment with various SQL queries.
Insert the details of the users who register with the web site, whenever a new user clicks the
submit button in the registration page (week2).
Week-10:
Write a JSP which does the following job:
Insert the details of the 3 or 4 users who register with the web site (week9) by using
registration
form. Authenticate the user when he submits the login form using the user name and
password
from the database ( similar to week8 instead of cookies).
Week-11:
Create tables in the database which contain the details of items (books in our case like Book
name , Price, Quantity, Amount )) of each category. Modify your catalogue page (week 2)in
such
a way that you should connect to the database and extract data from the tables and display
them
in the catalogue page using JDBC.
Week-12:
HTTP is a stateless protocol. Session is required to maintain the state.
The user may add some items to cart from the catalog page. He can check the cart page for
the
selected items. He may visit the catalogue again and select some more items. Here our
interest
is the selected items should be added to the old cart rather than a new cart. Multiple users can
do the same thing at a time(i.e., from different systems in the LAN using the ip-address
instead of
localhost). This can be achieved through the use of sessions. Every user will have his own
session which will be created after his successful login to the website. When the user logs out
his
session should get invalidated (by using the method session.invalidate() ).
Modify your catalogue and cart JSP pages to achieve the above mentioned functionality using
sessions.
51
12. APPENDIX
Software requirements
Operating system
:windows XP/linux
:Jsp,servlets
Clientside script
:HTML,javascript
IDE
:eclipse
Webserver
:Tomcat
Hardware Requirements
Processor
:Pentium IV
RAM
:512mb
Harddisk
:40 GB
52
Password
Role
Faculty
Fid
FirstName
LastName
Address
PhoneNo
Password
Designation
Student:
RollNo
FirstName
LastName
Address
Year
Password
Semister
Notices
Noticesid NoticesDescription FacultyId
LabId
Semister
Questions
QuestionId Quedstion
Administrator:
Fid
semester
Labid
Bid
Student Marks:
RollNo
TaskId
Observation Record
53
Attendance Execution
Batch
solutions
QuestionId Quedstion
Enhancements:
54
13. REFERENCES
Books:
The complete Reference Java2 By Patrick Naughton and Herbert Schildt, TMH
Publishing Company Ltd.
Websites:
www.tgmc.in
www.ibm.com
www.cgisecurity.com
55
56