So I wrote this for my second project for Data Structures. The method chaining got out of control and I violated so many rules of encapsulation.
I have 2 years with general programming experience so how could I gone wrong? Well, I was so focused on getting the features of the program to work. Once I understood how the features was suppose to work, i just hop on my seat and started typing.
Behold my code:
// reduce exponent by one for all exponents greater than 1
Main.getPolynomialHolder().get(polynomialIndex).getPolynomialVector().get(i).setExponent(Main.getPolynomialHolder().get(polynomialIndex).getPolynomialVector().get(i).getExponent()-1);
Yeah...not pretty one bit. I am gonna get a failing grade for this...*virtual smack on forehead*
Let this be a lesson to all newcomers on what not to do. This issue is actually scattered in multiple lines of code. Aw man I am doomed.