Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Coursework 2
These tasks are concerned with computing software metrics. There are a total of 40 marks available. This
coursework is worth 15% of your overall grade.
Preparation
Task 1 of assignment uses the Car Rental example from the lectures and exercises. You will need to analyze
the initial, unrefactored version of the code, as provided for Exercise 2. You will then do the same analysis
for the code after you have applied all of the refactorings from Exercise 4.
Hence it is important that you complete Exercise 4 before attempting this assignment!
Tasks
Task 1 (24 marks)
1. Compute the following metrics for the original, unrefactored version of the Car Rental code (i.e., the
code provided as part of Exercise 2):
Number of classes in the package
Total SLOC (Source Lines of Code) in the package
Average number of methods per class (computed across all classes in package)
Average & maximum method complexity for Car, Rental and Customer separately
Instability for Car, Rental and Customer separately
Abstractness of the package
A total of 10 marks are available for these calculations.
2. Compute the same metrics for the Car Rental code after the refactoring of Exercise 4 has been
completed. Again, these calculations are worth 10 marks.
3. Compare the values of the metrics before and after refactoring. Relate this to what has been achieved
by the refactoring. Do the metrics tell us anything useful about how the software has changed? Are
they misleading in any way? [4 marks]