W12:Labs:lab06
From 56wiki
CS56—Advanced Applications Programming—W12
W12:Exams | W12:Homework | W12:Labs | W12:Calendar and Lecture Notes | W12:Syllabus | W12:Choice |
---|
lab00 | lab01 | lab02 | lab03 | lab04 | lab05 | lab06 | lab07 | lab08 |
Contents[hide] |
[edit] lab06: Working on your choice points
Tip
If you find typos, note them on the discussion page. This lab is "locked down" for edits only by the instructor and the TA until after the due date has passed.
This is a continuation of lab05 part 3, where you are working on your first choice points assignment.
The instructions below contain more detail about how to prepare your choice points assignment and submit it.
In the end, you'll submit your code to turnin using:
turnin lab05c@cs56 directory
[edit] Choice Points Guidelines
[edit] Steps to complete a choice points assignment
Completing a choice points assignment involves:
- Creating a ticket in Mantis (or being assigned a ticket created by someone else)
- Setting up the environment for your code (i.e. build.xml file, src directory, etc.)
- Here, you may find the code here a useful model: http://www.cs.ucsb.edu/~pconrad/cs56/W11/issues/0000050/
- Note: you should also add a "numbered source" target (like the one we added in lab05a) to this example build.xml
- Writing the code necessary to resolve that ticket
- Publishing the code at the URL referenced in the ticket
- Submitting that code via
turnin lab05c@cs56 directory
- Marking the ticket as resolved
After you do that, the TA or instructor will grade the choice points assignment, and award points. This will also be the basis of the 2nd round of code reviews, which run from Sunday 03/04 to Friday 03/09.
As a result, you MUST have your choice points assignment (as best as you can), completed and resolved by Friday 03/02 5PM, so that whoever is reviewing your code has a chance to look at it between Friday 03/02 5PM and the time the code review is scheduled!
[edit] Guidelines for resolving a ticket
For each ticket on Mantis, there is a URL that goes along with each ticket. For example:
http://www.cs.ucsb.edu/~your_username/cs56/W12/issues/0001234
If you see that the URL contains W11 or S11 instead of W12, go into mantis and edit the ticket, and change the quarter to W12.
Before you mark the ticket resolved, there should be a web page at that URL that contains the code you used to resolve the ticket.
To create this web page, you put files into the directory:
~/public_html/cs56/W12/issues/0001234
In most cases, if what you are producing is Java code, that web page will be created automatically by the Ant build.xml file. An example of such a file can be found at the resolution of Ticket 14 from W11:
http://www.cs.ucsb.edu/~pconrad/cs56/W12/issues/0000014
[edit] Checklist for resolving a mantis ticket
- Be sure everything in your build.xml file is appropriate to the ticket you are working on. There shouldn't be any 'copy/pasted' stuff that is left over from whatever project you copied the build.xml file from.
- That goes for the rest of your code too, for that matter.
- Be sure that your ant build.xml file contains
description
attributes for each target in the build.xml file so that when you typeant -p
you can see all the targets available to you.
Be sure that your ant build.xml file contains these targets, and that they work
- clean (to clean up everything except source files)
- compile (to compile the code)
- javadoc (to create the javadoc)
- dist (to create the distributable versions of your code)
- publish (to publish the javadoc and distributable versions)
Depending on the project, you may have targets such as these. If they are appropriate to your project, they should be there.
- run (to run your code, if there is an executable main)
- In cases where you are just building a Plain Old Java Object along with JUnit tests, there might not be a run target.
- In cases where the main is an interactive command line program, it may not be feasible to run it directly from the ant build.xml. In that case, ant run can produce echo commands that give you what to type at the Unix command line to run the program.
- In cases where the is more than one main, you might have
ant run1
,ant run2
,ant run3
, etc with appropriatedescription
attributes, or you might give the targets meaningful names such asant runTicTacToeGui
,ant runCheckersGUI
,ant runChessGUI
, etc.
- test (to run JUnit tests)
- With very few exceptions, there should be at least some JUnit tests.
- For full credit, everything that is reasonable to test should be tested.
- We'll go over techniques for writing JUnit tests for GUI programs.
- If you think your ticket doesn't require JUnit tests, it would be helpful to check with a TA, Grader or Instructor first to ensure that you are correct about that (unless of course it is spelled out in the Mantis Ticket that no JUnit tests are required)
- jws (to setup the files needed for Java Web Start)
- This is appropriate only for main programs that use a Swing GUI--it does not apply to command line only programs, or to tickets that are only doing JUnit testing of Plain Old Java Objects
- However, if there is a Swing GUI (or GUIs), there should be a jws target, and jws links on the web page that you publish.
These guidelines may be revised over the course of the quarter to reflect improvements to our practice, so consult them frequently as your start tickets, work on tickets, and especially as you get close to resolving tickets.