Please deploy your application on CS3, and upload all source files to CSNS. The source files should include all the source code, documentation (optional), and an HTML file final.html which contains a hyperlink to your application on the CS3 server. Note that file uploading will be disabled automatically after the due time, and late submission will not be accepted.
In this exam you are going to develop a simplified StackOverflow.
Your application must use a database to store the data, and you must submit an SQL script file final.sql which contains the statements to create and populate all the tables for the application. Your implementation must follow the MVC architecture and use JDBC for database access.
The main page of the application displays the questions and the number of answers for each question. For example:
# of Answers | Question |
---|---|
0 | Which version of Tomcat should I choose? |
3 | How do I find the parent element using jQuery? |
A user may click on Ask a Question to ask a new question. For example:
Question | |
---|---|
Details | |
After a question is added, the user should be redirected back to the main page.
A user may click on a question to see the details and the answers (if any) of a question as shown below:
Question: How do I find the parent element using jQuery?
Details: I want to locate the parent <tr> inside the click handler of a <td>. How do I do it in jQuery?
Answer #1: Use $(this).find("tr")
Answer #2: The first answer is incorrect. It should be $(this).closest("tr")
Answer #3: You can also do $(this).parent()
Clicking on Back to Questions should take the user back to the main page. A user can also click on Answer to answer the questions:
Question | How do I find the parent element using jQuery? |
---|---|
Answer | |
After an answer is added, the user should be redirected back to the page displaying the question and its answers.
Grading
- Display questions (20pt)
- Ask question (20pt)
- Display question (30pt)
- Answer question (30pt)
- final.html is missing or does not have the correct link to your application on the CS3 server (-10pt)
- Only features working correctly on the CS3 server will receive full credit. Partial credit will be given at my discretion.
- Please do not modify your files on the CS3 server after the due time. Doing so will be considered cheating.