#If replacing the method even possible here?
1 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @topaz dagger! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
I think this might be what you're looking for
https://www.w3schools.com/java/java_methods_overloading.asp
I'm not too sure what it meant by combining but my first thought is overloading the method
essentially based on different input, it does different stuff. For example, if you only input x, then it will evaluate 3x^2 + 2x - 4 and if ypu input a b c it evaluates the quadratic
though aren't they pretty much almost similar?
that's the point, you have duplicate code between those 2
solveX is just solveFunction with a predetermined a, b, c
so you can use solveFunction for solveX
solveX just acts as a wrapper to define the a, b, c
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use/help ping.
Warning: abusing this will result in moderative actions taken against you.