Write My Paper Button

WhatsApp Widget

Can you tell me if this is right please import java.lang.reflect.AnnotatedArrayType; /** * The class Point…

Homework Help Question & Answers

Can you tell me if this is right please import java.lang.reflect.AnnotatedArrayType; /** * The class Point

Can you tell me if this is right please

import java.lang.reflect.AnnotatedArrayType;

/**

* The class Point is a simple helper class that stares a 2 dimentional element on a grid

*

* @author Guy-Vincent Jourdan, University of Ottawa

*/

public class Point {

public int dot, row, col;

  

   // ADD YOUR INSTANCE VARIABLES HERE

/**

   * Constructor

   *

   * @param x

   * the x coordinate

   * @param y

   * the y coordinate

   */

public Point(int x, int y){

// REPLACE THE BODY OF THIS METHOD WITH YOUR OWN IMPLEMENTATION

this.row= x;

this.col= y;

  

}

/**

   * Getter method for the attribute x.

   *

   * @return the value of the attribute x

   */

public int getX(){

// REPLACE THE BODY OF THIS METHOD WITH YOUR OWN IMPLEMENTATION

return this.row;

  

}

  

/**

   * Getter method for the attribute y.

   *

   * @return the value of the attribute y

   */

public int getY(){

// REPLACE THE BODY OF THIS METHOD WITH YOUR OWN IMPLEMENTATION

return this.col;

}

  

/**

   * Setter for x and y.

   * @param x

   * the x coordinate

   * @param y

   * the y coordinate

   */

public void reset(int x, int y){

// REPLACE THE BODY OF THIS METHOD WITH YOUR OWN IMPLEMENTATION

      

      

      

      

}

  

}

0 0
Add a comment
Don`t copy text!
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
???? Hi, how can I help?