1 / 5
'I'm applying _____ method to reduce the size of this function.' What refactoring moves code into a new named function?
-
-
-
-
'Extract method' (Fowler) takes a code fragment and moves it into a new method with a descriptive name, improving readability and enabling reuse.
2 / 5
'We used _____ class to separate these two responsibilities.' What refactoring creates a new class from part of an existing one?
-
-
-
-
'Extract class' takes a subset of an existing class's responsibilities and moves them into a new class, applying the Single Responsibility Principle.
3 / 5
'_____ up to parent class' moves a method from a subclass to the parent. What is this refactoring called?
-
-
-
-
'Pull up method' (Fowler) moves a method from one or more subclasses to the parent class, eliminating duplication across subclasses.
4 / 5
'_____ method to another class' — this refactoring is used when a method uses more data from another class than its own.
-
-
-
-
'Move method' relocates a method to the class it is most coupled to, improving cohesion and reducing inappropriate intimacy between classes.
5 / 5
'I _____ the temporary variable — it was only used once and the expression is clear enough.' What refactoring removes the variable?
-
-
-
-
'Inline temporary variable' (Fowler) replaces a variable that holds a simple expression with the expression itself, removing unnecessary indirection.