$24
Objectives
• Practice procedural refactoring.
• Practice implementing good/quality code.
• Practice SOLID principles.
Preparation:
Problem Statement
You have three main tasks in this assignment:
• Refactor the code using what you learnt from lectures 6 and 7.
• Increase code quality using the Java guidelines provided.
• Refactor the code by applying SOLID principles.
• Use exceptions wherever is necessary.
Task
1. Identify three (3) procedural refactoring opportunities that can be done in the code using the guidelines. Provide:
a) A brief description of each issue that require refactoring
b) Fix the issue.
c) Test your fix (when applied).
2. Identify three (3) refactoring that can be done in the code by applying SOLID Principles. Give:
a) a brief description of each issue.
b) where the issue is.
c) what SOLID principle is violated.
d) how to fix the issue.
e) Apply your fix.
f) Test your fix.
3. Identify three (3) methods requiring exceptions. Give:
a) method where exception should be used.
b) what the exception should be used.
c) Add the exception to the code.
5. Remember to check that all your files have been submitted using the web interface to git.