Warning: Undefined variable $jcyhX in /home/supremepapers/public_html/qualityassignments.net/wp-includes/block-template-utils.php on line 1
Warning: Undefined variable $ettTubkWQB in /home/supremepapers/public_html/qualityassignments.net/wp-includes/nav-menu.php on line 1
Warning: Undefined variable $UUWaafE in /home/supremepapers/public_html/qualityassignments.net/wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php on line 1
Deprecated: Implicit conversion from float 1.7333333333333334 to int loses precision in /home/supremepapers/public_html/qualityassignments.net/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/css.php on line 52
Deprecated: Implicit conversion from float 1.7333333333333334 to int loses precision in /home/supremepapers/public_html/qualityassignments.net/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/css.php on line 52
Deprecated: Implicit conversion from float 2.5 to int loses precision in /home/supremepapers/public_html/qualityassignments.net/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/css.php on line 52
Warning: Cannot modify header information - headers already sent by (output started at /home/supremepapers/public_html/qualityassignments.net/wp-includes/block-template-utils.php:1) in /home/supremepapers/public_html/qualityassignments.net/wp-includes/rest-api/class-wp-rest-server.php on line 1794
Warning: Cannot modify header information - headers already sent by (output started at /home/supremepapers/public_html/qualityassignments.net/wp-includes/block-template-utils.php:1) in /home/supremepapers/public_html/qualityassignments.net/wp-includes/rest-api/class-wp-rest-server.php on line 1794
Warning: Cannot modify header information - headers already sent by (output started at /home/supremepapers/public_html/qualityassignments.net/wp-includes/block-template-utils.php:1) in /home/supremepapers/public_html/qualityassignments.net/wp-includes/rest-api/class-wp-rest-server.php on line 1794
Warning: Cannot modify header information - headers already sent by (output started at /home/supremepapers/public_html/qualityassignments.net/wp-includes/block-template-utils.php:1) in /home/supremepapers/public_html/qualityassignments.net/wp-includes/rest-api/class-wp-rest-server.php on line 1794
Warning: Cannot modify header information - headers already sent by (output started at /home/supremepapers/public_html/qualityassignments.net/wp-includes/block-template-utils.php:1) in /home/supremepapers/public_html/qualityassignments.net/wp-includes/rest-api/class-wp-rest-server.php on line 1794
Warning: Cannot modify header information - headers already sent by (output started at /home/supremepapers/public_html/qualityassignments.net/wp-includes/block-template-utils.php:1) in /home/supremepapers/public_html/qualityassignments.net/wp-includes/rest-api/class-wp-rest-server.php on line 1794
Warning: Cannot modify header information - headers already sent by (output started at /home/supremepapers/public_html/qualityassignments.net/wp-includes/block-template-utils.php:1) in /home/supremepapers/public_html/qualityassignments.net/wp-includes/rest-api/class-wp-rest-server.php on line 1794
Warning: Cannot modify header information - headers already sent by (output started at /home/supremepapers/public_html/qualityassignments.net/wp-includes/block-template-utils.php:1) in /home/supremepapers/public_html/qualityassignments.net/wp-includes/rest-api/class-wp-rest-server.php on line 1794
{"id":142434,"date":"2022-03-06T21:03:16","date_gmt":"2022-03-06T21:03:16","guid":{"rendered":"https:\/\/qualityassignments.net\/?p=142434"},"modified":"2022-03-06T21:03:16","modified_gmt":"2022-03-06T21:03:16","slug":"simple-java-task","status":"publish","type":"post","link":"https:\/\/qualityassignments.net\/2022\/03\/06\/simple-java-task\/","title":{"rendered":"simple java task"},"content":{"rendered":"<\/p>\nFor this task you have to define a class Circle2D <\/em>to represent a circle with a point in two dimensions labelled x <\/em>and y and a radius. To test Circle2D <\/em>class you also need to define a test class. The Circle2D <\/em>class has the following state and functionality:<\/p>\n\n- Two double data fields named x <\/em>and y<\/em> that specify the centre of the circle with getter methods.<\/li>\n
- A data field radius with a getter method<\/li>\n
- A no-arg constructor that creates a default circle with (1, 1) for (x, y) and 4 for radius.<\/li>\n
- A constructor that constructs a circle with the specified x, y, and radius.<\/li>\n
- A method getArea<\/em>() that returns the area of the circle<\/li>\n
- A method getPerimeter<\/em>() that returns the perimeter of the circle<\/li>\n
- A method contains<\/em>(double x, double y) that returns true if the specified point (x, y) is inside this circle<\/li>\n
- A method contains<\/em>(Circle2D circle) that returns true if the specified circle is inside this circle<\/li>\n<\/ul>\n
Draw the UML diagram for the class and then implement the class. Write a test class program that creates a Circle2D object c1(new Circle2D(3, 3, 2.5)), display its areas and perimeter, and display the result of c1.contains(3,3) and c1.contains(new Circle2D(4, 5, 8.5)). <\/p>\n","protected":false},"excerpt":{"rendered":"
For this task you have to define a class Circle2D to represent a circle with a point in two dimensions labelled x and y and a radius. To test Circle2D class you also need to define a test class. The Circle2D class has the following state and functionality: Two double data fields named x and […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_joinchat":[]},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/qualityassignments.net\/wp-json\/wp\/v2\/posts\/142434"}],"collection":[{"href":"https:\/\/qualityassignments.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qualityassignments.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qualityassignments.net\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/qualityassignments.net\/wp-json\/wp\/v2\/comments?post=142434"}],"version-history":[{"count":0,"href":"https:\/\/qualityassignments.net\/wp-json\/wp\/v2\/posts\/142434\/revisions"}],"wp:attachment":[{"href":"https:\/\/qualityassignments.net\/wp-json\/wp\/v2\/media?parent=142434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qualityassignments.net\/wp-json\/wp\/v2\/categories?post=142434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qualityassignments.net\/wp-json\/wp\/v2\/tags?post=142434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}