Homework 3
CS520, Fall 2011


Due: Thursday, October 27

Package all the source files of your project into a zip file as you did in Homework 1 and upload the zip file to CSNS. In addition to the zip file, also upload a text file hw3.txt which lists all the Java class you have created or modified. Note that file uploading will be disabled automatically after 11:59PM of the due date, so please turn in your work on time.


[Readings]

[Rubrics for CSNS2]

This quarter you are going to add rubrics support to CSNS2, which will allow instructors to create and manage rubrics, and grade student assignments using rubrics. You may want to check out the department program assessment page to see what rubrics look like.

[Model and ORM] (40pt)

Create new model classes and/or modify existing ones and map them to a relational schema using JPA annotations based on the following requirements:

Run Maven build mvn process-classes (or the equivalent in Eclipse) to generate a new src/main/scripts/csns.ddl file and check if the database schema is what you expect.

[Database Scripts] (20pt)

Based on the csns.ddl file generated in the previous exercise, modify the following database scripts to to add the rubrics support:

Read the database script src/main/scripts/csns-test-insert.sql, understand what it does, complete a quiz about the script on CSNS, and then modify the script as follows:

[Data Access] (20pt)

Add RubricDao and RubricScoreDao to the csns.model.assessment.dao package and RubricDaoImpl and RubricScoreDaoImpl to the csns.model.assessment.dao.jpa package. Use existing DaoImpl classes as examples to complete the methods in RubricDaoImpl and RubricScoreDaoImpl.

[Testing]

Create a new package csns.model.assessment.dao under src/test/java and place RubricScoreDaoTest in this package. Run the test code by using mvn test, or in Eclipse, right click on testng.xml under src/test/resources and select Run As -> TestNG Suite. In either case you should not see any errors.

[Subversion]

Commit all the changes to your Subversion repository, and create a tag called cs520-hw3.