Note that there are some explanatory texts on larger screens.

plurals
  1. POAlgorithm for issuance of delivery
    text
    copied!<p>I need to get inherited class of DispenseAlgorithm. It must realize algorithm for calculate issuance of delivery. The algorithm must provide even nominals consumption .</p> <pre><code>public abstract class DispenseAlgorithm { public abstract Dictionary&lt;int, int&gt; CalculateDispense(CassetteData[] data, int summ); } public class CassetteData { public int UID { get; set; } public int Nominal { get; set; } public int Count { get; set; } public CassetteData() { } } </code></pre> <p>The class CassetteData – provides info about set of denomination at current time (Nominal - value of nominal denomination, Count – quantity of denomination, UID - unique identifier of denomination set).</p> <p>The method CalculateDispense has 2 parametes: - available at current time denomination set (CassetteData{] data) - sum we pay out (or give out) as cashback.</p> <p>The method CalculateDispense must return object Dictionary, where key - unique identifier of denomination set , and value – quantity of denomination required to payment.</p> <p>Wishful result: denomination must comes to end as evenly as possible at some sessions issuance of delivery</p> <p>For example: We have denomination sets:</p> <pre><code>1 10 $ 100 denomination 2 50 $ 100 denomination 3 100 $ 100 denomination </code></pre> <p>We need to pay out 800$</p> <p>Good result:</p> <pre><code>1 5 items 2 5 items 3 5 items </code></pre> <p>Because 800 = 10 * 5 + 50 * 5 + 100 * 5</p> <p>Bad result:</p> <pre><code>1 0 items 2 0 items 3 8 items </code></pre> <p>Because 800 = 10 * 0 + 50 * 0 + 100 * 8</p> <p><strong>Denomination</strong> are means money, note, cut, bank note,bond</p> <p><strong>issuance of delivery</strong> are means issuance of cashback</p> <p><strong>Nominal</strong> - par, face value, par value, nominal value, rating</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload