Homework 4
CS320, Spring 2011


Due: Thursday, May 26

Please upload your files to CSNS. The files should include all the source code, documentation (optional), and an HTML file hw4.html which contains a link to your application deployed on the CS3 server. Note that file uploading will be disabled automatically after 11:59PM of the due date, so please turn in your work on time.

[Readings]

[CS320Answers]

For this assignment, modify the CS320Answers application you developed in Homework 3 so that it stores data in a database instead of in the application scope. Again, the application must use MVC architecture, and all features described in previous assignments must work; otherwise there will be a credit penalty of up to 50pt.

1. (10pt) Design a database schema to store information about users, questions, answers, and votes. You may use the database design in Lab 3 as your starting point. Feel free to change it to better suit your code. For this part of the assignment, you need to turn in an SQL script file hw4.sql which contains the statements to create all the tables in the database.

2. (60pt) Once the database is set up, modify your application so that it uses the database to store all the information.

3. (20pt) Implement user registration so new accounts can be created. For 20pt extra credit, use CAPTCHA in user registration.