0% found this document useful (0 votes)
234 views

Web Design and Development - CS506 Fall 2005 Final Term Paper

This document provides instructions for a take-home final exam for the course CS506 Web Design and Development. It states that students can complete the exam at home or in computer labs over a period of 4 days. It provides instructions on attending the exam center, receiving the exam paper, uploading the completed exam, academic integrity policies, and allowed resources. The exam consists of 5 questions worth a total of 100 marks. Question details include building a number guessing game, part of an email system using JSP/servlets and beans, matching files/classes to directories, scopes for different beans in a web application, and creating an application to view student course enrollments.

Uploaded by

Muhammad Hasnain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
234 views

Web Design and Development - CS506 Fall 2005 Final Term Paper

This document provides instructions for a take-home final exam for the course CS506 Web Design and Development. It states that students can complete the exam at home or in computer labs over a period of 4 days. It provides instructions on attending the exam center, receiving the exam paper, uploading the completed exam, academic integrity policies, and allowed resources. The exam consists of 5 questions worth a total of 100 marks. Question details include building a number guessing game, part of an email system using JSP/servlets and beans, matching files/classes to directories, scopes for different beans in a web application, and creating an application to view student course enrollments.

Uploaded by

Muhammad Hasnain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

FINALTERM EXAMINATION Total Marks:100

SEMESTER FALL 2005


CS506- Web Design & Development Duration:4 Days

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.

For Teacher’s use only


Total
Question Q1 Q2 Q3 Q4 Q5
Marks

Marks

Question No: 1 Marks: 15


You are required to build a number guessing game using servlets only. All of the HTML
will be generated from the servlet. Computer can think a number for each user between 1 to
100. User can enter a number in the space provided for this purpose and presses “guess”
button. If this entered number is matched with the one thought by the computer, a message
“your guess is right” would be displayed on the same page. A message “your guess is too
high, choose small” would be displayed if the number entered is greater than of computer
on the same page. Similarly, a message “your guess is too low, choose high” would be
displayed if the number entered is lesser than of computer on the same page. User can
continue to play until he/she guessed the right number or closes the browser manually.
Nothing fancy is required to solve this problem.

Hint: Computer can think of a number using random function and can store it in session.

Question No: 2 Marks: 30


You are going to build a part of E-Mail system. The database that will be used for this
system is given below

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”.

The user can return to “index.jsp” by clicking on hyperlinks available at bottom of


“message.jsp” and “inbox.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.)

Question No: 3 Marks: 10


List A contains directories of a standard web application and List B contains some
files/classes. Match items of List B with List A.

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?

Name of Bean Scope Why?


MathBean

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) Assume we have a table with columns (id , course , isCurrentTrimesterCourse , year )


b) The dsn for db is “coursesdb”

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

You might also like