emory-courses / dsa-java

Data Structures and Algorithms in Java
https://emory.gitbook.io/dsa-java/
42 stars 55 forks source link

[QZ1] Helper Methods #33

Closed MimiOlayeye closed 4 years ago

MimiOlayeye commented 4 years ago

Can we create additional helper methods within the LongIntegerQuiz class to use in the addDifferentSign method?

marvinquiet commented 4 years ago

Thank you for your question. However, I did not quite understand why would you need to add another helper for this? What is this helper function for?

MimiOlayeye commented 4 years ago

I wanted to make a helper method that compares the magnitude of the two numbers. I realized that my code works best when subtracting the number with the smaller magnitude from the number with the larger magnitude.

MimiOlayeye commented 4 years ago

Actually realized I could just use the compareAbs method from the parent class.

marvinquiet commented 4 years ago

I am glad you figured out!