Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SemiCircle
- {
- private int x;
- private int y;
- private int radius;
- /**
- * Constructor for objects of class SemiCircle
- * @param centerX is x
- * @param centerY is the y
- * @param theRadius is the radius
- */
- public SemiCircle(int centerX, int centerY,int theRadius)
- {
- this.x = centerX;
- this.y = centerY;
- this.radius = theRadius;
- }
- public boolean contains(int otherX, int otherY)
- {
- if(otherX > otherY){
- return true;
- }
- else{
- return false;
- }
- }
- public boolean intersects( SemiCircle other)
- {
- if(x < y){
- return true;
- }
- else{
- return false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement