CSC309 Assignment #4: Design Information
Front End (suggested list)
What follows is a suggested list of screens.
You may have to add more.
admin is an administrative screen
(accessable by administrators only).
part is a participant screen
(accessable by participants only).
all is a screen accessable by both
administrators and participants.
- Login (all): Administrators and participants both log into the same
screen. Their id distinguishes their role and so the subsequent following
page. Every individual who wishes to take a test must login. All logins are
validated against the database (password table).
- Admin main (admin): This static page should have links to
- List all tests
- Create test
- Display test statistics
- Display a participant's test statistics.
- Create test (admin): Allows an administrator to specify the name and
duration of a new test. This page has a link to Add question (below).
- Add question (admin):
- Allows administrator to add a single additional question and up to 4
responses to the current test. The correct answer is specified here.
- Confirm test (admin): Commit the new test to the database or cancel the
addition of this new test.
- Participants main (part): After participant login
- List all tests that this participant has taken (with links to statistics
for their test).
- Lists all tests that they can take (with links to actual test)
- Take test (part): Take a particular test, this lists all questions and
potential answers. This screen should include the test duration and could
include a countdown timer listing the amount of time remaining. The timer is
to be written using Javascript (you can grab one off the web). Make sure
you refer to your source!! The timer should autosubmit the participants
answers after test-duration minutes. Of course, the participant can submit
earlier.
Back End Data Model (suggestive only)
Following is the simplest possible data model.
Better data models are certainly possible.
- Password(userId, password, role): Identifies users (by their unique
userId) and validates them using their password. Also identifies their role
(admin or participant).
Primary key:userId
- Test(name, duration): The unique test name and its duration
Primary
key:name
- Question(testName, questionNumber, content, correctResponse):
Each row in this table corresponds to a question on the test.
The correct response is identified as an integer in the range 1 to 4.
Primary key:testName, questionNumber
- Response(testName, questionNumber, responseNumber, content):
Each row in this table is a single possible response to a given
question.
Primary key:testName, questionNumber, responseNumber
- ParticipantTest(userId, testName, startTime, score): userId takes testName
at startTime. When finished, they recieve a score (percent) which is also
recorded here.
Primary key:userId, testName
- ParticipantsAnswers(userId, testName, questionNumber, response): Each
row identifies a single userIds choice of response for a given question on a
given test.
Primary key:userId, testName, questionNumber
Middle-Tier Object Model (suggestive only)
What follows is a suggested list of Java classes.
Your solution can use a different set of classes.
The classes below will need persistence methods
(or extend a persistent class) so that their state
can be saved to or read from the database.
- Test: Consists of a name, id, duration and a set of questions A test
should know how to mark a set of answers (below) and return relevent
statistics. This class could also have a static method that collects all
statistics for a given test using a given database connection.
- Question: consists of the question text as well as the set of choices
(each a String) as well as the correct answer.
- Responses: The participants answers to a given test.
- User: consists of a userId, password and role (either admin or
participant). This will probably be stored in the session and checked at every
servlet request to see if the request is from a logged in user with the
appropriate role for the servlet request.
The tools you will use
- The Pointbase embedded relational database will be used for the backend
- The Jakarta-Tomcat Servlet container will be used for servlets as well as web pages.
- Netscape 4.76 running on the CDF SUNs will be used as the front end.