From 71f086bfeeced327cd9e5913f1ba12627918a132 Mon Sep 17 00:00:00 2001 From: Martin Goik <goik@hdm-stuttgart.de> Date: Sat, 6 Jun 2015 07:33:12 +0200 Subject: [PATCH] Reduce --> Cancel --- Doc/Sd1/objectsClasses.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Doc/Sd1/objectsClasses.xml b/Doc/Sd1/objectsClasses.xml index 4338d9b8b..581f57928 100644 --- a/Doc/Sd1/objectsClasses.xml +++ b/Doc/Sd1/objectsClasses.xml @@ -2066,7 +2066,7 @@ long sum = (long)a + b;</programlisting> <qandaentry> <question> <para>We recall <xref linkend="sde1QandaFraction"/>. So far no - one demands reducing fractions. Yet calling <code>new + one demands cancelling fractions. Yet calling <code>new Fraction(4,8)</code> will create an instance internally being represented by <inlineequation> <m:math display="inline"> @@ -2086,7 +2086,7 @@ long sum = (long)a + b;</programlisting> </m:math> </inlineequation>.</para> - <para>Reducing fractions requires implementing e.g. the <link + <para>Cancelling fractions requires implementing e.g. the <link xlink:href="http://www.math.rutgers.edu/~greenfie/gs2004/euclid.html">Euclidean algorithm</link> in order to find the greatest common divisor (<acronym>GCD</acronym>) of two non-zero integer values.</para> @@ -2227,7 +2227,7 @@ long sum = (long)a + b;</programlisting> </section> <section xml:id="ed1FractionCancel"> - <title>Reducing fractions</title> + <title>Cancelling fractions</title> <para>The following exercise requires the import of the previous Maven based exercise <xref linkend="sd1QandaGcd"/>. The import may be effected @@ -2286,26 +2286,26 @@ long sum = (long)a + b;</programlisting> </figure> <qandaset defaultlabel="qanda" xml:id="sd1QandaFractionCancel"> - <title>Implementing reducing of fractions</title> + <title>Cancelling fractions</title> <qandadiv> <qandaentry> <question> <para>We have implemented <acronym>GCD</acronym> computation in <xref linkend="sd1QandaGcd"/>. The current exercises idea is to - implement reducing of fractions by using the method + implement cancelling of fractions by using the method <methodname>long getGcd(long a, long b)</methodname>. Change the following implementation items:</para> <itemizedlist> <listitem> - <para>The constructor should reduce a fraction if required, + <para>The constructor should cancel a fraction if required, see introductory remark.</para> </listitem> <listitem> <para>The Methods <methodname>mult(...)</methodname> and - <methodname>add(...)</methodname> should reduce any + <methodname>add(...)</methodname> should cancel any resulting Fraction instance. It might be worth to consider a defensive strategy to avoid unnecessary overflow errors.</para> @@ -2385,7 +2385,7 @@ long sum = (long)a + b;</programlisting> </m:mfrac> </m:mrow> </m:math> - </inlineequation> to enable reducing <emphasis + </inlineequation> to enable cancelling <emphasis role="bold">prior</emphasis> to multiplying. Now the call <code>new Fraction(4,2)</code> will construct the representation <inlineequation> -- GitLab