You are on page 1of 4

_______________________________________________________

SWE3053- Software Evolution and Maintenance- Tutorial10

Consider the following program and propose suitable refactorings to enhance it.

1
Sample Answer: A class for Course is extracted to allow adding more details to courses and
to separate the attributes and methods that are related to courses from those that are related to
students. Also, with this refactoring, an array list is replaced with object.
The public variables studentName and average are encapsulated.
A method is extracted to calculate the student average.

2
3
4

You might also like