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 | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Character table. | 48 / 34 | 1 class / 2 methods | compare table of characters by eye | |||||||||||||||||||||||||
| Homework 2. | TBC Factors | |||||||||||||||||||||||||||
| Homework 3. | TBC Arithmetic mean | |||||||||||||||||||||||||||
| Homework 4. | TBC Quadratic equation roots | |||||||||||||||||||||||||||
| 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/student/comp2100/homeworks/hw05 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.
| |||||||||||||||||||||||||
| Suggested tasks for homeworks 8, 9, 10 may change - watch for changes here. | ||||||||||||||||||||||||||||
| Writing numbers out in words, part III (writing cheques). | ||||||||||||||||||||||||||||
| Expressing each number in a list as a percentage of the total. | ||||||||||||||||||||||||||||
| Making change. (How many of each type of coin do you need to make a particular amount?) | ||||||||||||||||||||||||||||
| Sorting integers using a binary search tree. | tba | tba | tba | |||||||||||||||||||||||||
| Finding the five commonest words in a text file. | 373 / 296 (I wrote my own version of Binary Tree) | 3 classes / 12 methods | You can test against an alternative implementation - a shell script commonestFive.sh and
compare the outputs on any text inputs (Note:
this script does not sort equally frequent words into
alphabetical order, as required in the homework
specification). Equivalence cases? boundary cases? hmmm... | |||||||||||||||||||||||||
LineCount (homework-05) because it excludes all comments.
Copyright © 2006, 2008 Ian Barnes, Chris Johnson, The Australian National
University
$Revision: 1.12 $
$Date: 2008/02/27 02:58:20 $
Feedback & Queries to
comp2100@cs.anu.edu.au