{"id":192,"date":"2014-02-12T09:39:13","date_gmt":"2014-02-12T08:39:13","guid":{"rendered":"http:\/\/liceocuneo.it\/robot\/?p=192"},"modified":"2014-02-12T09:39:13","modified_gmt":"2014-02-12T08:39:13","slug":"jparabola","status":"publish","type":"post","link":"https:\/\/liceocuneo.it\/robot\/jparabola\/","title":{"rendered":"JParabola"},"content":{"rendered":"<pre>import java.awt.Color;\r\nimport java.awt.Graphics;\r\n\r\npublic class JParabola extends JOxy {\r\n\r\n\tprivate double a, b, c;\r\n\r\n\tpublic double f(double x) {\r\n\t\treturn a * x * x + b * x + c;\r\n\t}\r\n\r\n\tpublic JParabola() {\r\n\t\ta = 1.0;\r\n\t\tb = 0.0;\r\n\t\tc = 0.0;\r\n\t}\r\n\r\n\tpublic void paintComponent(Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\r\n\t\tg.setColor(Color.BLUE);\r\n\t\tfor (int i = 0; i &lt; getWidth() - 1; i++) {\r\n\t\t\tdouble x1 = xr(i);\r\n\t\t\tdouble y1 = f(x1);\r\n\t\t\tdouble x2 = xr(i+1);\r\n\t\t\tdouble y2 = f(x2);\r\n\t\t\tg.drawLine(i, yg(y1), i + 1, yg(y2));\r\n\t\t}\r\n\t}\r\n\r\n\tpublic double getA() {\r\n\t\treturn a;\r\n\t}\r\n\r\n\tpublic void setA(double a) {\r\n\t\tthis.a = a;\r\n\t}\r\n\r\n\tpublic double getB() {\r\n\t\treturn b;\r\n\t}\r\n\r\n\tpublic void setB(double b) {\r\n\t\tthis.b = b;\r\n\t}\r\n\r\n\tpublic double getC() {\r\n\t\treturn c;\r\n\t}\r\n\r\n\tpublic void setC(double c) {\r\n\t\tthis.c = c;\r\n\t}\r\n\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>import java.awt.Color; import java.awt.Graphics; public class JParabola extends JOxy { private double a, b, c; public double f(double x) { return a * x * x + b * x + c; } public JParabola() { a = 1.0; b = 0.0; c = 0.0; } public void paintComponent(Graphics g) { super.paintComponent(g); g.setColor(Color.BLUE); for (int [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-192","post","type-post","status-publish","format-standard","hentry","category-senza-categoria"],"_links":{"self":[{"href":"https:\/\/liceocuneo.it\/robot\/wp-json\/wp\/v2\/posts\/192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liceocuneo.it\/robot\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liceocuneo.it\/robot\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liceocuneo.it\/robot\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/liceocuneo.it\/robot\/wp-json\/wp\/v2\/comments?post=192"}],"version-history":[{"count":0,"href":"https:\/\/liceocuneo.it\/robot\/wp-json\/wp\/v2\/posts\/192\/revisions"}],"wp:attachment":[{"href":"https:\/\/liceocuneo.it\/robot\/wp-json\/wp\/v2\/media?parent=192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liceocuneo.it\/robot\/wp-json\/wp\/v2\/categories?post=192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/liceocuneo.it\/robot\/wp-json\/wp\/v2\/tags?post=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}