Description
Objectives
- Practice procedural refactoring.
- Practice implementing good/quality code.
- Practice SOLID principles.
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
- Identify three (3) procedural refactoring opportunities that can be done in the code using the guidelines. Provide:
- A brief description of each issue that require refactoring
- Fix the issue.
- Test your fix (when applied).
- [ Identify three (3) refactoring that can be done in the code by applying SOLID Principles. Give:
- a brief description of each issue.
- where the issue is.
- what SOLID principle is violated.
- how to fix the issue.
- Apply your fix.
- Test your fix.
- Identify three (3) methods requiring exceptions. Give:
- method where exception should be used.
- what the exception should be used.
- Add the exception to the code.