README updated

This commit is contained in:
2026-06-23 16:14:51 +08:00
parent 1ba0f4ba28
commit 33f1d45267
+4 -7
View File
@@ -60,7 +60,7 @@ git checkout -b feature/change-multiply
3. From feature/refactor-multiply branch, rename "multiply" method to "product" everywhere. 3. From feature/refactor-multiply branch, rename "multiply" method to "product" everywhere.
``` ```
git checkout feature/refactor-multiply git checkout feature/refactor-multiply
# TODO: rename method "multiply" to "product" in Calculator, BasicCalculator, MathHelper and ReportGenerator # TODO: rename method "multiply" to "product" every where(BasicCalculator,ReportGenerator, test class, ...)
git add . git add .
git commit -m "refactor: renamed multiply to product" git commit -m "refactor: renamed multiply to product"
git checkout develop git checkout develop
@@ -70,7 +70,7 @@ git merge feature/refactor-multiply
4. From feature/change-multiply branch, change the body of multiply method 4. From feature/change-multiply branch, change the body of multiply method
``` ```
git checkout feature/change-multiply git checkout feature/change-multiply
# TODO: change the body of MathHelper.multiply (e.g., loop-based multiplication) # TODO: change the body of Calculator.multiply (e.g., loop-based multiplication)
git add . git add .
git commit -m "multiply method body changed" git commit -m "multiply method body changed"
git checkout develop git checkout develop
@@ -117,7 +117,7 @@ git merge feature/remove-calculator
3. From feature/add-method-to-interface add method to deleted interface 3. From feature/add-method-to-interface add method to deleted interface
``` ```
git checkout feature/add-method-to-interface git checkout feature/add-method-to-interface
# TODO: add "double calculateArea(double,double)" to Calculator, implement in BasicCalculator # TODO: add "double calculateArea(double a,double b)" to Calculator, implement in BasicCalculator
git add . git add .
git commit -m "add calculateArea() method" git commit -m "add calculateArea() method"
git checkout develop git checkout develop
@@ -125,11 +125,8 @@ git merge feature/add-method-to-interface # CONFLICT
``` ```
4. Resolve 4. Resolve
- Keep the `Calculator` interface. - Keep the `Calculator` interface with new added `calculateArea()` method.
- Restore the deleted file.
- Add the new `calculateArea()` method to the interface.
``` ```
git add .
git commit -m "resolved: Restored deleted interface and added calculateArea " git commit -m "resolved: Restored deleted interface and added calculateArea "
``` ```