Just want the codes for MyArc in Javafx
2- Class My Shape: Class MyShape is an abstract class; is the hierarchy's superclass; and inherits Java class Object. The area, perimeter, and draw methods in class MyShape are abstract methods and hence must be overridden in each subclass in the hierarchy. The implementation of the class defines a reference point p(x, y), an object of type My Point, and the color of the shape of enum reference type My Color. Otherwise, the classes My Point, MyShape, MyLine, My Rectangle, and My Oval are as defined in Assignment 1. Class My Arc: Create a hierarchy of Java classes as follows: Class MyArc inherits class MyShape. The MyArc object is a segment of the boundary of a My Oval object, defined by the endpoints pi(x₁, y₁) and p2(x2, y2), or their corresponding angles, measured from the x-axis, on the My Oval boundary. The MyArc object may be filled with any a. b. c. color of My Color enum reference type. The class includes appropriate class constructors and methods, including methods that perform the following operations: 3- 4- MyLine extends MyShape; MyArc extends My Shape; My Rectangle extends My Shape; My Oval extends My Shape; My Circle extends My Oval. length - returns the arc length of the MyArc object; toString - returns a string representation of a MyArc object; draw-draws a MyAre object. Interface MyShapeInterface is implemented by the abstract class MyShape. All subclasses of the hierarchy must therefore be amended in accordance with the interface. The interface includes constants (as needed) and appropriate abstract, static, and default methods that perform functions that describe specific behaviors of the object types of the class hierarchy, including: a. b. d. getMy Bounding Rectangle - abstract method returns the bounding rectangle of an object in the class hierarchy; pointInMyShape- abstract method returns true if a point p is located within or on the boundary of an object in the class hierarchy; c. intersectMyShapes-static method returns the intersection of two MyShape objects, S₁ and $2 - i.e., the set of all points on or within the boundary of the area - of two objects in the class hierarchy if they do overlap, and null otherwise. draw IntersectMyShapes- default method returns a canvas with a drawing of the intersection of two objects in the class hierarchy if they do overlap. Use JavaFX graphics and the class hierarchy to draw a geometric configuration of a circular pizza pie arbitrarily sliced as illustrated below, subject to the following additional requirements: a. The code is applicable to canvases of variable height and width; b. The dimensions of the shapes are proportional to the smallest dimension of the canvas; c. The polygons and circles are filled with different colors of your choice, specified through the reference type My Color; and d. All objects are processed polymorphically.
5- Further: Draw the bounding rectangle of MyLine, MyArc, and MyCircle objects of your choice; Draw the area of intersection of: a. b. Two My Rectangle objects; and A My Rectangle object and a MyCircle Object; and Explicitly specify all the classes imported and used in your Java code.
Just want the codes for MyArc in Javafx
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am