/
anton.buldygin
/
Contacts_Java
Обзор
Документация
Войти
/
anton.buldygin
/
Contacts_Java
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Topics/Command/Stock broker/task.html
11 строк
1 KB
AntonBuldygin
Initial commit
19 дек 2023, 15:38
19 дек 2023, 15:38
bed9366
Код
Авторство
О чём код?
<h2>Stock broker</h2> <div class="step-text"> <p></p> <p>Suppose you are creating a <strong>stockbroker </strong>application. It performs two commands which are <code class="java">buy</code> and <code class="java">sell</code>. Use the command pattern to implement this application. Use the following guidelines: </p> <ul> <li>Don't change the provided code.</li> <li>The <code class="java">sell</code> command must print <code class="java">Stock was sold</code>.</li> <li>The <code class="java">buy</code> command must print <code class="java">Stock was bought</code>.</li> <li>First, it must perform a <code class="java">buy</code> command, then the <code class="java">sell</code> command. </li> </ul><br><b>Sample Input:</b><br><pre><code class="language-no-highlight"></code></pre><br><b>Sample Output:</b><br><pre><code class="language-no-highlight">Stock was bought<br>Stock was sold</code></pre><br><br><br><font color="gray">Memory limit: 256 MB</font><br><font color="gray">Time limit: 5 seconds</font><br><br> </div>