Here is the line you need to get the @require and @ensure tags in JavaDoc.
-author -version -tag require:cm:"Require:" -tag ensure:cm:"Ensure:"
Monday, February 28, 2011
Wednesday, February 9, 2011
Assignment 5
If you successfully completed the last two assignments, you should utilize the PiggyBank and Item classes you created. However, if you were not able to complete the assignments, you may utilize the PiggyBank.class and Item.class files that have been placed along with Mommy.class in the class store for assignment 5.
Tuesday, February 8, 2011
Help on setting up the ID on Assignment #4
The ID should be created by concatenating the first and last characters of the description with the first and last characters of the store of the item. If you are using description as the instance variable for the item's description and id as the instance variable for the item's ID then the following line of code will set id to the first character of the description:
id = "" + description.charAt(0);
The "" + at the beginning of the expression is simply concatenating the empty string to the first character of the description. This is necessary because otherwise the characters will be converted to ints and added together rather than the characters being concatenated together to form a String.
Start with the statement above and then add the last character of the description followed by the first and last characters of the store of the item.
id = "" + description.charAt(0);
The "" + at the beginning of the expression is simply concatenating the empty string to the first character of the description. This is necessary because otherwise the characters will be converted to ints and added together rather than the characters being concatenated together to form a String.
Start with the statement above and then add the last character of the description followed by the first and last characters of the store of the item.
Subscribe to:
Comments (Atom)