Write a java method that adds two fractions


Assignment  1

Write a Java method that adds two fractions together and returns the result in reduced form. A fraction should be represented as a 2 bucket integer array.

Assignment  .2

Write a 3-5 page paper discussing algorithm design as it relates to time complexity problems like reducing fractions without using the euclidean algorithm for GCD vs using the euclidean algorithm for GCD.

When initially solving a problem, how might one detect that a solution needs extra attention with respect to an efficient algorithm vs standard solutions where a highly efficient solution may be indistinguishable from an inefficient one? Specifically discuss the potential tradeoff between an easy to understand inefficient solution vs a difficult to follow efficient solution.

Is it always better to write optimal code if the end result is difficult to follow by future programmers who may maintain your code?

 

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Write a java method that adds two fractions
Reference No:- TGS01177752

Now Priced at $30 (50% Discount)

Recommended (90%)

Rated (4.3/5)