Web Design and Development - CS506 Fall 2005 Final Term Paper
Web Design and Development - CS506 Fall 2005 Final Term Paper
StudentID/LoginID
Name
PVC Name/Code
Date
Please read the following instructions carefully before attempting any question:
The examination mode for the cs506 final term examination is take home examination,
which mean that you are allowed to take your examination papers to your home or
computer labs and complete it using all available resources. Followings are the instructions
for doing the take home examination.
• You are all directed to come to the examination centre on the date as per the date
sheet of the final term examination provided by the Virtual University. Please come
on the time for the first session of the exam.
• On reaching the examination center you are directed to mark your attendance
• After marking the attendance the exam supervisor will hand you the hard copy of
the examination paper
• After taking the paper you can either go home to complete your paper or use PVC
labs.
• The duration of this take home examination is four days of the examination. i.e. for
cs506 it is till 20th March 2006
• On third day (on the last day) upload the solved examination paper on the
assignments page of your course. You are allowed to use the lab facilities of the
campuses, books and handouts and any other references material available to you.
• The examination papers submitted after the due date will be marked as zero
• Plagiarism or cheating by the students will be dealt severely by Virtual University
therefore it is strongly recommended that you do your own work.
• Further instructions will be available to you with the examination paper
• You are allowed to use Software J2SE 5.0 or 1.5.0, Microsoft Access, Java
5.0 Documentation, NetBeans4.1 and Tomcat 5.5.15.
Note: Write your code carefully with proper commenting, the instructor would not
go extra mile to understand your code. Avoid cluttering of code
Note: All the files will be packed in to zip format before uploading e.g.
bc020200111.zip
**WARNING: Please note that Virtual University takes serious note of unfair
means. Anyone found involved in cheating will get an `F` grade in this course.
Marks
Hint: Computer can think of a number using random function and can store it in session.
When your application starts, the “index.jsp” would be displayed. User will provide user
name & password to login.
If user name & password are correct, the program will lead to “inbox.jsp”. This page will
display “from” & “subject” of the messages related to the user in tabular format. By
selecting any message, user can read the message text on “message.jsp”.
If the user supplies incorrect username or password, the user will be taken to a page
“invalidlogin.jsp” with an option of going back to the index.jsp page
You are required to use JSP (and /or Servlets) and JavaBeans to solve this problem.
Simplifications
No fancy HTML is required. Selection of message can be done by any means (e.g.
hyperlinks, radio buttons etc.)
List A List B
1 Customer\ web.xml
2 Customer\Web-INF\ CustomerLibDAO.class
3 Customer\Web-INF\classes Customer.jsp
4 Customer\Web-INF\lib Somelib.jar
Question No: 4 Marks: 15
Suppose there is a web application in which a user can determine the factorial of a number.
User gives a number in a text field and presses submit button. The application calculates
the factorial and displays it on the same page. There is a bean known as “MathBean” which
has a method for calculating factorial.
User can repeat the process as many times as required. When user presses the finish button,
user is taken to a page where all the results, which the user has calculated, will be displayed
with a Thank you message. The results calculated by user are stored in a bean known as
“ResultsBean”.
Besides calculating factorial user can do different operations such as nCr, nPr through this
application, a bean known as “OperationListBean” contains the list of all the operations
that a user can do. These operations are common for all users. Identify the scope (session,
request, page, application etc) for each of the above mentioned beans in a web application.
Why you would put that bean in that scope?
ResultsBean
OperationListBean
Question No: 5 Marks: 30
Create a simple web application that takes the id of a student and list the courses in which
the student has enrolled, either for the current semester or all courses he or she has attended
so far (depending upon the option selected). If the user gives an invalid id, it asks the user
to give a valid one.
A JSP (findcourses.jsp) to get id and option from the user. The option indicates whether a
student wants to see the courses of the current semester or wants to see the full list. You
can use any method to get option (e.g. checkbox, text field etc.)
A java bean that will get the courses from the database and send an object back which
contains the registered courses.
A JSP (courselist.jsp) to present the data to user and a jsp to indicate invalid
Id(invalidId.jsp) with an option to go back to findcourses.jsp
You are required to use JSP (and /or Servlets) and JavaBeans to solve this problem.
Simplifications
No fancy HTML is required.
WWW.VUTUBE.EDU.PK