this is the 2010 version, likely to be updated for 2011
Weekly homework is an important part of learning and self-development in the COMP2100/2500 Software Construction courses. The homework exercises are not given any assessment marks. However before you decide that you will save time by not doing the homework, consider this:
| We guarantee that one of the homework exercises (in a slightly modified form) will be repeated on the final examination test. If you will have not done it, you find yourself at a serious disadvantage, in a time-pressure situation. |
Clearly you are free to collaborate on the homework exercises as much as you like. My recommendation, however, would be to make a serious effort to do the homework by yourself. A good idea would be to set aside a particular time each week for homework. Then when you have completed it, you could get extra value from it by comparing your solution with other students and discussing the differences. There is almost no benefit from looking for other people's solutions (or my sample solutions, if available) before trying it seriously yourself: you just cannot improve your programming skills that way.
To provide you with an opportunity and an incentive to do regular programming, thus improving your skills.
To provide an opportunity for you to learn and practice the PSP.
The initial aim some years ago was just #2 above: practise PSP. The idea was that there is little point in doing the PSP on challenging programming tasks that cover completely new ground for you. While you are learning new skills there is no point in recording your time and trying to learn something from the statistics. You have a much better chance of learning something from the PSP while carrying out routine programming tasks — ones that aren't a major challenge involving new concepts and techniques. The idea is that the homework programs should be relatively straightforward. Your challenge is to write them well, in a reasonable time, with as few defects as possible and to learn to predict your own process.
But it is also true that in 2002—2007 many students found that doing the homework tasks helped them to improve their programming skills quite dramatically. What we had expected to be easy tasks turned out to be rather difficult at first for many students, but by mid-way through the semester their skills had improved to the point where they were much more confident and capable programmers. If you are weak in Java programming at the start of the semester, look at these weekly programming exercises as an opportunity to turn that weakness into a strength.
Here are the homework exercises, some estimate of size of the solution, and recommended test methods (in some cases).
| link to specification | brief description | estimated size: total lines/ NCNB[1] lines | classes/ methods | test method | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| gentle revision: an ordered array | 66 / 50 | 1 class / 2 methods |
set up calls in a main method to test
|
|||||||||||||||||||||||||
| Homework 2. | Prime Factors | 55/48 | 1 class, 2 methods | see test values and expected outputs in specification | ||||||||||||||||||||||||
| Counting logical lines of code. | 104/ 65 | 1 class / 4 methods | Test cases:
use any (small) Java source files, count by hand. Or use the example files in directory http://cs.anu.edu.au/student/comp2100/homeworks/hw03 with counts as shown here
|
|||||||||||||||||||||||||
| Writing numbers out in words, part I (small numbers). | 101 / 70 | 1 class / 2 methods |
| |||||||||||||||||||||||||
| Writing numbers out in words, part II (big numbers). | 142 / 111 | 1 class / 3 methods | lower
boundary is as above. Upper boundary is determined by
representation of Integer on your system. Equivalence class tests: a set of 7 numbers with length 1, 2 (simple), 2 (composite), 3, 4, 7 and 10 digits.
|
|||||||||||||||||||||||||
| Homework 6. | Sorting integers using a binary search tree. | 98 lines | 4/7 classes/methods | tests | ||||||||||||||||||||||||
| Making change. (How many of each type of coin do you need to make a particular amount?) | lines | classes/methods | tests | |||||||||||||||||||||||||
| Commonest words (part 1): Finding the five commonest words in a text file. | 373 / 317 for the complete solution: (I wrote my own version of Binary Tree) | 11 classes / 53 methods (complete solution, with debugging | Equivalence cases? boundary cases? hmmm... one for the
student to really think about. You can test the function of your program against an alternative implementation - a shell script commonestFive.sh and compare for any text input (Note: this script does not sort equally frequent words into alphabetical order, as the homework specification requires). |
|||||||||||||||||||||||||
| archive files creation and extraction | 184 | 3/10 | tests | |||||||||||||||||||||||||
| Commonest words part 2. | 371 lines | 11/53 classes/methods | tests | |||||||||||||||||||||||||
| Graphic User Interface GUI | lines | classes/methods | tests | |||||||||||||||||||||||||
| Shell programming | lines | not applicable classes/methods | tests |
LineCount (homework-05) because it excludes all comments.
Copyright © 2006, 2008, 2009, 2010 Ian Barnes, Chris Johnson, The Australian National
University
$Revision: 2.18 $
$Date: 2011/02/01 07:09:56 $
Feedback & Queries to
comp2100@cs.anu.edu.au