New Microsoft Word Document.docx - Homework Static Methods...

This preview shows page 1 out of 1 page.

Homework: Static Methods 1. Implement (i.e., provide the code for the body of) the static method declared as follows: 1 2 3 4 5 6 7 8 9 10 11 12 13 /** * Checks whether the given point (xCoord, yCoord) is inside the circle of * radius 1.0 centered at the point (1.0, 1.0). * * @param xCoord * the x coordinate of the point * @param yCoord * the y coordinate of the point * @return true if the point is inside the circle, false otherwise */ private static boolean pointIsInCircle(double xCoord, double yCoord) { ... } 2. Implement the static method declared as follows: 1 2 3 4 5 6 7 8 9 10 11 12 /** * Generates n pseudo-random points in the [0.0,2.0) x [0.0,2.0)

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture