{"id":658,"date":"2019-10-13T19:27:08","date_gmt":"2019-10-13T19:27:08","guid":{"rendered":"https:\/\/ipcalc.co\/blog\/?p=658"},"modified":"2019-10-13T22:43:59","modified_gmt":"2019-10-13T19:43:59","slug":"oop-kalkulyator-na-java","status":"publish","type":"post","link":"https:\/\/ipcalc.co\/blog\/oop-kalkulyator-na-java\/","title":{"rendered":"\u041e\u041e\u041f-\u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 \u043d\u0430 Java"},"content":{"rendered":"\n<p>\u041f\u0440\u043e\u0445\u043e\u0434\u0438\u043b \u044f \u0442\u0443\u0442 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u0441\u043a\u0430\u0437\u0430\u043b\u0438 &#8211; \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435 \u043c\u043e\u0451. \u0413\u0434\u0435-\u0442\u043e \u044f \u0435\u0433\u043e \u0432\u0437\u044f\u043b \u0438\u043b\u0438 \u043a\u0443\u043f\u0438\u043b. \u0421\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u0435\u0441\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e. \u041d\u043e \u0440\u0430\u0437 \u043a\u0443\u043f\u0438\u043b, \u0442\u043e \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u043d\u044c \u043d\u0435 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u043b\u0438, \u0440\u0435\u0448\u0438\u043b \u0432\u044b\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u044e\u0434\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 xD<\/p>\n<h2>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u041e\u041e\u041f-\u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438:<\/p>\n<ol>\n<li>\u041a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u043e\u0441\u0442\u043e\u0439. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0447\u0435\u0442\u044b\u0440\u0435 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438: \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435, \u0434\u0435\u043b\u0435\u043d\u0438\u0435.<\/li>\n<li>\u041a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0447\u0435\u0442\u044b\u0440\u0435 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0438 \u0438\u043c\u0435\u0435\u0442 \u043e\u0434\u043d\u0443 \u044f\u0447\u0435\u0439\u043a\u0443 \u043f\u0430\u043c\u044f\u0442\u0438. \u0421 \u0434\u0430\u043d\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u044f\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439: \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u044f\u0447\u0435\u0439\u043a\u0443 \u043f\u0430\u043c\u044f\u0442\u0438, \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u044f\u0447\u0435\u0439\u043a\u0443 \u043f\u0430\u043c\u044f\u0442\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0438\u043b\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u044f\u0447\u0435\u0439\u043a\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/li>\n<li>\u041a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u044b\u0439. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0447\u0435\u0442\u044b\u0440\u0435 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439: \u043a\u043e\u0441\u0438\u043d\u0443\u0441, \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043a\u043e\u0440\u0435\u043d\u044c \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0439.<\/li>\n<li>\u041a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u044b\u0439 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e. \u042d\u0442\u043e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u043f\u0443\u043d\u043a\u0442\u043e\u0432 2 \u0438 3.<\/li>\n<\/ol>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u2013 \u0438\u043c\u044f \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430.<br \/> \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430: \u0441\u0442\u0440\u043e\u043a\u0430 1 &#8211; \u0442\u0438\u043f \u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440\u0430, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 &#8211; \u0447\u0438\u0441\u043b\u0430 \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0435 \u0434\u0430\u043d\u043d\u043e\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435. \u0412\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f cos(5*7-2)+1, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u044b\u043c \u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c, \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u0438\u0434:<\/p>\n<p><code>3 5 * 7 - 2 cos + 1<\/code><\/p>\n<p>\u0412\u0441\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435. \u0415\u0441\u043b\u0438 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0435\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0430, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u044b\u043c, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c\u0441\u044f \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u043e.<\/p>\n<p>\u0412 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0438 \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u0444\u0430\u0439\u043b\u0430.<\/p>\n<p>\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438.<\/li>\n<li>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u043c. \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441!<\/li>\n<\/ul>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u043f\u043e \u0432\u044b\u0431\u043e\u0440\u0443 \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: 1) <strong>Java<\/strong>; 2) C++; 3) \u0434\u0440\u0443\u0433\u043e\u0439 \u041e\u041e\u041f \u044f\u0437\u044b\u043a.<\/p>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412\u044b\u043b\u043e\u0436\u0443 \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0438 \u0430\u0440\u0445\u0438\u0432 \u0441 \u043f\u043e\u043b\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c + \u0442\u0435\u0441\u0442\u044b:<\/p>\n<p><code>\/* CalculatorBuilder.java *\/ package ru.ozi_blog.task.calc; import ru.ozi_blog.task.calc.primitives.CalcPrimitive; import ru.ozi_blog.task.commands.binary.*; import ru.ozi_blog.task.commands.nullary.*; import ru.ozi_blog.task.commands.unary.*; import ru.ozi_blog.task.exceptions.BuildCalculatorException; \/** * The class CalculatorBuilder takes over the process of creating an object of * the class Calculator. A correct build sequence: * &lt;ul&gt; * &lt;li&gt;Director makes a new object of the class Calculator or MemoryCalculator ( * {@link #newCalculator(CalcPrimitive)} or * {@link #newMemoryCalculator(CalcPrimitive)});&lt;\/li&gt; * &lt;li&gt;Director adds operations to the object ({@link #addBaseCommands()}, * {@link #addMemoryCommands()}, {@link #addScientificCommands()});&lt;\/li&gt; * &lt;li&gt;Director gets the ready object ({@link #getCalculator()}).&lt;\/li&gt; * &lt;\/ul&gt; * * @see ru.ozi_blog.task.calc.Calculator * @see ru.ozi_blog.task.calc.MemoryCalculator * * @author Zhukavets Aleh * * @param &lt;T&gt; * the type of a number that can be used by a Calculator or * a MemoryCalculator *\/ public class CalculatorBuilder&lt;T extends Number&gt; { \/** * An object to build *\/ private Calculator&lt;T&gt; newCalc = null; \/** * Makes a new object of the class Calculator * * @param calcPrimitive * will be used in the creation of the object *\/ public void newCalculator(CalcPrimitive&lt;T&gt; calcPrimitive) { newCalc = new Calculator&lt;T&gt;(calcPrimitive); } \/** * Makes a new object of the class MemoryCalculator * * @param calcPrimitive * will be used in the creation of the object *\/ public void newMemoryCalculator(CalcPrimitive&lt;T&gt; calcPrimitive) { newCalc = new MemoryCalculator&lt;T&gt;(calcPrimitive); } \/** * Adds basic arithmetic operations to object * * @throws BuildCalculatorException * if an object is not be made *\/ public void addBaseCommands() throws BuildCalculatorException { if (newCalc == null) throw new BuildCalculatorException(); newCalc.addCommand(&quot;+&quot;, new PlusSimpleCommand&lt;T&gt;(newCalc.getCalcPrimitive())); newCalc.addCommand(&quot;-&quot;, new MinusSimpleCommand&lt;T&gt;(newCalc.getCalcPrimitive())); newCalc.addCommand(&quot;*&quot;, new MultiplicationSimpleCommand&lt;T&gt;(newCalc.getCalcPrimitive())); newCalc.addCommand(&quot;\/&quot;, new DivisionSimpleCommand&lt;T&gt;(newCalc.getCalcPrimitive())); } \/** * Adds scientific operations to object * * @throws BuildCalculatorException * if an object is not be made *\/ public void addScientificCommands() throws BuildCalculatorException { if (newCalc == null) throw new BuildCalculatorException(); newCalc.addCommand(&quot;sqrt&quot;, new SqrtUnaryCommand&lt;T&gt;(newCalc.getCalcPrimitive())); newCalc.addCommand(&quot;exp&quot;, new ExpUnaryCommand&lt;T&gt;(newCalc.getCalcPrimitive())); newCalc.addCommand(&quot;cos&quot;, new CosUnaryCommand&lt;T&gt;(newCalc.getCalcPrimitive())); } \/** * Adds memory operations to object * * @throws BuildCalculatorException * if an object is not be made or the object is not the * MemoryCalculator *\/ public void addMemoryCommands() throws BuildCalculatorException { if (newCalc == null) throw new BuildCalculatorException(); \/*if an object can't be converted to a MemoryCalculator object, thrown exception*\/ MemoryCalculator&lt;T&gt; tmp = null; if (newCalc instanceof MemoryCalculator) { tmp = (MemoryCalculator&lt;T&gt;) newCalc; } else { throw new BuildCalculatorException(); } tmp.addCommand(&quot;import&quot;, new ImportMemoryCommand&lt;T&gt;(tmp.getMemory(), tmp.getCalcPrimitive())); tmp.addCommand(&quot;export&quot;, new ExportMemoryCommand&lt;T&gt;(tmp.getMemory(), tmp.getCalcPrimitive())); tmp.addCommand(&quot;clear&quot;, new ClearMemoryCommand&lt;T&gt;(tmp.getMemory())); tmp.addCommand(&quot;plus&quot;, new PlusMemoryCommand&lt;T&gt;(tmp.getMemory(), tmp.getCalcPrimitive())); tmp.addCommand(&quot;minus&quot;, new MinusMemoryCommand&lt;T&gt;(tmp.getMemory(), tmp.getCalcPrimitive())); } \/** * Returns the ready object * * @return the ready object * @throws BuildCalculatorException * if an object is not be made *\/ public Calculator&lt;T&gt; getCalculator() throws BuildCalculatorException { if (newCalc == null) throw new BuildCalculatorException(); Calculator&lt;T&gt; tmp = newCalc; newCalc = null; return tmp; } \/* * (non-Javadoc) * * @see java.lang.Object#toString() *\/ @Override public String toString() { return &quot;CalculatorBuilder [newCalc=&quot; + newCalc + &quot;]&quot;; } }<\/code><\/p>\n<h2><a href=\"\/solution.rar\">\u0410\u0440\u0445\u0438\u0432 \u0441 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438 \u0442\u0435\u0441\u0442\u0430\u043c\u0438<\/a><\/h2>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u043e\u0445\u043e\u0434\u0438\u043b \u044f \u0442\u0443\u0442 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u0441\u043a\u0430\u0437\u0430\u043b\u0438 &#8211; \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435 \u043c\u043e\u0451. \u0413\u0434\u0435-\u0442\u043e \u044f \u0435\u0433\u043e \u0432\u0437\u044f\u043b \u0438\u043b\u0438 \u043a\u0443\u043f\u0438\u043b. \u0421\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u0435\u0441\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e. \u041d\u043e \u0440\u0430\u0437 \u043a\u0443\u043f\u0438\u043b, \u0442\u043e \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u043d\u044c \u043d\u0435&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u041e\u041e\u041f-\u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 \u043d\u0430 Java - IPCalc Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ipcalc.co\/blog\/oop-kalkulyator-na-java\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u041e\u041e\u041f-\u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 \u043d\u0430 Java - IPCalc Blog\" \/>\n<meta property=\"og:description\" content=\"\u041f\u0440\u043e\u0445\u043e\u0434\u0438\u043b \u044f \u0442\u0443\u0442 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u0441\u043a\u0430\u0437\u0430\u043b\u0438 &#8211; \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435 \u043c\u043e\u0451. \u0413\u0434\u0435-\u0442\u043e \u044f \u0435\u0433\u043e \u0432\u0437\u044f\u043b \u0438\u043b\u0438 \u043a\u0443\u043f\u0438\u043b. \u0421\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u0435\u0441\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e. \u041d\u043e \u0440\u0430\u0437 \u043a\u0443\u043f\u0438\u043b, \u0442\u043e \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u043d\u044c \u043d\u0435...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ipcalc.co\/blog\/oop-kalkulyator-na-java\/\" \/>\n<meta property=\"og:site_name\" content=\"IPCalc Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-10-13T19:27:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-10-13T19:43:59+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c\">\n\t<meta name=\"twitter:data1\" content=\"admin\">\n\t<meta name=\"twitter:label2\" content=\"\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\">\n\t<meta name=\"twitter:data2\" content=\"2 \u043c\u0438\u043d\u0443\u0442\u044b\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ipcalc.co\/blog\/#website\",\"url\":\"https:\/\/ipcalc.co\/blog\/\",\"name\":\"IPCalc Blog\",\"description\":\"\\u041f\\u043e\\u043b\\u0437\\u0435\\u043d\\u044b\\u0435 \\u0441\\u043a\\u0440\\u0438\\u043f\\u0442\\u044b, \\u043a\\u043e\\u043d\\u0444\\u0438\\u0433\\u0438 \\u0438 \\u043c\\u043d\\u043e\\u0433\\u043e\\u0435 \\u0434\\u0440\\u0443\\u0433\\u043e\\u0435\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/ipcalc.co\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ru-RU\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ipcalc.co\/blog\/oop-kalkulyator-na-java\/#webpage\",\"url\":\"https:\/\/ipcalc.co\/blog\/oop-kalkulyator-na-java\/\",\"name\":\"\\u041e\\u041e\\u041f-\\u043a\\u0430\\u043b\\u044c\\u043a\\u0443\\u043b\\u044f\\u0442\\u043e\\u0440 \\u043d\\u0430 Java - IPCalc Blog\",\"isPartOf\":{\"@id\":\"https:\/\/ipcalc.co\/blog\/#website\"},\"datePublished\":\"2019-10-13T19:27:08+00:00\",\"dateModified\":\"2019-10-13T19:43:59+00:00\",\"author\":{\"@id\":\"https:\/\/ipcalc.co\/blog\/#\/schema\/person\/995e074baefb3871a51b718fd5de412a\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ipcalc.co\/blog\/oop-kalkulyator-na-java\/\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ipcalc.co\/blog\/#\/schema\/person\/995e074baefb3871a51b718fd5de412a\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ipcalc.co\/blog\/#personlogo\",\"inLanguage\":\"ru-RU\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/937f7cf83eb4581f64861b93fe484e16?s=96&d=mm&r=g\",\"caption\":\"admin\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/ipcalc.co\/blog\/wp-json\/wp\/v2\/posts\/658"}],"collection":[{"href":"https:\/\/ipcalc.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ipcalc.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ipcalc.co\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ipcalc.co\/blog\/wp-json\/wp\/v2\/comments?post=658"}],"version-history":[{"count":1,"href":"https:\/\/ipcalc.co\/blog\/wp-json\/wp\/v2\/posts\/658\/revisions"}],"predecessor-version":[{"id":760,"href":"https:\/\/ipcalc.co\/blog\/wp-json\/wp\/v2\/posts\/658\/revisions\/760"}],"wp:attachment":[{"href":"https:\/\/ipcalc.co\/blog\/wp-json\/wp\/v2\/media?parent=658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ipcalc.co\/blog\/wp-json\/wp\/v2\/categories?post=658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ipcalc.co\/blog\/wp-json\/wp\/v2\/tags?post=658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}