Homework 1
CS520, Spring 2007


Due: Wednesday, April 11


[Reading]
[Account] Send an email to csun@calstatela.edu and ask for account information on the CS3 server. You have to be already enrolled in the class in order to get an account. Note that the account includes a Subversion repository, and a copy of the CSNS source code is already imported into the repository for you.

[Development Environment] Check out the CSNS source code from your Subversion repository, and setup your development environment. Refer to the class notes, but you don't have to follow them exactly, e.g. if you prefer NetBeans over Eclipse. If you have any questions, post them in the class forum. To avoid confusion, in the assignment descriptions I'll use CSNS (i.e. without hyperlink) to refer to the project, and CSNS (i.e. with hyperlink) to refer to the server where you submit your work.

[Subversion] (5pt)  Before you commit any changes to your Subversion repository, create a tag called version-1.0.

[CSNS] (15pt) The current version of CSNS has a bug. Namely, after an instructor deletes a section (a section is a course in a particular quarter, e.g. CS520 is a course, and CS520 in Spring 2007 is a section), the section still shows up in the student's interface if the student was enrolled in the class. If the student clicks on any assignment in this section, a runtime error will occur. To fix this bug, modify the code so that before a section is deleted, it first checks whether there are already students enrolled in the section. If so, an error message will be displayed; otherwise the section can be safely deleted.

Once you fix the bug, commit your changes to your Subversion repository, and then create a tag called cs520-hw1.

HINTS:
[Ant] (10pt) Modify build.xml of CSNS to create a new target called zip. This target should create a zip file csns.zip, which contains all the project source files in CSNS except the class files under the dist folder, the libraries files under the lib folder, and the file build.properties and the files under the following folders: classes, build, dist, and lib. "Project source files" means source code, configurations files, build file, web pages and images etc. of the project; it does not include any class files, jar files, files created during the build process (e.g. files under /build or /dist), files used for version control (e.g. files under /.svn), or whatever addtional files you put under the project directory (e.g. log files). The size of the zip file should be around 200KB, and if yours is larger than that, you are doing something wrong. For this problem, submit the csns.zip file created by this target to CSNS.

[Extra Credit] (15pt) Create and use your own Subversion repository. Create an account for me on your repository so I can access it remotely and check your work.