After Refactoring (method pull up)

Committed By Prakash

Name- Qasim Naushad , Student ID-5658624
Name- Prakash Gunasekaran, Student ID-6399185
Name- Prabhjot Kaur Sekhon, Student ID-6473318
Name- Rajwinder Kaur, Student ID-6282490
Name- Harsahiljit Singh, Student ID-6405975
Name- Yash Paliwal, Student ID-6562566

Refactoring Techniques Used - Method Pull Up
Founded Code Smells- Duplicate Code & Feature Envy

Steps for Refactoring
Step1:
In this patch set we will pull up a method named addArmyDetails from
class country and state and move it to class army, according to the
reverse engineering tool (jeodrant) we found out that both classes have
the same method doing the same job ,the code smells we will be
eliminating are feature envy and duplicate code.
Step2:
We remove the method addArmyDetails from the country class to army
class, and ran our test cases, the project was compiling properly and
all the test cases passed.
Step3:
We remove the method addArmyDetails from the state class to army class,
and ran the tests again and they all worked, the behaviour did not
change
Step4:
As the final step we moved (method pull up) the method addArmyDetails
from state and country class both and placed it in army class shown
here, and ran the test cases again, they all passed showing successful
method refactoring