Write Class Called Point Two Int Fields X Y Coordinates Class Necessary Accessors Mutator Q30130577

. Write a class called Point that has two int fields x and y coordinates. The class should have the necessary accessors, mutators, constructors, and toString methods. 2. Write another class called Circle that has 3 fields: a. b. c. a int fielded called circuit ID a double field called radius a Point object that stores coordinates of the central point of the circle. The class should have the necessary accessors, mutators, constructors, and toString methods The circuit ID should be uniquely set (hint: using class variables to help) in the constructors. In addition, add the following method to Circle class to draw itself on a graphics using the class DrawingPanel. public void draw (Graphics 8) g.setcolor (Color.red) g.fillOval (...),) g.drawstring (), /write the circle ID closeby; //draw the circle; Write a class called Lab10, with main method. In the main method, create 3 Circle objects; assign all the fields with random numbers; draw these circles on a DrawingPanel object. 3.. Write a class called Point that has two int fields x and y coordinates. The class should have the necessary accessors, mutators, constructors, and toString methods. 2. Write another class called Circle that has 3 fields: a. b. c. a int fielded called circuit ID a double field called radius a Point object that stores coordinates of the central point of the circle. The class should have the necessary accessors, mutators, constructors, and toString methods The circuit ID should be uniquely set (hint: using class variables to help) in the constructors. In addition, add the following method to Circle class to draw itself on a graphics using the class DrawingPanel. public void draw (Graphics 8) g.setcolor (Color.red) g.fillOval (…),) g.drawstring (), /write the circle ID closeby; //draw the circle; Write a class called Lab10, with main method. In the main method, create 3 Circle objects; assign all the fields with random numbers; draw these circles on a DrawingPanel object. 3. Show transcribed image text . Write a class called Point that has two int fields x and y coordinates. The class should have the necessary accessors, mutators, constructors, and toString methods. 2. Write another class called Circle that has 3 fields: a. b. c. a int fielded called circuit ID a double field called radius a Point object that stores coordinates of the central point of the circle. The class should have the necessary accessors, mutators, constructors, and toString methods The circuit ID should be uniquely set (hint: using class variables to help) in the constructors. In addition, add the following method to Circle class to draw itself on a graphics using the class DrawingPanel. public void draw (Graphics 8) g.setcolor (Color.red) g.fillOval (…),) g.drawstring (), /write the circle ID closeby; //draw the circle; Write a class called Lab10, with main method. In the main method, create 3 Circle objects; assign all the fields with random numbers; draw these circles on a DrawingPanel object. 3.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *